Connecting two Arduino's to a single pc


I am currently controlling two LED 16x32 screens. One of the screens is controlled by a Chinese controller BX5-MK1 which I hate to use and wish to replace. Other is currently controlled using Arduino Uno with the DMD library.
I have searched youtube but didn't find anything of such sort. The only thing I found was connecting the Arduinos' themselves and communicating through serial.

Currently, both of these controllers receive data through a python script from a PC they're connected to. They keep count and do a +1 when a specific file appears on the PC.
I really wish to replace the Chinese controller as it's pain to configure and malfunctions a lot.

the problem is, that the PC they're connected to, only has a single USB port (NVIDIA Jetson TX1) meaning I would have to use a splitter but I have no knowledge about splitting the data flow between the two.

Can someone please explain would it be possible to make a python script that switches between the two USB ports? Or the reasonable way to approach this would be to Connect the Arduinos themselves? Also, does the jumper cable length impact this? The cable would have to be ~35cm.

Kind regards, lego.

You can buy something like trendnet-7-port-high-speed-usb-hub-w-power-adapter. Make sure you buy a powered one and that it's USB2.

I'm not a Python person but I'm 99.99% sure that you can open two serial ports in python.

Indeed you can, just create 2 Serial objects, setting one to each port.

I'm guessing the Jumper cable length doesn't impact anything then...?

And could I instead of a powered USB splitter use a 5V PSU and connect both Arduino's to it somehow?

Very thankful for both of your answers, @er_name_not_found, and @sterretje . At least I now know that I could achieve my vision.

For Uno, Mega and Leonardo, you can NOT power them from a 5V PSU and USB at the same time.

Is there a reason why you want to power them from 5V instead of USB?

The mounting point for these LED displays only offers electricity with no outlets. There won't be a place to power the hub with.
Well, the LED screens themselves will get power, but I'm just not sure whether the Arduino's will have sufficient power from the USB splitter with no additional power to it. And I plan to use ~5m USB-A to USB-B cables to connect the Arduino's to the splitter.

The USB hub (not a "splitter") is located at the PC where, presumably you have AC power. A powered hub assures that each port on the hub would be able to provide the 500mA of 5V power specified in the USB spec. If your display is currently running on a PC USB port, then it would continue to work on a USB hub port.

Alternately you could run a pair of 18 Gauge wires from a 5V supply at the PC end in parallel with the USB cables.

Thank you for correcting me!
The Display itself runs on a different PSU. It's in no way connected to the computer.

From what I gather, I could use the 5V or a different PSU for the hub itself bypassing the Arduino powering from AC.

I'm guessing the USB cable length doesn't matter much?

Anyways, I'm very thankful for the answers! Already started developing code for the second arduino :')

That is exactly what a powered hub does.

The USB spec says 5M for USB2, but a little longer is probably OK. How far are you planning?

USB was not designed for long distances; you will have to try it out.

There are USB repeaters if I'm not mistaken; you can do some research.

Powered USB hubs come with their own power supply.

Actually, with most powered USB hubs, including many named "Brands", that becomes completely irrelevant as the 5 V powering the hub is fed directly back to the PC. :face_with_raised_eyebrow:

I'm planning exactly 5m... fingers crossed

Could you please elaborate as to what am I supposed to do with this information?
Is it just a warning or there's something that has to be done to prevent this?

1 Like

The data should not be a problem, but the USB2.0 specification provides that the power wires can be a minimum of 28 Gauge to a maximum of 20 Gauge. If the cable you are using doesn't say what the size of the power wires are, then you have to assume the smaller (28 Gauge).

28 gauge wire has a resistance of .232Ω per Meter, so your 5M cable would have a resistance of 1.16Ω each (+/-) so the total resistance of the cable would be 2.32Ω.

You haven't said what the specifications are for the display you are using, but the USB2.0 spec says that a USB port can provide 500mA. ASSUMING that your displays draw 500mA, 5M of cable will reduce the 5V at the USB port to 4.058V at the display.


In this schematic, R1 is the USB cable resistance (2.32Ω) and R2 is the display resistance (10Ω, based on 500mA @ 5V).

So, if your display can work with 4V, 500mA, then you should be able to power one through the USB cable alone.

That would be a violation of the USB specification:

7.2.1 Classes of Hub Devices:
"No device shall supply (source) current on VBUS at its upstream facing port at any time. From VBUS on its upstream facing port, a device may only draw (sink) current"

Once again, thanks a lot for putting time into your detailed answer. I'll pay attention to the size of the cables during my purchase.

it's a LED matrix is like this one : AliExpressMatrixLink

The display isn't and won't be connected to the USB ports. As I stated before, it has its own PSU and the only connection to it will be from the Arduino using jumper cables. So it shouldn't join the equation at all (?)

Happy to report, that I successfully made two serial connections using python :')

I'm sorry if I misunderstood anything. My knowledge of electronics is very limited :frowning:

You said here that the power will come from the USB cable.

A schematic of how you plan to power the displays would stop us from guessing.

It was my understanding from post #8 that the displays were powered from a separate PSU.

That's why the OP should provide a schematic so that we don't have to guess.


As I stated previously, my knowledge of electronics and developing schematics is poor. I rather not provide potentially wrong information. And my question here was never about powering the displays.
It was about the correct way to approach a dual-arduino setup to control the LED screens themselves.
Anyways, I think my question has been well answered. If I could, I would select each and one of you as the solution. But in my opinion, the answer to my original question was given by the first response I got.

I’m very grateful to everyone who gave their time and resources!
Cheers, lego!