Ultrasonic Sensor with NRF24LE1
Today we are going to interface a very interesting sensor with NRF module.
Have you ever heard bats communicating with each other? We can’t hear them because they use ultrasonic frequency to communicate with each other. Ultrasonic frequencies cannot be heard by human ears. Human can only hear sound between 20 – 20 KHz frequency whereas ultrasonic frequency lies above 20 KHz and expands up to several GHz.
The ultrasonic waves have different travelling speed in air, liquid and gases. In air they usually travel at 340 m/s. They have the tendency to get reflected from a solid surface. Due to this functionality they are used in distance measurement. If the time between transmission and reception is known then the distance of the solid surface form the transmitter can be calculated.
We will use HCSR04 ultrasonic sensor that has transmitter, receiver and control circuit inbuilt. We will interface this sensor with NRF24LE1 using input/output pins.
HCSR04 has 4 pins:
1. VCC – 5V
2. Trig – Trigger input pin
3. Echo – Output pin
4. Gnd – Ground
Some specifications of this sensor are:
· 2cm – 400 cm distance measurement range
· Working frequency – 40Khz
· Uses 10 uS (micro second) Trigger pulse.
· Transmits eight 40khz pulses when triggered
· Receives echo and outputs high pulse with range in proportion to distance.
· 60 mS of delay should be given between next triggering.