Powering multiple (50) USB devices

Thread Starter

awwwt

Joined Aug 24, 2015
60
Hello everyone!

A bit about my project-

I am doing an art project where a sound is triggered when you walk past an ultrasonic proximity sensor (the HC-SR04). To do this I am using a cheap Arduino Nano, an Mp3 module with an SD card, and one of these speakers.

In total there will be 25 sounds, which means I’ll be using 25 Arduino nanos and 25 speakers that need power via USB. I’m testing them at the moment from my computer’s USB ports and everything seems to be working fine, however for the exhibit I will need 50 ports, so I need to find a fail-safe way of powering everything.

I’m currently debating whether to get a bunch of powered USB hubs, much like this one. What I’d like to know is whether this is possible given the specs of what I’m plugging in. I’ve tried to work it out but I’m really new to electronics and really need assurance that this is the most efficient way to do things.. if there is a better way I’m super open to suggestions!!df

I have attached an image of my current set-up if this helps at all.

Hope this all makes sense and thanks very much!

diagrams.gif
 

Sensacell

Joined Jun 19, 2012
2,851
First- sort out how much current your circuit requires when playing full volume.

You can probably power the whole thing from one cheap 5V power supply, just be sure to use heavy gauge wire if the runs are long.
Calculate the maximum current required to run all of them, buy a power unit rated for 150% of that load.
It might also be wise to include a capacitor at every circuit to keep things stable, try a 100 uf 16V low ESR cap on each one.
Connect them close to the circuit, across the 5V input leads.
 

kubeek

Joined Sep 20, 2005
5,757
Jeez, do you really need to play 50 different sounds independently? Buying fifty of each seems like a huge investment.
 

TheButtonThief

Joined Feb 26, 2011
237
50 individual micro controllers, 50 individual power supplies, 50 individual MP3 players and 50 individual active speakers?

Defeats the purpose of using a micro controller =/
 

djsfantasi

Joined Apr 11, 2010
7,763
Because her devices are built to be powered by USB, as she mentioned in the first post. However, she may be unaware that the Arduino Nano can be powered by a separate power supply. Not sure about the MP3 module.
 

tracecom

Joined Apr 16, 2010
3,944
If you take the maximum available current from a USB port (.5A) and multiply that by 50, you get 25 amperes, but the real question is, "what is the maximum number of sounds that could be playing simultaneously?" Multiply that number by .5, and you have the worst case current draw. Then, multiply the worst case current draw by 1.5, and look for a 5V power supply with that current capability. However, then you have to distribute that power to all the circuits and speakers, which means that you will need to have 50 USB plugs wired back to the main power supply. I suspect that is more wiring than you want to tackle.

As others have posted, there are ways to accomplish what you want with less circuitry than 25 separate circuits, but again, it may be more than you want to tackle. So, assuming that you continue with your original approach, my suggestion would be to obtain 50 individual cell phone chargers with USB plugs on them that fit the USB receptacles on the speakers and the microcontrollers, along with AC power distribution strips sufficient to plug all those cell phone chargers into. A rat's nest for sure, but simple to wire: plug and play.
 

tracecom

Joined Apr 16, 2010
3,944
50 individual micro controllers, 50 individual power supplies, 50 individual MP3 players and 50 individual active speakers?

Defeats the purpose of using a micro controller =/
That's not the way I understand it. I think there are 25 individual sound circuits, each of which needs power to the uC (which powers the sensor and the MP3 player) and to the speaker, i.e., 50 5V power sources. Although your point is still valid.
 

AnalogKid

Joined Aug 1, 2013
9,287
Unless a centralized power source is a requirement, 50 systems might be spread out so far that multiple smaller supplies might be able to power clusters of devices if AC is available down the path.

ak
 

atferrari

Joined Jan 6, 2004
4,382
Few points:

Image? Where?

What is the expected distance between the two most distant?

Any chance that some of them could stay side by side or close to each other?
 

Thread Starter

awwwt

Joined Aug 24, 2015
60
Hey everyone,

Thanks so so much for all your replies, they’ve been really helpful so far.

I was wondering about using a simple regulated 5v power supply and powering the microcontrollers via soldered wires from that instead of the USB connection, but things just appeared safer and more simple if we just used USB cables. The sensor really needs a stable 5 volts to operate correctly, and the sound quality from the MP3 player and the speaker gets affected by less than 5 volts too.

A bit more information about the project might be helpful here (sorry for not being more precise at the beginning!) The project is an installation in a car park - when cars drive in they are supposed to trigger a series of 25 consecutive sounds to make a tune. Each sensor is about a meter apart, so overall it’s quite a long stretch. The installation is going to be up for over a week and there is a limited power supply in the space so we’d have to use extension cables and so on.

I need 2 plugs per device currently… one for the speaker and one for the Arduino Nano (they both require a USB to mini b connection).

If I use a 5v plug with the correct amount of amperes for the Arduino circuit (sensor, mp3 player, nano board) and the speaker combined, do you think this would be an appropriate solution? It would at least cut the number of plugs down to 25 which isn’t as terrible.

In terms of having multiple micro-controllers, I know - it sounds ridiculous. I understand that it’s probably simpler to just operate 25 sensors from a few microcontrollers, or even one, but we’ve decided to create a single device per sensor because of a few reasons - one being that if one sound fails for whatever reason it’s not such a big deal, and also because eventually we’re going to separate the devices from one other and have them operate as stand-alone ‘single sound’ proximity players.

Thanks again!
 

tracecom

Joined Apr 16, 2010
3,944
The specifications for the MP3 player don't really say what its maximum current requirement could be, but it does say that the output could be as much as 3 watts, so that indicates roughly 600 mA, which is beyond the capabilities of a USB connection. If the speaker (which must have an amplifier built in it) also draws the max, then trying to power both of them from one power supply would mean that it would need to be at least an amp, and 1.5 amps would be better.

This is based on your drawing which indicates that both the arduino and the speaker have to have their own power source.
 

Thread Starter

awwwt

Joined Aug 24, 2015
60
The specifications for the MP3 player don't really say what its maximum current requirement could be, but it does say that the output could be as much as 3 watts, so that indicates roughly 600 mA, which is beyond the capabilities of a USB connection. If the speaker (which must have an amplifier built in it) also draws the max, then trying to power both of them from one power supply would mean that it would need to be at least an amp, and 1.5 amps would be better.

This is based on your drawing which indicates that both the arduino and the speaker have to have their own power source.
Thanks tracecom, the mp3 player itself seems to work fine and triggers correctly with the sensor, and testing both the speaker and the Arduino circuit via USB power from my computer seems to work without any USB devices disabled error messages popping up, so I suppose this is positive news?!

If I did find a 5v wall wart which supplies around 1.5 amps, would it be OK to simply connect the wire from the plug to the + and - of the speaker and the Arduino together? If so, that'd be ideal.

Thanks again!
 

tracecom

Joined Apr 16, 2010
3,944
I am just guessing at the current requirements, but without more to go on, guessing is better than nothing. I think that would work; try one and check that the volume is good and that the wall wart doesn't overheat. Also if these are going to be close to autos, then you should try the whole arrangement out close to some running cars just to be sure that electrical noise from the car doesn't come through the speakers.
 

ian field

Joined Oct 27, 2012
6,539
Hello everyone!

A bit about my project-

I am doing an art project where a sound is triggered when you walk past an ultrasonic proximity sensor (the HC-SR04). To do this I am using a cheap Arduino Nano, an Mp3 module with an SD card, and one of these speakers.

In total there will be 25 sounds, which means I’ll be using 25 Arduino nanos and 25 speakers that need power via USB. I’m testing them at the moment from my computer’s USB ports and everything seems to be working fine, however for the exhibit I will need 50 ports, so I need to find a fail-safe way of powering everything.

I’m currently debating whether to get a bunch of powered USB hubs, much like this one. What I’d like to know is whether this is possible given the specs of what I’m plugging in. I’ve tried to work it out but I’m really new to electronics and really need assurance that this is the most efficient way to do things.. if there is a better way I’m super open to suggestions!!df

I have attached an image of my current set-up if this helps at all.

Hope this all makes sense and thanks very much!

View attachment 90499
Designing for worst case scenario - you need a 25A PSU with an accurately regulated 5V output.

There used to be a computer breakers near me, so I could at one time get hold of stuff like that real easy.

There used to be dozens of surplus dealers advertising in the hobby magazines back then too - not so much nowadays though.

An ATX PSU might fit the bill, but you may have to put a dummy load on the 3.3V output to get it to regulate properly.

If you can rustle up an old AT PSU with no 3.3V and no standby switching, its a lot less mucking about.
 

djsfantasi

Joined Apr 11, 2010
7,763
Thanks tracecom, the mp3 player itself seems to work fine and triggers correctly with the sensor, and testing both the speaker and the Arduino circuit via USB power from my computer seems to work without any USB devices disabled error messages popping up, so I suppose this is positive news?!

If I did find a 5v wall wart which supplies around 1.5 amps, would it be OK to simply connect the wire from the plug to the + and - of the speaker and the Arduino together? If so, that'd be ideal.

Thanks again!
Check about how to power the Arduino directly from 5V. I know there are some considerations with the Arduino Uno and connecting directly. You can't just connect 5V to the 5V pin, without possibly damaging the microprocessor. I recommend some research.
 

Thread Starter

awwwt

Joined Aug 24, 2015
60
I am just guessing at the current requirements, but without more to go on, guessing is better than nothing. I think that would work; try one and check that the volume is good and that the wall wart doesn't overheat. Also if these are going to be close to autos, then you should try the whole arrangement out close to some running cars just to be sure that electrical noise from the car doesn't come through the speakers.
Thanks so much tracecom, I'll definitely give this option a try asap and report back when I've tested. Visiting the car park this week too, so I will be bringing a prototype with me.

Designing for worst case scenario - you need a 25A PSU with an accurately regulated 5V output.

There used to be a computer breakers near me, so I could at one time get hold of stuff like that real easy.

There used to be dozens of surplus dealers advertising in the hobby magazines back then too - not so much nowadays though.

An ATX PSU might fit the bill, but you may have to put a dummy load on the 3.3V output to get it to regulate properly.

If you can rustle up an old AT PSU with no 3.3V and no standby switching, its a lot less mucking about.
Ian, this is a really interesting option that I didn't know existed! Do you mean something like this? Or is it better to find a non-switching supply? More like this although not sure I trust alibaba....

Check about how to power the Arduino directly from 5V. I know there are some considerations with the Arduino Uno and connecting directly. You can't just connect 5V to the 5V pin, without possibly damaging the microprocessor. I recommend some research.
djsfantasi, the Arduino I'm using has a VIN port that I'd usually plug batteries and such into, but have done a quick search and realise it may not be the best long term resolution. Do you reckon supplying the regulated 5v directly to the VUSB connector could be an option? Or even cutting an old USB cable and wiring from that to the regulated supply?

Thanks!
 

RichardO

Joined May 4, 2013
2,271
Maybe a number of powered USB hubs? Not the cheapest solution but it could be the easiest to wire. Visit a Dollar store for really cheap (in all senses of the word) USB cables.
 

tracecom

Joined Apr 16, 2010
3,944
Maybe a number of powered USB hubs? Not the cheapest solution but it could be the easiest to wire. Visit a Dollar store for really cheap (in all senses of the word) USB cables.
Powered USB hubs have to be powered, and I am not aware of any that are able to supply the full 500mA from all outlets simultaneously. Most are limited to 100mA or less per outlet.
 
Top