Distance on LCD display using Arduino and HC-SR04 Ultrasonic Sensor
Distance On LCD
In this blog the distance measured by the Ultrasonic Sensor is Displayed on the LCD display using Arduino.
Ultrasonic Sensor (HC-SR04)
Ultrasonic ranging module HC - SR04 provides 2cm - 400cm non- contact measurement function, the ranging accuracy can reach to 3mm. The modules includes ultrasonic transmitter, receiver and control circuit.
The basic Principle of work:
- Using IO trigger for at least 10us high level signal.
- The Module automatically sends eight 40 kHz and detect whether there is a pulse signal back.
- IF the signal back, through high level, time of high output IO duration is the time from sending ultrasonic to returning.
velocity of sound = 340 m/s
Wire connections for the Module
Complete circuit |
The module have 4 pins :
- VCC power supply
- Trigger Pulse Input
- Echo Pulse Output
- Ground 0V
Connection with Arduino
- Connect Vcc to 5 V power supply from Arduino
- Connect Trigger pin to pin no 8 of Arduino
- Connect Echo pin to pin no 9 of Arduino
- Connect Ground to Ground of Arduino
Distance on the LCD:
Code for the Arduino, LCD and Module Interface
For the self Explanatory Elaborated Code click Here
In this only The module is added rest is same as the LCD display.
So if You have no Read LCD Arduino Interface click on link below.
For LCD interface with Arduino Click Here.
Here is a video
Feedback
Is the material helpful. Please provide Feedback in the comments.
For more help for your concerned project comment in the comment box.
Comments
Post a Comment