Beijing Ultrasonic

  • Products
  • Contact Us
  • No products in cart.
  • EnglishEnglish
    • Español Español
    • Français Français
    • Deutsch Deutsch
    • Italiano Italiano
    • Português Português
    • Українська Українська
    • Русский Русский
    • Türkçe Türkçe
    • Polski Polski
    • Nederlands Nederlands
    • Čeština Čeština
    • Svenska Svenska
    • עברית עברית
    • العربية العربية
    • فارسی فارسی
    • 简体中文 简体中文
    • 日本語 日本語
    • 한국어 한국어
    • हिन्दी हिन्दी
    • Melayu Melayu
    • Indonesia Indonesia
    • Tiếng Việt Tiếng Việt
  • Home
  • Blog
  • Ultrasonic Technology
  • How to make an ultrasonic sensor

How to make an ultrasonic sensor

by Jessie Wong / Saturday, 22 April 2023 / Published in Ultrasonic Technology

Ultrasonic sensors are widely used in various applications such as distance measurement, object detection, and automation. These devices operate by emitting high-frequency sound waves (ultrasound) and measuring the time it takes for the sound to reflect back from an object. Building an ultrasonic sensor from scratch requires a solid understanding of electronic components and the principles of sound wave propagation. This guide will walk you through the step-by-step process to create a basic ultrasonic sensor.

1. Components and Tools Required

To build an ultrasonic sensor, you will need the following components and tools:

Component/Tool Purpose
Ultrasonic transducers (transmitter and receiver) Emit and detect ultrasound waves.
Microcontroller (e.g., Arduino, Raspberry Pi) Process signals and control the sensor.
Resistors and capacitors Stabilize and condition electronic signals.
Operational amplifier (Op-amp) Amplify weak signals from the receiver.
Oscillator circuit Generate high-frequency sound waves.
Breadboard For prototyping the circuit.
Wires and jumper cables Connect components on the breadboard.
Power supply (e.g., 5V battery or USB power) Provide power to the entire setup.
Multimeter Test circuit connections and measure voltages.
Soldering kit (optional) Permanently connect components.

2. Understanding the Working Principle

An ultrasonic sensor works using the principle of sound wave reflection. The transmitter emits ultrasonic waves, which travel through the air and reflect off an object. The receiver then captures the reflected sound, and the time taken for the round trip (from transmission to reception) is measured. Using the formula:

[
text{Distance} = frac{text{Speed of Sound} times text{Time}}{2}
]

you can calculate the distance between the sensor and the object. Typically, the speed of sound in air is approximately 343 meters per second at room temperature.

3. Setting Up the Oscillator Circuit

The transmitter requires an oscillator circuit to generate high-frequency ultrasonic waves (commonly 40 kHz). Here’s how to set it up:

  1. Use a 555 Timer IC or a similar component to create the desired frequency.
  2. Connect the 555 Timer in astable mode, with appropriate resistor and capacitor values to achieve a 40 kHz frequency.
  3. Verify the output frequency using an oscilloscope or frequency counter.

An example configuration of a 555 Timer circuit for 40 kHz is as follows:

Component Value
Resistor R1 1 kΩ
Resistor R2 10 kΩ
Capacitor C1 0.001 µF (1 nF)

Adjust these values as necessary to fine-tune the frequency.

4. Connecting the Ultrasonic Transmitter

Now, connect the ultrasonic transmitter to the output of the oscillator circuit. The transmitter will emit high-frequency sound waves when the circuit is powered. Ensure the transmitter is securely attached to the breadboard or a custom housing for stability.

5. Designing the Receiver Circuit

The receiver circuit detects the reflected ultrasonic waves and converts them into an electrical signal. Here are the steps to design the receiver circuit:

  1. Connect the ultrasonic receiver to the breadboard.
  2. Use an operational amplifier (Op-amp) to amplify the weak signal it generates.
  3. Add a high-pass filter to eliminate low-frequency noise and improve signal accuracy.
  4. Use a voltage regulator or additional resistors to protect the receiver from excessive current.

A basic Op-amp configuration for signal amplification is as follows:

Component Value
Gain Resistor Rf 100 kΩ
Input Resistor Ri 10 kΩ

The gain of the amplifier can be calculated using the formula ( text{Gain} = 1 + frac{R_f}{R_i} ).

6. Processing the Signal with a Microcontroller

Once the receiver circuit is functional, connect it to a microcontroller such as an Arduino or Raspberry Pi for signal processing:

  1. Attach the transmitter and receiver output pins to the respective GPIO pins on the microcontroller.
  2. Write a program to send a trigger pulse to the transmitter and measure the time taken for the echo to return to the receiver.
  3. Use the time measurement to calculate the distance using the formula mentioned earlier.

Here’s a sample Arduino code snippet for distance calculation:

#define TRIG_PIN 9
#define ECHO_PIN 10

void setup() {
  pinMode(TRIG_PIN, OUTPUT);
  pinMode(ECHO_PIN, INPUT);
  Serial.begin(9600);
}

void loop() {
  digitalWrite(TRIG_PIN, LOW);
  delayMicroseconds(2);
  digitalWrite(TRIG_PIN, HIGH);
  delayMicroseconds(10);
  digitalWrite(TRIG_PIN, LOW);

  long duration = pulseIn(ECHO_PIN, HIGH);
  float distance = (duration * 0.0343) / 2;

  Serial.print("Distance: ");
  Serial.print(distance);
  Serial.println(" cm");
  delay(500);
}

7. Testing and Calibration

After building the circuit and uploading the code, test the ultrasonic sensor by placing objects at varying distances. Compare the measured distances with actual values to ensure accuracy. If discrepancies arise, recalibrate the oscillator frequency and fine-tune the amplification circuit.

8. Housing and Final Assembly

To protect the sensor and improve its durability, consider creating a housing for the assembled circuit. Use materials like plastic or acrylic to encase the components while leaving openings for the transmitter and receiver. Ensure the design does not obstruct the ultrasonic waves.

Building an ultrasonic sensor requires careful planning, component selection, and circuit design. By following the steps outlined above, you can create a functional ultrasonic sensor suitable for a variety of applications. Whether you’re experimenting with DIY electronics or designing a custom automation solution, this project offers valuable insights into the principles of sound wave propagation and electronics. For high-quality ultrasonic transducers and components, brands like Beijing Ultrasonic offer reliable options to enhance your designs.

What you can read next

DIY how to make a humidifier
How to use vaporizer steamer
DIY terrarium humidifier

Product categories

  • Piezoceramics
    • Piezoceramic Ball/Hemisphere
    • Piezoceramic Cylinder
    • Piezoceramic Discs
    • Piezoceramic Rings
    • Piezoceramic Square/Rectangular
    • Piezoceramic Tube
  • Ultrasonic Cleaner
    • 120kHz Digital Ultrasonic Cleaner
    • 40kHz Digital Ultrasonic Cleaner
    • 80kHz Digital Ultrasonic Cleaner
    • Dual Frequency Digital Ultrasonic Cleaner
    • Immersible Ultrasonic Transducer
    • Industrial Ultrasonic Cleaner
    • Mechanical Ultrasonic Cleaner
    • Power Adjustable Digital Ultrasonic Cleaner
  • Ultrasonic Generator
    • [100-120V] Ultrasonic Transducer Driver Circuit & Transducer Bundles
    • [100-120V/200-240V] Ultrasonic Transducer Driver Circuit & Transducer Bundles
    • [200-240V] Ultrasonic Transducer Driver Circuit & Transducer Bundles
    • Digital Ultrasonic Generator
    • Digital Ultrasonic Transducer Driver Circuit & Transducer Bundles
    • Ultrasonic Transducer Driver Circuit
  • Ultrasonic Humidifier
  • Ultrasonic Meter
  • Ultrasonic Processor
    • Ultrasonic Biodiesel Reactor
    • Ultrasonic Homogenizer
  • Ultrasonic Transducer
  • Ultrasonic Welder

Recent Posts

  • 2L Mechanical Ultrasonic Cleaner Time Temperature-05

    A Comprehensive Guide to Wholesale Ultrasonic Cleaners

    Ultrasonic cleaning technology has revolutioniz...
  • The Benefits of Combining Disruption and Homogenization in a Single Instrument

    Combining disruption and homogenization capabil...
  • Ensuring Cleanroom Compatibility: Ultrasonic Welding in Electronics Manufacturing

    The electronics industry demands manufacturing ...
  • Ultrasonic Welding: A Boon for Innovation in Consumer Goods

    Ultrasonic welding has emerged as a pivotal tec...
  • 5000ML Fog Water Fountain Ultrasonic Cool Mist Humidifier (2)

    The Science of Moisture: How Ultrasonic Humidifiers Add Humidity to Your Air

    Ultrasonic humidifiers have become a popular ch...
  • Beyond Heat and Glue: The Science Behind Ultrasonic Bonds

    The realm of manufacturing and assembly is cons...
  • Ultrasonic Sensors

    From Bumpers to Brakes: Piezoceramic Sensors in Automotive Applications

    Piezoceramic sensors have become indispensable ...
  • From Tough Tissues to Delicate Cells: The Power of Ultrasonic Homogenization for Diverse Samples

    Ultrasonic homogenization, a technique employin...
  • Ultrasonic Cell Disruptor Homogenizer Transducer (4)

    Streamlining Workflows in Microbiology: Ultrasonic Homogenization for Faster Sample Prep

    In the fast-paced world of microbiology, effici...
  • The Future of Sound: How Ultrasonic Generators are Shaping Diverse Industries

    The world of sound extends far beyond what the ...

Customer Care

  • My Account
  • About Us
  • Return Policy
  • Privacy Policy
  • Terms & Conditions
  • Resource Center
  • Blog & News
  • China Public Holiday
  • Sitemap

Technical Info

  • Ultrasonic Cleaner Overview
  • Ultrasonic Cleaner FAQs
  • Ultrasonic Generator Overview
  • Ultrasonic Generator FAQs
  • Ultrasonic Transducer Overview
  • Ultrasonic Transducer FAQs
  • Piezoceramics Overview
  • Piezoceramic FAQs

Product Catalog

Beijing-Ultrasonic-Product-Catalog

Secure Payment

Buy now with PayPal
  • GET SOCIAL

© 2011 - 2026 Beijing Ultrasonic. All Rights Reserved.

TOP