
Ultrasonic Sensor
HC-SR04 ultrasonic distance sensor, 2-400 cm range
The standard distance sensor for robotics and automation. It sends an ultrasonic pulse and times the echo, giving distance in centimetres with roughly 3 mm resolution. Works in complete darkness and is unaffected by surface colour, which is where infrared sensors fail. Two limitations to plan around: soft materials like fabric and foam absorb the pulse and read poorly, and angled surfaces can deflect the echo away from the receiver. For obstacle avoidance and tank level measurement it is hard to beat at this price. Reliable distance measurement in total darkness; Unaffected by target colour or ambient light; Only two pins needed, trigger and echo; Well supported by the NewPing and standard libraries
Highlights
HC-SR04 ultrasonic distance sensor, 2-400 cm range



