The HC-SR04 ultrasonic sensor uses sonar to determine distance to an object - just like bats or dolphins do.
This module offers excellent range accuracy and stable readings in an easy-to-use package. It operation is not affected by sunlight or black material (although acoustically soft materials like cloth can be difficult to detect). Similar in performance to the SRF005 but with the low-price of a Sharp infrared sensor.
Perfect for collision avoidance on your next robotics or multirotor project!
Spec: Power: 5V DC Quiescent Current : <2mA Effectual Angle: <15° Ranging Distance : 2cm – 500 cm/1" - 16ft Resolution : 0.3 cm LxWxH: 45 x 20 x 15mm Weight: 8.5g
Includes: Ultrasonic Module 1 x Terminated ribbon cable 200mm
This verion has 4 wires: positive, ground, trigger, and eco. You power it up, feed a pulse on the trigger, an wait for a pulse in the eco pin. The eco width in microseconds is the time it took the audio to go to the object and come back. I didn't find specs about the 3 pin interface, but I think it will be the same, just need to use a 3-state output to do the trigger and read after that on the same pin.
It's precise within 2 or 3 cm, from 5 meter to 2 cm. Precition is better when you're reading closer to the object. If you can program the quad controller to take the reading of distance to floor at startup, and use that value as you reference for landing, it will work ok. Just remember that you need to filter out the readings, not with an average, but discarding values that are way off the last few readings.
Clen pcb, clean soldering, not expansive at all. However, the value readings i have here ( maybe it is my program, don't know yet)are not enough stable to use it for on-board distance mesures, especially during obstacle avoidance calculations.