Ultrasonic Sensor Distance Measure

Introduction: Ultrasonic Sensor Distance Measure

About: I am a Student who loves to create Robots

Dear Friends,

I have made a distance measure using ultrasonic sensor with 16*2 LCD display, This ultrasonic measures distance in centimetre and shows the distance in LCD screen. When we put any object on the ultrasonic sensor it just displays distance of the object how far it's from the ultrasonic sensor .


  • Arduino Uno R3
  • LCD 16*2
  • 250 k(ohms) Potentionmeter
  • 220 (ohms) Resistor
  • Ultrasonic Sensor

Step 1: Circuit Diagram

  • .
  • I have used 3 pin ultrasonic sensor(ping), I have connected GND to ardiuno GND, 5v to arduino 5v and sig to arduino 7 pin.
  • I have connected LCD, Potentionmeter and resistor to arduino using bread board.
  • I have used potientionmeter to control the brightness of the LCD display.
  • I have also used resistor to control the current of the lcd

Step 2: Programming

In the code I have wrote LCD library and after that I wrote sig pin of ultrasonic sensor. In void setup I wrote down the LCD begin and print. In void loop I have wrote the cursor on the 2nd line in LCD as "dist = " and down I have wrote the ultrasonic sensor code and set cursor at (8,1) and wrote cm which display measure and continued to finish the code

Please find below the link for my tinkercad project.


Arduino Contest 2020

Participated in the
Arduino Contest 2020

Be the First to Share


    • Make It Bridge

      Make It Bridge
    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • Big and Small Contest

      Big and Small Contest



    1 year ago on Step 2

    very nice
    Is it possible with CM, Inch, mm, ft?
    And what is the maximum distance covered , + / - tolerance.

    Sujal Suhaas
    Sujal Suhaas

    Reply 1 year ago

    Yes it is possible to change the units and the maximum distance covered will 4 meters