multiple arduinos at the same time

Hi all

searched the internet but no luck so far.

for a project i need multiple arduinos to be connected to a PC. (10+)
setup goes like this

PC with one USB port goes to a box with a USB hub
this need to split to about 10 ports
each port goes to an arduino nano

on the PC i have software running to control all of them, signals will be given to a specific COM port.

question one, is there any limit on how many arduinos i can connect to a single PC?
question two, can i somehow lock the com port usage?
the PC needs to know what arduino on what port number, even if i removed the main USB cable and re-plug the hub. the pc needs to set it to the old usb port.

Note: power draw from USB is not an issue, the arduinos will be externally powered.

With kind regards
Robbert

question one, is there any limit on how many arduinos i can connect to a single PC?

The number of ports that is supported by the PCs operating system. Further no idea :wink:

question two, can i somehow lock the com port usage?

Not to my knowledge. You can however let each Arduino identify itself with a unique ID. Your PC application can request data on each com port and if it has an Arduino connected, it can know which Arduino it is.

E.g.
to com3: "who is there"
from com3: "number 5"
to com4: "who is there"
from com4: "number 1"

etc

OMG this is right up my street LOL

You are only limited by the amount of hubs yo can attach.
Currently I have 2 x 10 port and 2 x 7 ports
They should all have thier very own PSU that is capable of supporting the max load per port (500mA per port)
If the PSU is insufficient boards will randomly drop out of view.

In windows you can lock the ports but I don't recommend it from experience.
Some types of board need to be able to create a second COM port and if that conflicts with a locked port you will have problems uploading.

Some boards will also try to default to a lower port and again if that is locked then you will again have issues.

Currently have 18 live devices all mixed boards.

EDIT...Windows can have a "wandering COM port" issue and I suspect that is part of your reason for asking about locking ports.

Be also aware that almost any version of windows can get a little glitchy in the region of COM 30 / 35.
Best way to help mitigate that is to clear the COM stack completely before introducing boards one at a time. This seem to help and bed down a device to a com port without resorting to locking them.

Introduce a board and use it for a couple of test uploads and then introduce the next...etc.
With any luck you should find you end up with a set of stable ports.
AT least that has been my finding here.

1 Like

Be interested to know a bit more about the project

its for a massive Christmas display NEXT YEAR.

this takes a lot of addressable pixels. arduino is limited to 300 pixels.
daisy chaining is not the best option.
its all outdoor so if one led failes it all failes. (wind, snow and rain)

i had no luck on splitting pixel strips over multiple output pins.

so i would like to use one arduino for each part of the display.
one central controller with multiple arduinos build in can be wired to the parts they control.

this way the arduino is not overloaded and doesnt slow down.
short circuit or failing leds will not stop the rest from functioning

I'd guess that your 300 pixel limitation is due to available RAM. It might be easier to solve your problem with something faster and with more memory e.g. a Teensy.

wildbill:
I'd guess that your 300 pixel limitation is due to available RAM. It might be easier to solve your problem with something faster and with more memory e.g. a Teensy.

true. but i am talking about 10-20k led pixels.
with a teensy i can use a lot more but i have to daisy chain everything.

pixel grids and pixel trees definitely needs more ram. but most parts dont take more then 100-200 pixels.

arduino nano is pretty cheap, about 2 euros so i can use a lot for cheap.
this way its all separated

i am planning this for years now. but never actually started with the project.

until this year.
next year will be the first so i have to do a lot of preparations.

close to where i live is a guy who has done this for the last 10 years but this is his last year.

this pushed me over the edge and continue his annual christmas light show.

i will meet him tonight again and see what parts i can take over like the arches, tree and grid.

update:- YouTube

I might be tempted to use ESP's to cover a little more address space and easier functionality maybe even avoiding the COM part.
Giving both speed and memory a boost.

today i made a prototype with a wemos d1 (esp8266)

controlled by vixen over e131 uni cast.

works like a charm. this way i can give each strip his own controller and
only use mega's for the dimmer packs, then i can reduce to 2-3 COM ports.
Maybe even hook them up to a wemos as well.

also i will use a separate router with locked ip adresses.

thanks for the tip ballscrewbob. that exactly what i need haha

LOL bonus all round...
Glad to be of help.