HC Sr04
HC Sr04
triggered and starts a timer. Ultrasonic pulses travel outward until they encounter
an object, The object causes the the wave to be reflected back towards the unit.
The ultrasonic receiver would detect the reflected wave and stop the stop timer.
The velocity of the ultrasonic burst is 340m/sec. in air. Based on the number of
counts by the timer, the distance can be calculated between the object and
distance, and R is the propagation velocity (Rate) in air (speed of sound) and T
2. Product Features
Features
� Stable performance (Xtal.)
� Accurate distance measurement
� High-density SMD Board
� Close Range (2cm)
Uses
� Robotics barrier
� Object distance measurement
� Level detection
� Security systems
� Vehicle detection/avoidance
1
3. Product Views
FRONT BACK
1 4 4 1
5. Electrical Specifications
WARARNING
Do Not connect Module with Power Applied! Always apply power after connecting
Connect "GND" Terminal first
2
6. Module Operation
Set Trig and Echo Low to initalize module. Place a minimum 10us High
level pulse to "Trigger" (module will automatically send eight 40KHz acoustic
bursts). At the same time, Gate the microcontroller timer to start timing.
Wait to capture the rising edge output of ECHO port to stop the timer. Now
read the time of the counter, which is the ultrasonic propagation time in the air.
velocity (Speed of Sound in air 340m/sec) / 2, you can calculate the distance to
the obstacle.
For best results and maximum range, the Object should be larger than 0.5M2
the nearer the target object, the smaller it may be
3
7. ModuleTiming
>50us
--10us--
Trigger
~~
40KHz
Acoustic
~~
Burst 8x40KHz
40KHz
Reflected
~~
~~
Signal
~~
Output of
ECHO Pin
Propagation Delay ~~
Dependent on Distance