SONAR Height Measuring Instrument




About: Hello there,I'm a teenager from India. My hobbies include Electronics and programming,so i decided to get an Instructables account,as it is a great platform to learn and share innovative ideas,hope you like ...

Want To build a PC:


This Project is a height measuring tool which is based on the arduino and of ultra sonic sensing.

Measuring accurate height of any object or product accurately & precisely in industries is very important and crucial to maintain quality and the desired function. This Instrument is based on the above principle; it is user friendly, one just needs to place the object in the box.

Advantages over other measuring tools:

(i)Can Measure Compressible object

While measuring of a compressible or soft object with some common distance or height measuring tools like Venire caliper, screw gauge we get an inappropriate measurement as all of them have jaws which compresses the object.

But in case of SONAR height measuring instrument there are no jaws to compress the object, hence we can accurately measure distance or height of compressible objects in it.

(ii)Doesn’t require special skills:

To measure height of an object with most of the height/ distance measuring tools like Venire caliper, Screw gauge, it requires some special skill and experience to measure the object accurately and precisely. But it is very easy to use SONAR height measuring instrument, all you need to do is place your object in it.

(iii)Increase in precession and accuracy:

Sophisticated Ultra Sonic sensors can be used to measure height of objects more accurately, and lot more precisely, than other common height measuring tools like Venire caliper, screw gauge.


For more information:

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: Material Required

1.A rigid box

Here I've recycled a old shoe box.

2. Electronics Components Used

(i) Arduino UNO:
(ii )HC-SR04 Ultrasonic Sensor:

(iii) LCD Display Screen:

(iv)Jumper Cables:

NOTE: It is highly recommend that,to buy components from my link,as they're sold by reliable dealers and in best price.

(i) Arduino UNO:

The Arduino board actually is a specially designed circuit board for programming and prototyping with Atmel microcontrollers building digital devices and interactive objects that can sense and control objects in the physical world. I’ve used it to calculate the height of the object and to display it on the LCD screen.

(ii )HC-SR04 Ultrasonic Sensor:

The HC-SR04 ultrasonic sensor uses sonar to determine distance to an object like bats or dolphins do. It offers excellent non-contact range detection with high accuracy and stable readings in an easy-to-use package, from 2cm to 400 cm or 1” to 13 feet. It operation is not affected by sunlight or black material like Sharp rangefinders are (although acoustically soft materials like cloth can be difficult to detect). It comes complete with ultrasonic transmitter and receiver module.

(iii) LCD Display Screen:

Here I’ve used a 16X2 LCD display as a medium of interface between the micro controller and the user.

(iv)Jumper Cables:

Step 2: Wiring

As simple as that.

Step 3: Program and Header File

If your Box if not 31 cm tall then look for the height displayed then change 31 to the height displayed,in:

" Height=31-(ultrasonic.Ranging(CM)); "(in the program)

if you are getting irrelevant results check if any wire is lose or not.

version 2.0 :

Cardboard Contest 2017

Participated in the
Cardboard Contest 2017

Microcontroller Contest 2017

Participated in the
Microcontroller Contest 2017

1 Person Made This Project!


  • Made with Math Contest

    Made with Math Contest
  • Multi-Discipline Contest

    Multi-Discipline Contest
  • Robotics Contest

    Robotics Contest

11 Discussions


1 year ago

did you give me the code that u r use in your videos.i have face some problem on code

1 reply

Reply 8 weeks ago

Same.... Height=31-(ultrasonic.Ranging(CM)); bcs has no member named
How to solve it?


Reply 2 years ago

Well,if you're using the linked components and following then instruction properly,then you can turn in on without any hesitation.

yes,I do recommend that to power it up from either the USB port or the DC power jack,rather than powering it from the pins.

If still you face any problem please let me know.



2 years ago

Hello Pratyay can Please send me your contact details so I Can contact you regarding it.

1 reply

Reply 2 years ago

Hey Divyam, first of all it is a very simple project if you follow all the steps properly their is no chance of any kind of problem,even though you could send your doubts in the comment section,so that other viewers could also get their doubts clear.In fact I've also messaged you in your instructables account by which you could contact me.


PratyayM1Pranav Jhunjhunwala

Reply 2 years ago

Thanks,that is a great suggestion,in fact i'm planing to make a video on it as soon as possible.

I've seen your DogBot robot its great.


Thanks buddy for your appreciation,and i'm sorry to acknowledge you so late as my exams were on(unfortunately),and please do vote me for the contests.