This Ultrasonic Sensor can be interface with 5V logic microcontroller boards like Arduino, AVR, PIC, 8051 etc. Ultrasonic Sensor is very popular module for interfacing with microcontroller for range detection of an object.
This module helps you how to deal with basic electronics component in your project. The Module automatically sends 40kHz frequency 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. Ultrasonic sensors transmit ultrasonic waves from its sensor head and receives the ultrasonic waves reflected by the object in in the way. By measuring the length of time from the transmission to reception of the sonic wave, it detects the position of the object.
First Connect 5v DC Power Supply to power up Ultrasonic Sensor module.
Connect Trig and Echo to your pins of microcontroller.
The Timing diagram is shown below. You only need to supply a short 10uS pulse to the trigger input to start the ranging, and then the module will send out an 8 cycle burst of ultrasound at 40 kHz and raise its echo. The Echo is a distance object that is pulse width and the range in proportion .
You can calculate the range through the time interval between sending trigger signal and receiving echo signal. Formula: uS / 58 = centimeters or uS / 148 =inch; or: the range = high level time * velocity (340M/S) / 2; we suggest to use over 60ms measurement cycle, in order to prevent trigger signal to the echo signal.
4 PINs Vcc, GND, ECHO, TRIG.
Ultrasonic ranging module HC - SR04 provides 2cm-400cm
Non-contact measurement function.
Ranging accuracy can reach to 3mm.
Using IO trigger for at least 10us high level signal.
The Module automatically sends eight 40kHz and detect whether there is a pulse signal back.