SRF05 Ultrasonic Module Features
SRF05 is an ultrasonic transmitter and receiver module used to measure distance. The sensor operation is very simple. You only need to measure the return time of ultrasonic waves in order to measure the distance. Then you should divide measured time by 2 and multiply by the sound speed. The sensor measuring range is about 2 to 400 cm.
You can download the datasheet of this module here.
SRF05 Ultrasonic Module Pinout
This sensor has 3 pins:
- VIN: Module power supply – 5 V
- GND: Ground
- Trig: A 10 microseconds pulse is required for ultrasonic transmitter to start working
- Eco: Shows the waves travel time as pulses.
Interfacing SRF05 Ultrasonic Distance Module with Arduino
Step 1: Circuit
Step 2: Code
Upload the following code to Arduino. This code displays the sensor’s data in the serial monitor.
/* SRF005 Ultrasonic Sensor modified on 22 Sep 2020 by Mohammad Reza Akbari @ Electropeak