Ultrasonic Sensor Operation on a UAV

UAV Ultrasonic Sensor

MaxBotix sensors have been successfully used on a number of UAVs. A UAV can also be called a multi‑copter, rotorcraft, quadrotor helicopter, or a quadcopter. Many users have had issues getting sensors to operate reliably, especially during flight. The most obvious issue with this is the amount of wind turbulence the ultrasonic wave must travel through. Adding to the acoustic noise is the sound the propellers generate.

Electrical energy that the motors use (with amps of current) typically share the same micro-controller, controlling both the flight and reading the sensors. So conducted electrical noise is likely. Also, amps of current are typically switched on and off rapidly. So when common two‑way radios (such as Zigbee, XBee, etc.) are used, radiated electrical noise is also likely. Additionally, some UAVs can have vibration on the frame. Taken together, these issues are substantial, and correcting only one issue while ignoring the others may not provide reliable operation.


Air Turbulence

Propellers cause a substantial amount of air turbulence, yet they do so in a predictable manner. Mounting the sensor directly in the prop wash should be avoided. Best operation and results will be obtained by mounting the sensor as far away from the propellers as possible. If you are using the sensor to measure the distance to the ground, the best place for mounting the sensor is typically under the frame and near the center of the airframe. The airframe is the component of the UAV that supports the rest of the components such as the motors, APM, wiring, etc.

Measurements of a powerful electric copter showed that this effect caused the sensor’s received signal energy to lower, sometimes by more than ten times! This type of issue is generally overcome by using our XL-MaxSonar-EZ type sensors. Although with careful mounting, some have used our LV-MaxSonar-EZ sensors with great success.

Visualize this effect. Place an ice cube in front of your eye and look through it. Sure, you can see through the ice cube, but much of the light is directed to or from other places. The air turbulence acts in a similar manner to the path light takes through the ice cube, changing the direction and intensity of the acoustic wave in erratic ways.


Propeller Acoustic Noise

Propeller acoustic noise is very similar to air turbulence except that instead of changing the amount of energy the sensor actually detects, this effect adds additional outside acoustic energy to the sensor. Most of this noise originates at the propellers tip vortex region.

Measurements of a powerful electric UAV showed that this effect can cause the most sensitive sensors, such as the EZ0, EZ1, and sometimes the EZ2 sensors of both the LV‑MaxSonar‑EZ and XL‑MaxSonar‑EZ, to sometimes false detect this noise. This detection can cause a lower range than normal to be reported. Again, with careful mounting, many users have found that any of our LV‑MaxSonar‑EZ or XL‑MaxSonar‑EZ sensors will operate well.

We recommend that the user avoids mounting the sensor in places where the sensor has a direct path to any propeller. If you can see the sensor looking past the propellers, then the sensor will hear its sound. For best mounting, foam rubber can be used to block this path. The user can mount the sensor under the flight electronics, or a combination of the two can be used.

Visualize this effect. Place a flashlight beside your eye, and direct it into your eye. Then look straight on at your surroundings. (Please do not attempt this, but just try to visualize this effect in your mind.) You might make out some of the features around you, but much of your vision is blurred by the additional light. The propeller noise acts in a similar manner to the air path, adding additional acoustic energy in erratic ways.


Grounding and Power

Power and ground on a UAV are shared with the control system and motors. An ultrasonic sensor is typically best powered by the same system that reads it, such as the control system. The wiring of these items can have a pronounced effect on the electronics in the system. The Analog to Digital Converter (ADC) on the control system can be severely degraded if either the power or ground supplying the ADC is noisy. This, in turn, can cause a sensor to be read with many ADC counts of “noise” even though the sensor may have a noise-free output.

UAV Star Power and Ground ExampleA “star” power and ground system is generally best. The “star” is setup using individual twisted pairs consisting of power and ground, where each item that uses power has its own twisted pair running from the power source, such as a battery pack, to the power input. In this system setup, each item has its own power and ground running back to the source. If one component has a high current draw, such as a motor, only that component will have its voltage reduced. This voltage reduction is due to resistance in the wiring. The item with the high current draw, along with the associated changes in both the power and ground, is isolated from all of the other items being powered. Many times only the ground is wired in a star. If only the ground is wired in a star, voltage drops from high current items will likely bleed through to the other lower current items in the system. Individual twisted pairs running from system power to each load is preferred and highly recommended. For a diagram of star wiring, please refer to the image on the right.

UAV Daisy Chain Power and Ground Example

A daisy chain is typically not a recommended method to distribute power. In a daisy chain system, all power and grounds run from one item to the next, using a minimal amount of wiring. All of the items along the chain will interact with each other. In this system, a twisted pair of wires is not typically used, and there is not much regard to the amount of power or current each item uses. Sometimes this method of wiring is alright for grouping components with similar current draws together, but the interaction between the connected components needs to be considered. Sensitive items, such as the controller and sensors, should be connected using the “star” wiring method. For a diagram of what a daisy chain looks like, please review the image on the left.



Conducted Electrical Noise

XL Filter

XL Filter

Electrical noise is generated when the UAV motors are driven. Many amps of current are used to drive the motors. They will spike/droop the voltage levels on the ground and power lines on the UAV at the motor switching speed. Additionally, radios (such as Zigbee, Xbee, MaxStream, NEXbee, etc.) that transmit from the quadcopter can generate noise on the voltage supply during transmit. This noise on the ultrasonic sensor’s power lines may cause the sensor to operate improperly. A simple power supply filter will alleviate most of these issues. The RC filter kit such as the MB7961 Power Supply Filter has a 100uF capacitor, a 10-ohm, and 100-ohm resistor that when used will eliminate most conducted electrical noise from getting to our sensors.


Many UAVs have solved most erroneous distance readings with this simple filter. The graphs below show before and after pictures of the range readings with and without a power supply filter.

Sonar Signal graph
The graph above shows the signal coming from a sensor on a multi-copter that has an unstable power supply.

Sonar Signal graph
The graph above shows the same sensor on a multi-copter after a power filter has been applied to an unstable power supply.


Radiated Electrical Noise

High switching currents used for driving the electric motors on quadcopters generate substantial amounts of radiated electrical noise. Additionally, radios that transmit from the UAV will always generate radiated electrical energy. This radiated energy acts as interference (noise) to other systems and sensors on the UAV.

Radiated electrical noise will generally not cause incorrect reading issues for our ultrasonic distance sensors, provided one uses the MB7961 Power Supply Filter. When users properly install a Power Supply Filter and use one of our digital interfaces (such as I2C, Serial, or Pulse Width outputs) the sensor distance readings will typically not be corrupted by radiated electrical noise.

Users of the Analog Voltage Output from our sensors will likely have issues in environments with radiated electrical noise unless a protected cable is used. Our Shielded Cable, the MB7954 will work well for this. The shield on the cable must be properly grounded at the micro‑controller end. If the shielded wire is not connected to the ground at the micro‑controller, the shield will do little or no good. The adjacent (-) ground pin beside the negative (- or ground) works well.

Measurements on a high powered UAV showed that the typical noise on the Analog Voltage Output increased from 10mV peak to peak – 260mV peak to peak when not using a shielded cable. When the shielded wire was used and the motors were at full power, the noise barely increased from 10mV to 12mV. Even with a shielded cable used and the shield wire was left floating (unconnected), the noise increased from 10mV peak to peak – 240mV peak to peak. It is important that the user ground the shield at the micro‑controller side only!


Frame Vibration

In addition to acoustic noise and radiated electric noise, frame vibration is also a possible source of noise for our sensors. This can be thought of as contact acoustic noise, where the energy from the frame is transmitted to the sensor. During our testing, noise from frame vibration was not observed on the powerful UAV we tested. This does not completely eliminate frame vibration as a possible source of noise for other quadcopters. Rubber washers, foam tape, or any other method that would eliminate frame vibration as a noise source are recommended.


UAV Sensor Troubleshooting

Noise SourceCauseSolutionComments
Air TurbulencePropeller wash over and around the sensorMount the sensor as far from the propeller wash as possible. The most typical mounting location is to mount the sensor on the bottom of the airframe near the center.Very common issue and sensor mounting position should always be considered.
Propeller Acoustic NoisePropeller noise into the sensorMount the sensor as far from the propeller wash as possible. The most typical location is to mount the sensor on the bottom of the airframe near the center.Very or most common issue and sensor mounting position should always be considered.
Grounding and PowerGrounding and Power wiring aren’t wired properlyWiring all components in a starStar wiring should always be considered.
Conducted Electrical NoiseConducted electrical noise from other items connected to the same electrical system.Use the Power Supply FilterCommon issue and power supply filter is recommended for most users.
Radiated Electrical NoiseRadiated electrical noise from other items near the same electrical systemUse the Shielded CableThe shielded cable can improve sensor performance. If using the Analog Voltage Range Output from the sensor, the shielded cable is highly recommended.
Frame VibrationAirframe has a mechanical vibration that is transmitted to the sensor.Mount the sensor using vibration isolating materials.Use rubber washers or foam.


Recommended Sensors for UAV

If you have a powerful UAV and would like to range the ground, MaxBotix recommends the MB1340 or the MB1240 XL-MaxSonar-EZ sensors. If you prefer using the I2C output, the recommended sensor is the MB1242. For quadcopters or multi-rotors that operate in non-protected environments, the MB7060-300 is recommended for testing.


MB1240 Sensors
MB1240 – AN, PW, RS232For users that only use their UAV in fair weather, the MB1240 is the recommended sensor. This sensor has been tested by our engineers for this application with great success.
Data‑Sheet Download 

MB7060 Sensors
MB7060 – AN, PW, RS232

For users that wish to fly in rain or inclement weather, the IP67 rated MB7060 is a great choice. This sensor has the same performance and pinout as the MB1240, making it a perfect drop-in replacement.


MB7267 Sensors
MB7060-300 – AN, PW, RS232The MB7060-300 provides an IP67 rated sensor in an extra light and compact form factor. With a weight of only 18 grams, this is great for users with weight critical setups.
Data‑Sheet Download 

MB1242 Sensors
MB1242 – I2C, PW, RS232

I2C is a common interface for UAV’s that fly in fair weather, this makes the MB1242 a great sensor for users with the I2C interface. Like the MB1240, our engineers have evaluated this sensor for this application.


MB7040 Sensors
MB7040 – I2C, PW, RS232
I2C and outdoor rated, the MB7040 is a drop in replacement for users that occasionally wish to fly a UAV in inclement weather. This sensor matches the MB1242 in performance to many targets.


Products related to the Article Above


MaxBotix Inc.

We use cookies to give you the best online experience. By agreeing you accept the use of cookies in accordance with our cookie policy.

Privacy Settings saved!
Privacy Settings

When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. Control your personal Cookie Services here.

These cookies are necessary for the website to function and cannot be switched off in our systems.

In order to use this website we use the following technically required cookies
  • wordpress_test_cookie
  • wordpress_logged_in_
  • wordpress_sec

For perfomance reasons we use Cloudflare as a CDN network. This saves a cookie "__cfduid" to apply security settings on a per-client basis. This cookie is strictly necessary for Cloudflare's security features and cannot be turned off.
  • __cfduid

Decline all Services
Accept all Services