Multiple Ultrasonic Sensors

Hello guys and good day!

I am currently doing the prototyping session of my ultrasonic sensors (HC-SR04) and I used 4 of them (actually, I need to have 5 of these sensors, but I cannot place it all "nicely" on my breadboard), which is being connected to my arduino UNO through a breadboard. I used this method

https://www.google.com.ph/amp/www.instructables.com/id/Hack-an-HC-SR04-to-a-3-pin-sensor/%3Famp_page=true

to save the number of I/O pins to be utilized for my upcoming project, a sumobot . So perhaps you have now the idea what could be other parts I would be using then.

I need to minimize the usage of other I/O pins so I can add different other needed parts.

So what I did was I followed the schematic diagram for each of the 5 sensors, as well as the program. It worked fine and accurate actually to all my sensors, simultaneously, and I settled a threshold of 10cm to light up my LED whenever it reaches down to such distance.

It is indeed working fine the same like how a 4 pin operated ultrasonic sensor does. However, only when it is unmoved or disturbed. Whenever I tilt or change the position of the breadboard(where the M - M jumper wires, and ultrasonic sensors are connected to each other and to arduino), it triggers the LED to turn ON - which should not be happening since there is no object in front of it.

Btw, I used 12V, 800mAH DC Plug adapter for my power source.

I suspect that this might be from the inconsistency of current flow through the wire connections and breadboard as I move the prototype.

And by the way, I just want to use ultrasonic sensors rather than IR proximity sensors for some reasons.

I hope for your response and I do really appreaciate your time and effort of reading this. Thanks!

This is the image address for my set up:

https://scontent.fceb2-1.fna.fbcdn.net/v/t1.15752-9/30739567_1752149521507993_7433713173825323008_n.jpg?_nc_cat=0&oh=8d096a46812c99f052439132005d75a2&oe=5B529D2E

Well, the first thing to do is eliminate

"I suspect that this might be from the inconsistency of current flow through the wire connections and breadboard as I move the prototype."

your suspicions.

Solder the wires so you have a known, solid connection.

Paul

Breadboards are great for prototyping but are prone to have poor connections - like you experienced indeed. When working with them, just don't touch your components while testing (unless the touch IS your test).