Utrasonic
Utrasonic
Utrasonic
NEW: Explore advanced connectivity with our USB-compatible products and free RangeTrack software.
Click here
MaxBotix
Cart
MARCH 1, 2023
Share
Ultrasonic sensing is one of the best ways to sense proximity and detect levels with high reliability.
Our technical support gets emails all of the time about how our sensors work and what environments
our sensors work (or don’t work) in.
This guide was created as an introduction to ultrasonic sensing, its principles, and how ultrasonic
sensors work in your applications.
At the top level, you need to know what an ultrasonic sensor is.
An ultrasonic sensor is an instrument that measures the distance to an object using ultrasonic sound
waves.
An ultrasonic sensor uses a transducer to send and receive ultrasonic pulses that relay back information
about an object’s proximity.
High-frequency sound waves reflect across boundaries to produce distinct echo patterns.
Ultrasonic sensors work by sending out a sound wave at a frequency above the range of human hearing.
The transducer of the sensor acts as a microphone to receive and send the ultrasonic sound. Our
ultrasonic sensors, like many others, use a single transducer to send a pulse and to receive the echo. The
sensor determines the distance to a target by measuring time lapses between the sending and receiving
of the ultrasonic pulse.
The working principle of this module is simple. It sends an ultrasonic pulse out at 40 kHz, which travels
through the air, and if there is an obstacle or object, it will bounce back to the sensor. By calculating the
travel time and the speed of sound, the distance can be calculated.
Ultrasonic sensors are a great solution for the detection of clear objects. For liquid level measurement,
applications that use infrared sensors, for instance, struggle with this particular use case because of
target translucence.
For presence detection, ultrasonic sensors detect objects regardless of color, surface, or material (unless
the material is very soft, like wool, as it would absorb sound).
To detect transparent and other items where optical technologies may fail, ultrasonic sensors are a
reliable choice.
When using multiple sensors in an application, it’s important to connect them in a way that will allow
you to avoid issues like crosstalk or any other interference.
To prevent the disruption of the ultrasonic signals coming from your sensor, it’s important to keep the
face of the ultrasonic transducer clear of any obstructions.
Common obstructions include:
Dirt
Snow
Ice
Other Condensation
For this particular use case, we offer our Self Cleaning sensors.
They are intended specifically for applications requiring the resistance of condensation in high-moisture
environments. Our self-cleaning function is designed to run continuously in order for the self-cleaning
feature to be active.
Note: The Self Cleaning function is not intended to clean dirt off of the transducer’s surface. Its intent is
to clear the transducer’s face of moisture to operate normally.
1. HOOK-UP CONTROLLER
We used an Arduino in this example, but you can use another controller and program of your choice.
2. INSTALL SOFTWARE
Install Arduino Sketch coding software on your PC. This is where you type the code you want to compile
and send it to the Arduino board.
Plug your Arduino into the USB cable and into your computer. Once you upload Arduino, you can then
compile and activate the code.
4. COMPILE AND RUN CODE
The code below will allow you to read distances in centimeters. Compile and run this code to obtain
real-time distance measurements to the closest object. (Please note: this code is not only for Arduino
and will run on most controllers.)
void setup() {
Serial.begin(9600);
void read_sensor(){
anVolt = analogRead(anPin);
cm = anVolt/2;
void print_range(){
Serial.print(“Range = ”);
Serial.print(cm);
Serial.print(” cm “);
Serial.print('\n');
void loop() {
read_sensor();
print_range();
delay(100);
Ultrasound is reliable in any lighting environment and can be used inside or outside. Ultrasonic sensors
can handle collision avoidance for a robot and being moved often, as long as it isn’t too fast.
Ultrasonics are so widely used that they can be reliably implemented in grain bin sensing applications,
water level sensing, drone applications, and sensing cars at your local drive-thru restaurant or bank.
Presence
Level
Position
Distance
Light
Smoke
Dust
Color
Material (except for soft surfaces, i.e. wool, because the surface absorbs the ultrasonic sound wave and
doesn’t reflect sound.)
Ultrasonic sensors are superior to infrared sensors because they aren’t affected by smoke or black
materials, however, soft materials which don’t reflect the sonar (ultrasonic) waves very well may cause
issues. It’s not a perfect system, but it’s good and reliable.
Distance measurement is based on the measurement of time-of-flight. The time between sending and
receiving the reflected sound signal is calculated by the sensor. Ultrasonic distance sensors, like the
MB7360 HRXL-MaxSonar-WR, are used as height monitors, in bin-level measurement and proximity
zone detection applications.
Ex. Distance measurement would be applied in a garage parking application, sensing when a vehicle is
pulled completely into a garage.
The MB7360 has been used as a bin level sensor to detect the presence or absence of grain and other
materials in bins.
Popular applications that we have worked on have been using our sensors in kiosks to detect the
presence of a person approaching and detecting the presence of people in an environment, like an art
installation.
One detailed use case is this interactive art installation covered in detail on Makezine.com.
We’ve written an article that covers key questions and concerns about the use of our sensors in these
types of solutions.
Our goal is to help you find a sensor that is just sensitive enough for your project but avoids potential
issues like picking up interference from an outside noise source.
Take a look at the following video. nuMedia Innovations developed a solution for a Microsoft Store in
Seattle WA to detect human presence on a store display.
This project for a Low Power Water Level Sensor, from Hackster.io developer Amedee, uses a weather
resistant sensor from our WR line. In combination with a LoraWan node and The Things IoT open source
network, this project was developed to measure the water level in a rainwater tank. Although, it can be
used in many applications.
You can read this article How to Choose an Ultrasonic Tank Level Sensor which details steps you can take
to choose the right sensor for your level sensing application.
We cover:
Which sensor lines work best for environments where frost on the sensor might be an issue
If you’re using the sensor in a harsh environment, we suggest the added protection in order for you to
successfully use the sensor in your project.
As a brief guide to inform you of the compatibility of our sensors in a few environments, we’ve created
the Chemical Compatibility Chart.
A few of the most popular chemical and environment queries are covered here.
When you use a ultrasonic sensor from our WR line, the sensor pinout is left exposed, allowing you to
attach wires and equipment to the sensor.
The reason we leave it open is that it provides you more flexibility in how you choose to connect to the
sensors.
If your mounting requires you to protect the back of the sensor from damage, you must seal the sensor
pinout.
The wire attach option will fully cover the sensor pinout by adding a small cap filled with an epoxy
mixture and attached cable.
By adding the additional potting on the back of the sensor, it will seal it against the effects of weather,
dust, and water…
This isn’t just for people that just want to protect their sensor, it’s for people with limited soldering
experience.
If you don’t want to risk your new sensor with the first attempt soldering it, we highly suggest working
with our professional, in-house soldered sensors with wire attachments.
Back to blog
MaxBotix Inc.
About Us
Company Values
Career Opportunities
Quick Links
Ask A Question
Request Quote
Order Request
MaxBotix Collaborators
Find a Distributor
Support
Sitemap
The names MaxBotix®, MaxSonar®, ProxSonar™, TrashSonar™, ParkSonar™, EZ0, EZ1, EZ2, EZ3, EZ4, AE0,
AE1, AE2, AE3, AE4, WR, WR1, WRA, WRL, WRLA, WRM, and WRMA are trademarks of MaxBotix Inc.
Teflon® is a registered trademark of DuPont™ All other trademarks mentioned herein are the property
of their respective companies.
MaxBotix Inc.
Brainerd, MN 56401
Email: [email protected]
Phone: 218.454.0766
Follow on
Following on
YouTube
Tumblr
Vimeo
Payment methods
Refund policy
Privacy policy
Terms of service
Shipping policy
Contact information