Has anyone tried using simple ultrasonic modules (HC-SR04 / similar) with ArduPilot for basic obstacle detection or landing assistance on multicopters? I found a practical tutorial on interfacing ultrasonic sensors with Arduino that explains wiring and timing https://www.theengineeringprojects.com/2015/02/interfacing-ultrasonic-sensor-arduino.html
I’ve seen Arduino threads and Raspberry Pi hobby projects where people combine multiple ultrasonic sensors or pair them with ESP32s for short-range obstacle sensing, but I’m unsure how well that translates to a flying platform with vibration, changing angles and noise. Has anyone here successfully tuned HC-SR04 or multi-sonar setups with ArduPilot in real flights and what practical tips (mounting, filtering, update rate) would you recommend?
You get what you pay for with those: HC-SR04
$6 worth of avoidance…
I think ultrasonic sensors are a difficult topic for hobbyists ans semi-professionals. Big companies like DJI have the means to exactly measure the ultrasonic noise of their drones and correct their ultrasonic sensors for it. We don’t, it’s always a gamble for us.
We tried using MaxBotix MB1242 sensors at different positions on our drones without much success, the avoidance was always very messy. Note that these sensors were actually marketed as well suited for UAVs.
The best object avoidance option we found so far is radar. It doesn’t need highly expensive modules, either. We have used several XM125 modules by Acconeer with very good results, largely undisturbed by noise or weather conditions. You can buy ready made development modules from Sparkfun for 50-60$ (More that a HC-SR04, but about the same price as a “good” ultrasonic module, like the MB1242). Unfortunately , they’re not yet supported by Ardupilot (or are they?), so you need some microcontroller in between which turns the distance signals into MAVLink DISTANCE_SENSOR messages. You need to put some work in to get started, but you avoid a lot of headache that the ultrasonic solution might cause you.