And now the distance is calculated by a simple formula discussed above. So, if there is any obstacle then the signal strikes with it and returns back to the receiver. After this process, the module sends eight 40 kHz cycles of ultrasonic sound and checks its reflection. For triggering of module, a pulse is sent for about 10μs. Related Post: Automatic Night Lamp Using ArduinoĪs discussed above, the module works on the ECHO of the sound. And if the signal is received, through high level, the time duration by which the IO trigger stays high is the time from sending to receiving the signal.ĭistance = (Time of High Level x Velocity of Sound in Air (340M/s))/2 Then the sensor module sends eight 40 kHz cycle of ultrasonic sound and detect if the pulse signal is received back or not. Firstly, the IO trigger sends high level signal for 10μs. The sensor consists of Ultrasonic transmitter and Ultrasonic receiver. It is a really accurate sensor, it can measure upto 3mm. This small module is capable of measuring the distance within the range of 2cm – 400cm. The sensor module used here is HC-SR04, which is a non-contact Ultrasonic measurement device. Related Post: Automatic Doorbell with Object Detection By Arduino.We have also connected a 10K potentiometerto control the contrast of the LCD as shown in the circuit diagram. Now connect D4-D7 of LCD to digital pin 5-2 of Arduino. Connect RS and EN pin to digital pin 12 and digital pin 11 of Arduino respectively. Now, we are going to display the distance on a 16×2 LCD which is connected with the Arduino.
0 Comments
Leave a Reply. |