Ultrasonic range finder using arduino
Ultrasonic range finder using 8051 mictrocontroller has been already published by me in this website. This time it is an ultrasonic range finder using arduino. HC-SR04 ultrasonic range finder module is used as the sensor here. The display consists of a three digit multiplexed seven segment display. This range finder can measure up to 200 cm and has an accuracy of 1cm. There is an option for displaying the distance in inch also. Typical applications of this range finder are parking sensors, obstacle warning system, level controllers, terrain monitoring devices etc. Lets have a look at the HC-SR04 ultrasonic module first.
HC SR04 ultrasonic module.
HC SR04 is an ultrasonic range finding module with an accuracy of 0.3cm. The sensing range of this module is from 2cm to 5 meter. Working current of this sensor is 15mA and the measuring angle is 15°. The photograph of front and back side of the HC-SR04 sensor is shown in the figure above.
HC-SR04 has four pins. Their names and functions are explained below.
- Vcc: 5V supply voltage is given to this pin.
- Trigger: A 10uS long pulse is given to this pin for triggering the transmission. Upon receiving a valid trigger pulse, the HR-SR04 issues eight 40KHz pulses. Time taken by these pulses to reflect back is measured and the distance is calculated from it.
- Echo: At this pin the HC-SR04 outputs a signal whose high time is proportional to the range.
- Ground : Ground is connected to this pin.
JLCPCB – Prototype 10 PCBs for $2 + 2 days Lead Time
China’s Largest PCB Prototype Enterprise, 300,000+ Customers & 10,000+ Online Orders Per Day
Inside a huge PCB factory: https://www.youtube.com/watch?v=_XCznQFV-Mw