Ultrasonic Sensor Range Finder

About: I'm mechanical engineering student

Introduction: Ultrasonic Range Finder Using Arduino. Ultrasonic Range Finder is a simple method of calculating distance from an obstacle from a distance without any physical contact. It employs an ultrasonic distance sensor which uses sound pulses to measure distance.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: HC Sr04 (ultrasonic Sensor)

What Is Sensor ?

A sensor is a device, module, or subsystem whose purpose is to detect events or changes in its environment and send the information to other electronics

Types of Sensors

1.The most frequently used different types of sensors are classified based on the quantities such as

2.Electric current or Potential or Magnetic or Radio sensors

3.Humidity sensor

4.Fluid velocity or Flow sensors

5.Pressure sensors

6.Thermal or Heat or Temperature sensors

7.Proximity sensors

8.Optical sensors

9.Position sensors


An Ultrasonic sensor is a device that can measure the distance to an object by using sound waves. It measures distance by sending out a sound wave at a specific frequency and listening for that sound wave to bounce back.

Step 2: Bill of Materials

1.Arduino Uno

2.Ultrasonic sensor - HC sr04

3.Batterys 3.7V



6.Jumper cables

Step 3: Schematics and Connection


1.trig PIN to PIN 12

2.echo PIN to PIN 11

3.LED (+ve) to PIN 7

4.Connect Battery (+ve to VCC , -ve to GND)

Step 4: Code

1.Install ultrasonic libraries

CLICK HERE for librarie

2.Upload The code

CLICK HERE for code

Step 5: !!!! Hope You Enjoy This Instructables!!!!!

Arduino Contest 2017

Participated in the
Arduino Contest 2017

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest



    1 year ago


    Great project ! with nice code.

    I'm not a C++ programmer but your code seems to be non blocking Function.

    Is it the case ?