Connecting multiple microcontrollers in one USB

Hello! We will be creating a project wherein we will be using 10 US-100 Ultrasonic Sensors, 10 servo motors, 2 DC motors, and 2 solenoids which is why we will be using multiple microcontrollers. Would it be possible to connect all those in order for it to be plugged in a computer in just one USB?

With a (external powered) USB hub (1 cable to pc, multiple to USB devices), yes.

If all the microcontrollers are on the same circuit board, and if all you want is to power the circuit from the computer, then conceivably you could use a single cable from the PC to the circuit. But if you want each microcontroller to communicate with the PC, you will need a hub - either external, or built in to your circuit (e.g. http://media.digikey.com/pdf/Data%20She … C65100.pdf ).

Jake

Valen:
With a (external powered) USB hub (1 cable to pc, multiple to USB devices), yes.

If all the microcontrollers are on the same circuit board, and if all you want is to power the circuit from the computer, then conceivably you could use a single cable from the PC to the circuit. But if you want each microcontroller to communicate with the PC, you will need a hub - either external, or built in to your circuit (e.g. http://media.digikey.com/pdf/Data%20She … C65100.pdf ).

Jake

Thank you! Will try it and I’ll let you know it it works. :slight_smile:

The question is if multiple microcontrollerboards over usb is the most efficient or practical solution. Can these tasks not be shared by 1 or just a few microcontroller with more i/o capability? Looks like there will be a communication bottleneck/nightmare on the host pc for all the data to come together. I mean, if al are using their serial port to deliver the ultrasound distances. A little bit more information about the project would perhaps have allowed a better fitting solution.

It sounds like you will be designing this since you aren’t describing any devices that currently speak USB. I would convert the USB to serial or SPI and use that to talk to the multiple micros.

Actually, you should be able to get all or most of this on one micro. There are designs that use an i2C LED driver (like http://www.adafruit.com/products/815 from Adafruit) to drive 16 servos; the only time the micro is involved there is when one of the servos needs to have its position changed. If you can sample the ultrasonics one after the next, they too will be a minimal load on the micro. Two solenoids are also easy to code, and just take 2 GPIO pins plus a FET driver. I would try this route before going through the extra hassle of adding serial ports (or multiple USB ports and hubs) and the software involved with all of that.

/mike