Ultrasonic Sensor Distance Measure
by Sujal Suhaas in Circuits > Arduino
827 Views, 6 Favorites, 0 Comments
Ultrasonic Sensor Distance Measure
Dear Friends,
I have made a distance measure using ultrasonic sensor with 16*2 LCD display, This ultrasonic measures distance in centimetre and shows the distance in LCD screen. When we put any object on the ultrasonic sensor it just displays distance of the object how far it's from the ultrasonic sensor .
Supplies
- Arduino Uno R3
- LCD 16*2
- 250 k(ohms) Potentionmeter
- 220 (ohms) Resistor
- Ultrasonic Sensor
Circuit Diagram
- .
- I have used 3 pin ultrasonic sensor(ping), I have connected GND to ardiuno GND, 5v to arduino 5v and sig to arduino 7 pin.
- I have connected LCD, Potentionmeter and resistor to arduino using bread board.
- I have used potientionmeter to control the brightness of the LCD display.
- I have also used resistor to control the current of the lcd
Programming
In the code I have wrote LCD library and after that I wrote sig pin of ultrasonic sensor. In void setup I wrote down the LCD begin and print. In void loop I have wrote the cursor on the 2nd line in LCD as "dist = " and down I have wrote the ultrasonic sensor code and set cursor at (8,1) and wrote cm which display measure and continued to finish the code
Please find below the link for my tinkercad project.
https://www.tinkercad.com/things/7irLLkOjlJG-sujaldistmeasure/editel