Ultrasonic Sonic Sensor
How it Works
The Ultrasonic Sensor is an electronic device that converts the ultrasonic sound wave into an electric signal. The HC SR04 sensor module consists of an ultrasonic transmitter, a receiver, and a control circuit. When it is triggered by a HIGH-LOW pulse at the ‘Trig’ pin, the transmitter emits a sonic burst of 8 pulses( 40 kHz ultrasonic frequency). These pulses when hit by an object, get reflected and received by the sensor(receiver). The control system process these pulses and sends them to the ‘Echo’ pin. Which further can be read by a microcontroller.
Specifications
- Working Voltage : 5V DC
- Working Current : 15 mA
- Working Frequency : 40kHz
- Max Range : 400 cm
- Min Range : 2 cm
- Measurement Angle : 15 Deg
- Trigger Input Signal : 10 uS TTL Pulse
- Dimensions : 45*20*15 mm
- Echo, Output Signal : Input TTL Level Signal
Steps for an Operation
- Set the trigger pulse to HIGH for 10 Microseconds and then set it LOW (Negative Trigger).
- The Module gets triggered and emits 8 continuous pulses at 40 kHz frequency.
- After triggering is done, start the timer on the microcontroller.
- The Module waits for the echo signal (Measurement cycle should be over 60 milliseconds to prevent Trigger signal to the echo signal).
- When the receiver detects the echo pulse, it sends these pulses to the echo pin of the module.
- When the microcontroller detects the high pulse at the echo pin, stop the timer.
- The time measured by the microcontroller is two times the time when pulses hit the object. So, the actual time is calculated by the measured time divided by two.
Distance Caculations
Velocity of Ultrasonic Sound
Velocity of sound depends upon the environmental temperature, therefore can be calculated using Steinhart Equation-
Here- T is a temperature in deg centigrade. Let say the atmospheric temperature is 30 deg then the velocity of sound(ultrasonic) would be:-
Now the distance of an object can be calculatedas:-
Applications of Ultrasonic Sensor
- Distance Measurement.
- RADAR ( RAdio Detaion And Ranging).
- Obstacle Detection.
- Path Finder.
- Anti-collision Detection.
- Liquid Level Measurement ( water, petrol,.. etc.).
- Robotic Sensing.
- Vehicle Detection for a car wash.
- Contouring Or Profiling Using Ultrasonic System.
- Positioning and Locating.