Measuring Distance Using Ultrasonic Sensor

INTRODUCTION

In this project I’m using an ultrasonic sensor that can precisely measure the distance to show how a beep sound come out when a car is reversed.  You will noticed that when the car is too near to the barrier behind the car, it will give a continuous beep sound. Let’s figure out how it works!  

HARDWARE PREPARATION

This tutorial use :

  1. Maker UNO
  2. Low Cost Ultrasonic Ranging Module
  3. Male to Male Jumper Wire
  4. Micro B USB

You can make the hardware connection based on the diagram and table below.

CONNECTION
Ultrasonic Sensor : VCCMaker UNO: 5V
Ultrasonic Sensor : GNDMaker UNO: GND
Ultrasonic Sensor : TrigMaker UNO: pin 11
Ultrasonic Sensor : EchoMaker UNO : pin 12
Figure 1 : Fritzing connection for ultrasonic with Maker UNO.
Figure 2 : Ultrasonic Sensor

SAMPLE CODE

This is the sample code used for this tutorial. Try it!

Reference

  1. How to Mechatronics

Thank you

Thank you for reading this tutorial and we hope it helps your project development. If you have any technical inquiry, please post at Cytron Technical Forum.

1 thought on “Measuring Distance Using Ultrasonic Sensor”

  1. Muhammad Najmuddin

    Hye, i want to want to make motion detection sensor using micro servo, hc sr04 and maker uno. How i want to make sound whenever there is a object detected?

Leave a Comment

Your email address will not be published.

Share this Tutorial

Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest
Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest

Latest Tutorial

Wire Buzz
Send Sensor’s Data to Adafruit IO Using ESP32
Robotic Arm
Google Assistant Controlled Raspberry Pi GPIO With IFTTT and Particle.io
Program Raspberry Pi With Particle IoT Platform
Scroll to Top