Can I use 2 breadboards with an ultrasonic distance sensor on each one?

Hi everyone, this is my first post on the Arduino Forum. I have a question that may seem pretty simple. I am very new to electronic circuits. I have asked this question to a few people but they have no idea. I have an idea for an Arduino project. I just want to make sure that this is possible. I want to use 2 breadboards and 2 ultrasonic sensors. Can I use 2 Ultrasonic sensors for the Arduino at the same time? I want to have a set of LEDs on each breadboard as well. Would this work?
Thanks,

I don't see why not, but I do not know enough about what you want to do to be sure. A diagram and code or more detailed description of the project would help to clear up what you are wanting to do.

Can I use 2 Ultrasonic sensors for the Arduino at the same time?

You can connect any number of US sensors to an Arduino. The NewPing library has an example using 15 HCSR04 sensors.

I it will work. Its kinda like "I have two flashlights can I light them at the same time"

Not trying to be snotty but hoping the simile might give you a better "picture"

There is one caveat, however unlikely it is; if both the ultrasonics are either pointed near each other or their reflection is. If they pulse at the same time, you will get a error. I wouldn't worry about it but keep it in mind if you get some jumbled distances and can't explain.

Can you clarify the "breadboard" you are referring to? Is it the plastic think with rows of holes to push component leads into? If so, they are not designed for even semi-permanent project use, only for project development and testing.
Paul

Okay guys, thanks for trying to answer my question. I want to build a simple "Traffic Light System." This is a very small project. When I am referring to breadboards this is the one I am referring to:


I have attached a picture: Street-Light-Simulator hosted at ImgBB — ImgBB
One sensor will face the north (perpendicular to west-to-east traffic) and one will face the East (Perpendicular to the north-to-south traffic). Each breadboard will have its own set of lights. The sensor will detect if an object is passing and will, therefore, consider it to be "blowing" the red light. And a Piezo Buzzer will beep. I haven't programmed anything yet; however, I have a pretty good idea of how it will be programmed. I'm more of a programming guy, so programming is not an issue. Obviously only one set of traffic lights can be green at a time; therefore, I will program it so it alternates. If I want to use more than one Ultrasonic sensor, I think that I will have to take 2 steps to have 5V of power for both sensors. I will connect 1 wire to the 5V port of the Arduino and then into the (+) port of Breadboard 1. Once I've done that, I will connect one wire into the (+) row of Breadboard 1 and then connect the other end into the (+) port of Breadboard 2 so I can use 5V for the second sensor. Does this make sense? Is this the proper way to have 5V for both sensors?
Thank you very much,

The proper way to power your devices is to provide a 5 volt power supply with enough current for the entire project.
The sensors cannot tell you if something is passing or is stationary, only that it is within its cone of signal and by the echo return, it's distance. Solid objects are good reflectors. People with clothing are sound absorbing. So are furry and feathered animals. You will get some echo, but not a clear/concise echo.
Great learning project!
Paul

Thanks.
I know that it can't detect if an object is "passing" but my goal is to have it detect when an object is in front of it when the red LED is on (the red light). The range would have to be an object that is 12 inches away or less for example. I have 2 very small RC vehicles that I will be using as "solid objects." The sensor will be placed in front of the area that the RC vehicle shouldn't be when the light is red.
I will use a 5V DC power supply for the Arduino Uno, that should be sufficient. Sorry if this next question may sound a bit silly but I am a noob when it comes to electrical circuits.
There is only one 5V port in my Arduino board. How would I supply 5V of power to the Sensors connected to both Breadboards? Am I just overthinking this?
Thanks once again,

david_f:
Thanks.
I know that it can't detect if an object is "passing" but my goal is to have it detect when an object is in front of it when the red LED is on (the red light). The range would have to be an object that is 12 inches away or less for example. I have 2 very small RC vehicles that I will be using as "solid objects." The sensor will be placed in front of the area that the RC vehicle shouldn't be when the light is red.
I will use a 5V DC power supply for the Arduino Uno, that should be sufficient. Sorry if this next question may sound a bit silly but I am a noob when it comes to electrical circuits.
There is only one 5V port in my Arduino board. How would I supply 5V of power to the Sensors connected to both Breadboards? Am I just overthinking this?
Thanks once again,

In your situation, then, connect the 5 volts to the + track on the breadboard unit. Connect the - 5 volts to the - track on the breadboard. Connect the Arduino 5 volt pin to the 5 volt track and also all the stuff and the Arduino ground to the - track on the breadboard unit.
Be sure to set the timeout value to a low number when reading the sensor. Other wise the time out defaults to 1 second and you will not get any echo. Also, the first echo return from the cone of sound from the sensor, so be sure nothing else is closer than your vehicle.
Paul

Yes, I will make sure that nothing else would be in front of the sensor in that range.
Thank you so much Paul,
I really appreciate this,

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.