Sunday 12 July 2015

Ultrasonic Distance Sensor HC-SR04 Interfacing with 8051

          In this tutorial you will learn how to interface Ultrasonic Distance Measurement Sensor with AT89S52. Ultrasonic ranging module HC - SR04 provides 2cm - 400cm non-contact measurement function.the ranging accuracy can reach to 3mm. The modules includes ultrasonic transmitters, receiver and control circuit.I also Provide you complete Project code you can download it from the bottom of the page.

Now working of HC-SR04 as follow:

  1. Send 10us HIGH pulse on TRIG pin of HC-SR04.
  2. The sensor sends out a “sonic burst” of 8 cycles.and detect whether there is a pulse signal back.If there is an obstacle in-front of the module, it will reflect the ultrasonic burst.
  3. If the signal is back, ECHO output of the sensor will be in HIGH state (5V) for a duration of time taken for sending and receiving ultrasonic burst. Pulse width ranges from about 150μS to 25mS and if no obstacle is detected, the echo pulse width will be about 38ms.