5% OFF Over $19, Code: Elephant5; 10% OFF Over $59, Code: Elephant10

EASY plug Ultimate Starter Learning Kit Project 19: Ultrasonic ranging

Posted by Fiona Su on

The distance sensors are really commonly seen in robotics projects. So in this project we will measure the distance with an ultrasound sensor.
Component Required

  • EASY plug control board*1
  • EASY plug SR01 Ultrasonic *1
  • EASY plug LED module *1
  • RJ11 cable *2
  • USB cable *1

Component Introduction

EASY plug SR01 Ultrasonic Module
This EASY Plug SR01 Ultrasonic module includes ultrasonic transmitter, receiver and corresponding control circuit.
It should be connected to the double digital interface with only one line, which is very convenient. The distance sensor are really common in robotics projects, very useful for automation, interactive art and motion sensing.
The module comes with four fixed holes, so that can easily fix it on other devices, such as the servo plastic platform and so on.

  • Operating Voltage: DC 5V
  • Operating Current: 15mA
  • Operating Frequency: 40KHz
  • Max Range: 3--5m
  • Min Range: 2cm
  • Measuring Angle: 15 degree
  • Trigger Input Signal: 10µS TTL pulse
  • Interface:double digital

Connect It Up
Connect the EASY Plug Ultrasonic module to control board using an RJ11 cable.


Upload the Code


What You Should See
Done uploading the code, open the serial monitor and set the baud rate to 9600. You should see the measured distance between the ultrasonic sensor and front obstacle.



Turn on Light

When the measured distance between an obstacle and ultrasonic sensor is less than a certain range, turn the led on.
Hookup Guide


Test Code


What You Should See
Upload success, when the measured distance is less than 30, the LED will be turned on. Otherwise, the LED is turned off.


Little Knowledge:
You can modify the setting distance in the code here, so that turn on or off led according to the obstacle distance measured by ultrasonic sensor.


All Tutorials

Buy >> EASY plug Ultimate Starter Learning Kit 


Leave a comment

Please note, comments must be approved before they are published