Thanks to Tom Bonar from Maxbotics for passing on this new post on how the best use their sonar sensors with mutlicopters.
MaxBotix 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.
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-EZsensors 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.
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.
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 noise 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.
The graph above shows the signal coming from a sensor on a multi-copter that has an unstable power supply.
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!
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 quadcopter we tested. This does not eliminate frame vibration might as a 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.
If you have a powerful quadcopter and would like to range the ground, MaxBotix Inc., recommends theMB1340, or the MB1240 XL-MaxSonar-EZ sensors. If you prefer using the I2C output, the recommended sensor is the MB1242.
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.
Hi, I'm using a sonar MaxBotix MB1240 in a wing,
I built the electrical noise filter as recommended in the forum and I still have errors with sonar.
The sonar reads erroneously 0.43m when the barometric reading is 43m, and affects the automatic landings.
Anyone have any suggestions for my problem soucionar. Thank you.
MaxBotix Inc., would like to also include Randy McKay and Chris Anderson for all their work incorporating our sensors with the DIY Drones community.. If we have forgotten anyone, for the work or information regarding the implementation of our sensors, we apologize for the oversight and would like to thank you. We look forward to the continued support of this community
And lets not forget Randy for developing the I2C library which hopefully we can put to use soon. Having a digital feedback will be nice, and could also possibly allow use of multiple sensors for collision avoidance.
MaxBotix Inc., would like to extend a special thank you to R_Lefebvre and Keyur who were instrumental in the testing of our senses during our project. R_Lefebvre provided valuable test data from his location and Keyur provided his quad for testing at our facility. Thanks again for your assistance to MaxBotix Inc., in compiling this report.
Technical Support & Sales
I'm still waiting to try the 1340 out on my big heli. Hopefully it still works. But I haven't had it flyable since this project started. Actually crashed it for the last time just a week before I got the sensors. :(
Chris, This could be very useful info under the Arducopter wiki pages. "additional sonar info" under the sonar page. Or just add a link.
I pretty much agree Robert, I've actually thought the cone was a little wider than I wanted anyway.
I have had pretty good luck with the EZO 1200 on my Flamewheel with the filter, but the graph is still not very clean.
I'll switch to the 1340 when I can.
Yes, I used the power filter, and most of the time was using a linear regulator anyway, which has a cleaner voltage than a switching BEC. I used shielded wire, I tried the sensor heater, extreme vibration damping, everything.
In fact, IIRC, the 1200 and 1320 tested there were prepared by Maxbotix engineers specifically to make sure I wasn't doing something wrong. And that's all done on the exact same machine, close to back-to-back.
The narrower field of the 1340... well if it's a problem, it's that or nothing for me. The other ones are simply unusable. If the the 1340 doesn't serve a useful purpose, then there's no point having anything.
For me, it is useful for simple ground detection. Not nap-of-the-earth flying, but landings, basically. That's what I want.
And Robert your results are compelling, I know the narrower field of view of the 1340 can be problematic because it might miss what you are looking for, but it sure looks clean.
Were you using the recommended power supply filter on it?
And 3DR you need to start carrying the MB1340.
And it needs to be added to the APM as an option.