Providing Smart Technology Solutions

Distance between Ultrasonic Module and Micro-Controller

Recently I faced a situation in which I had to separate my ultrasonic module from my microcontroller. The problem was that how to determine the length of the wire to connect the 2 pieces. I searched on internet but didn’t found any solution. So, I decided to experiment myself.




In this article I will not be describing about the connection or the program, but only with the type of connecting wires which can be used. You can refer my earlier post on The Distance Meter Using Sonar.

As you know that the ultrasonic module requires pulses to operate in addition to the fixed 5 volt power supply, it become a problem for me to choose the proper wire. It was clear to me that the wire should have minimum resistance, should be shielded and contains at least 5 wires in it (because my module requires 5 connections.)

The image below will remind you the signal travelling through the wires. The following is for ping sensor, but is applicable for other ultrasonic sensors also like DYP-ME 007 which I used here.

Signalling Diagram

Signalling Diagram


The tIN-MAX is very important as it will be helpful in calculating the distance. Thus we have to protect it from the external noise for gaining much accuracy.

So, we can either use a normal wire or a lan cable. First I would like to describe my experiment in which I used a normal wire to connect the 2 things and they worked amazingly well.

I had a long very old cable used for wiring in houses (at 230volt AC.) I took 4 cables of about 5 meters of length and used it for the connection. The cable is 8 to 10 years old having lots of joints and cuts in between them. When I tested it, I found that it was giving accurate readings without any errors. It was very amazing to me as I never expected it to work so well. So, decided to increase the length and observe the results. I added 2 pairs of same cable of 6 meters to the previous cable. Now, the length increased to 11 meters. Again I tested and found that the readings are proper.

The resistance of the cable was 2.5 ohms for 5 meters.

Now I would like to talk about the lan cable generally known as CAT – 5 or Category – 5 cable, normally used in the internet connection. The cable has 4 pairs of twisted wire and commonly used in Ethernet and computer networks. It performs well up to 100MHz (as provided on the Wikipedia).

The chart below is taken from Wikipedia which shows some physical properties of CAT-5.


Characteristics of CAT-5 Cable.

Characteristics of CAT-5 Cable.


The resistance is low and a longer length of wire could be used.

So, the result is that if the distance between the microcontroller and the module is less i.e something less than or around 10 meters, than normal wire can be used. But is the distance is greater like 50 meters or so, than lan wire should be used. After all, the length of cable is a factor determining the cost of the project. A normal wire in India costs about 6 rupees per meter and a lan cable costs 20 rupees per meter. Just 3 times!

Hope you enjoyed my post and the information in it will be beneficial for you.



Leave a Reply...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


This entry was posted on March 24, 2013 by in Uncategorized.

Physical Computing Mini-Projects


fun and learning with electronics


Providing Smart Technology Solutions

%d bloggers like this: