MaxSonar Operation on a Multi-Copter

XL-MaxSonar-EZ use on a Multi-CopterMaxBotix Inc., sensors have been successfully used on a number of multi‑copters. Multi‑copters are also called UAVs, rotorcraft, quadrotor helicopters, or quadcopters. Many users have had issues getting the sensors to operate reliably. Sensor operation during flight on a quad‑copter is a challenging environment for an ultrasonic sensor to operate reliably. The most obvious issue is the amount of wind turbulence the ultrasonic wave must travel though. Adding to this acoustic noise is the noise 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, and common two‑way radios such as Zigbee, XBee, etc., are used, radiated electrical noise is also likely. Additionally, some multi‑copters 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 using the sensor to measure the distance to the ground, typically the best place for mounting the sensor is under the frame and near the center of the airframe. The airframe is the component of the multi‑copter 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, but 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 though it. Sure you can see though 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 affect adds additional outside acoustic energy to the sensor. Most of this noise originates at the propellers tip vortex region. Measurements of a powerful electric multi‑copter showed that this affect 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 this 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, but directed into your eye (please don't do this, but try to visualize this effect in your mind), and look beside it to a distant scene. You might make out some of the features, but much of the features are blurred in your vision from 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 is shared with the control system and motors. An ultrasonic sensor is typically best powered from 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.
StarPower and Ground A "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 it's voltage reduced. This voltage reduction is due to resistance in the wiring. The item with the high current draw, along with the associated changes to both the power and ground, are 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 greatly recommended. For a diagram of star wiring, please refer to the image on the right.
Daisy Chain Power and Ground 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 OK for grouping components with similar current draws together, but 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

Electrical noise is generated when the quadcopter motors are driven. Many amps of current are used to drive the motors and will spike/droop the voltage levels on the ground and power lines on a quadcopter 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 power supplied to the ultrasonic sensor 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 multi‑copters have solved most erroneous distance readings with this simple filter. The graphs below show a before and after pictures of the range readings without and with 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 quadcopter will always generate radiated electrical energy. This radiated energy acts as interference (noise) to other systems and sensors on the quadcopter. 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 when using this sensor output in environments with radiated electrical noise, unless a shielded wiring harness 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 shield 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 quadcopter showed that the typical noise on the Analog Voltage Output increased from 10mV peak to peak to 260mV peak to peak when not using a shielded cable. When the shielded wire was used, and the motors 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 to 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 quad‑copter we tested. This does not completely eliminate frame vibration as a possible source of noise for other multi‑copters. Rubber washers, foam tape, or any other method that would eliminate frame vibration as a noise source are recommend.

Sensor Troubleshooting

Noise Source Cause Solution Comments
Air Turbulence Propeller wash over and around the sensor Mount the sensor as far from the propeller wash as possible. The most typical mounting location is to mount the sensor on bottom of the air frame near the center. Very common issue and sensor mounting position should always be considered.
Propeller Acoustic Noise Propeller noise into the sensor Mount the sensor as far from the propeller wash as possible. The most typical location is to mount the sensor on bottom of the air frame near the center. Very or most common issue and sensor mounting position should always be considered.
Grounding and Power Grounding and Power wiring isn't wired properly Wiring all components in a star Star wiring should always be considered.
Conducted Electrical Noise Conducted electrical noise from other items connected to the same electrical system. Use the Power Supply Filter Common issue and power supply filter is recommended for most users.
Radiated Electrical Noise Radiated electrical noise from other items near the same electrical system Use the Shielded Cable The shielded cable can improve sensor performance. If using the Analog Voltage Range Output from the sensor, the shielded cable is highly recommended.
Frame Vibration Air frame has mechanical vibration that is transmitted to the sensor. Mount the sensor using vibration isolating materials. Use rubber washers or foam.

Recommended Sensors

If you have a powerful quadcopter and would like to range the ground, MaxBotix Inc., 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 MB7267 is recommended for testing.
For 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
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 pin out as the MB1240, making it a perfect drop in replacement. Data‑Sheet Download
The MB7267 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
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 applicaiton. Data‑Sheet Download
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. Data‑Sheet Download

Products Related to the Article


MB1340 XL-MaxSonar-AE4

MB1340 XL-MaxSonar-AE4

The XL‑MaxSonar‑AE4 has the highest noise tolerance and narrowest beam of any of our indoor sensors...

Buy Now

MB1240 XL-MaxSonar-EZ4

MB1240 XL-MaxSonar-EZ4

The XL‑MaxSonar‑EZ4 has the highest noise tolerance and narrowest beam of any of our indoor sensors...

Buy Now

MB1242 I2CXL-MaxSonar-EZ4

The I2CXL-MaxSonar-EZ sensors now feature an I2C bus. This allows for easy I2C integration and multisensor...

Buy Now
Back to blog