Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

Measuring distance with Arduino and ultrasonic sensor

Ultrasonic sensors are great devices to measure small distances without using tape or other tools. They can be used in automation projects, flying models, robots. If you can measure distance to obstacle, you can do lots of fun things. Jan_Henrik shared his small rangefinder setup where he uses Arduino, 20×4 LCD screen and ultrasonic sensor HC-SR04. Interfacing thissensor is simple – one pin is for sending trigger signal and second is for reading echo response. Microcontroller has to calculate distance by measuring time between pulses.


Sensor is able to measure up to 500cm distances with up to 0.3cm resolution. You can play with LCD where you can see measured distance, but probably this is more fun to build responsive system where it s behavior depends on measured distance.

[..Source link..]

Bookmark the permalink.

Comments are closed.