Suggestions if you need more than 4 USB ports?

I've decided to change my design from wireless to wired due to the problems I've been having with connectivity.

With that being said, I have 6 sensors that need to go to either a central Arduino or Pi for analyses. What can I do since I have more sensors than USB ports?

Thanks

"What can I do since I have more sensors than USB ports?"

USB hubs?

I thought about that, but how does that work in terms of COM numbers...does the data go all into one stream or is it still seperate?

Each USB device plugged into the hub will be allocated its own unique COM port number, Are you really contemplating using 6 separate Arduinos, one per sensor ?

What type of sensors are they ?

UKHeliBob:
Each USB device plugged into the hub will be allocated its own unique COM port number, Are you really contemplating using 6 separate Arduinos, one per sensor ?

What type of sensors are they ?

UKHeliBob, Thanks for your reply.

To answer your first question, it is a PIR Motion sensor so I am not sure how to convert that to USB, so I was using an Arduinio w/jumper wires to the sensor, then to the HUB.

May I ask what you think of this? Would this work? It will be operating outside in extreme temperatures, so I need something durable.
https://buy.advantech-bb.com/USB/USB-Hubs/model-BB-USH207.htm

it is a PIR Motion sensor so I am not sure how to convert that to USB, so I was using an Arduinio w/jumper wires to the sensor, then to the HUB.

Are you going to use 6 of the same sensors ? Please provide a link to those being used

How far apart will the sensors be ?

May I ask what you think of this?

It looks ridiculously over specified and expensive for what you appear to need with the amount of detail that you have provided so far

UKHeliBob:
Are you going to use 6 of the same sensors ? Please provide a link to those being used

How far apart will the sensors be ?
It looks ridiculously over specified and expensive for what you appear to need with the amount of detail that you have provided so far

Sorry, allow me to be more specific. Each Arduino will have two sensors:

PIR Motion Sensor:

Ultrasonic Sensor:

Arduino's will be 5 feet apart from one another facing different angles sort of in a circle if you will. Ideally, yes, I'd rather not have to buy an Arduino per 'node'. It would save me money.

UKHeliBob, might I also ask you, am I correct in understanding that regardless of what USB Hub I purchase, I will need a USB host shield if I wish to connect the hub to a Master Arduino for input?

mydogcooperisapita:
PIR Motion Sensor:

Ultrasonic Sensor:

These sensors don't use a USB connection. They just connect to the digital I/O pins on an Arduino.

Where has the idea come from that you need many USB ports?

If you mean that you plan to use more than 4 Arduinos all connected to the same PC then it might be worth considering getting the Arduinos to send messages to a central Arduino which then passes them on to the PC. That way there is only one Arduino connected to the PC.

...R

Robin2:
If you mean that you plan to use more than 4 Arduinos all connected to the same PC then it might be worth considering getting the Arduinos to send messages to a central Arduino which then passes them on to the PC. That way there is only one Arduino connected to the PC.

Still might be a lot easier - and cheaper - to use a USB hub and ready-made USB cables.

If you can figure how to access one COM port on the PC with your application program, then you can just as easily figure how to access six. :roll_eyes:

UKHeliBob:
Each USB device plugged into the hub will be allocated its own unique COM port number...

... depending of the quality of the USB-UART.
The infame CH340 are all produced with the same ID's. Depending on when you plug what where, you will get completely different UART numbers.

Paul__B:
Still might be a lot easier - and cheaper - to use a USB hub and ready-made USB cables.

If you can figure how to access one COM port on the PC with your application program, then you can just as easily figure how to access six. :roll_eyes:

But anyhow do not rely on a COM number or a /dev/ttyxxx device name!

IMHO, if you are plugging anyhow all the devices into a USB-Port then they more or less located at the same place, you should be able to process all the device inputs from a single Arduino...

If you mean that you plan to use more than 4 Arduinos all connected to the same PC then it might be worth considering getting the Arduinos to send messages to a central Arduino which then passes them on to the PC. That way there is only one Arduino connected to the PC.

Robin,
That’s exactly what I’m trying to do. Have all 6 sensors go to one arduino or Pi called the master. The master will be the only one to communicate with the LCD screen. The issue is the best way to get those 6 into one master. The consensus seems to be a USB hub.

The issue is the best way to get those 6 into one master. The consensus seems to be a USB hub.

No it isn't. It was your suggestion that you needed 6 USB connections and hence a hub was suggested. Forget too about the need for a USB host shield

From the little that you have said so far it appears that you could connect all 6 sensors directly to one Arduino and even have that Arduino drive the LCD screen. The only real issue with that would seem to be the length of the cables to the sensors

HeliBob,
Thanks for your continued help. Would you be kind enough to tell me the benefits of connecting all to one arduino and not a hub? Besides price, that is. Also, if I did it your way, how would I power all 6 sensors with only one 5v pin on a mega?

Would you be kind enough to tell me the benefits of connecting all to one arduino and not a hub?

I still don't understand how you think that you are going to connect the 6 sensors to a USB hub in the first place. The main advantage of connecting all of the sensors and LCD to a single Mega is that there is no need to communicate between multiple devices. All of the code is in one program with no complications of passing data between systems

Also, if I did it your way, how would I power all 6 sensors with only one 5v pin on a mega?

There is this amazing product available called wire and several lengths of it can be joined firmly together with an even more amazing product called solder. What will they think of next I wonder ? It may, of course, not be a good idea to power the sensors from the Mega in the first place and to use an external power supply instead.

mydogcooperisapita:
how would I power all 6 sensors with only one 5v pin on a mega?

Solder 5 wires together to a pin that will fit into a Mega. In fact a Mega as 3 separate 5v pins. There are two more above pins 22 and 23.

However make sure that the total 5v current drawn from the Mega is only 100mA or so. If your sensors need more then they need a separate 5v power-supply with the power-supply GND connected to the Arduino GND.

mydogcooperisapita:
Have all 6 sensors go to one arduino or Pi called the master.

If you really want to connect via a USB hub then you must use a Raspberry Pi.

...R

Thanks Robin, I appreciate your patience, advice and time.

If you need 6 USB ports, a hub like below might do for only $6 instead of $158. That being said, I think the setup might be done with a roll of four conductor cat3 phone wire and some soldering.

7 port USB hub

Zoomkat,
Thanks for your time. I just literally about an hour ago found a post here on arduino.cc that said USB Shields will not work with USB Hubs. Of course now I cannot find it.

mydogcooperisapita:
said USB Shields will not work with USB Hubs.

What exactly do you mean the "USB Shield" ? Post a link to the product datasheet.

The technical requirements mentioned in this Thread seem to be all over the place. I suspect what is wanted is actually relatively easy to implement if you could put aside the jargon and just describe the project in very simple English.

Have you read Reply #14?

...R