Electronic – arduino – How to easily power a “mashed-up” project

arduinoaudiopower supplyraspberry piservo

I'm working on a hobby project that involves a Raspberry Pi (with a powered USB hub for reliable wireless), an Arduino (driving a hobby servo, controlling some LEDs, etc.), and an audio amplifier (not rolling my own – using a torn down set of powered computer speakers). So basically, I have five things that normally would each have a separate power supply.

I'm mostly a programmer with a little electronics knowledge, mostly digital with just enough knowledge to interface with sensors and things. I'd love for this project to have one wall plug, not be powered by four or five wall warts. I also don't want to have to implement a dedicated power supply. I know the Raspberry Pi is a little picky on its power consumption (I'm using a 1A supply for it currently).

I thought about using an old laptop power supply with 18v and (I think) 2A. Could I just do that and use a few power regulators to provide the necessary voltages to the other pieces? If I do, what should I be aware of and watch out for? I also considered an old PC power supply, but it's much too large for the enclosure that I have in mind.

Best Answer

You could indeed! But first things first:

  • determine each device's power consumption and sum them all up
  • make sure your laptop PSU can supply at least this much

Things to watch out for:

  • Even though they may run on the same voltage, the Rpi and Arduino might not get along. Noise and ripple from one device will be superimposed on its supply lines, so to save you the hours of debugging I would STRONGLY suggest separate supplies for anything with a clock.
  • Inrush currents may be several times greater than average currents (big current spikes are common when charging up lots of parallel capacitors on each board at initial power-on) so if you don't have the inrush current spec available from the device's datasheet, just double (or triple) the average/rated current to be conservative.
  • If you use linear regulators, you won't have any extra clock frequencies to worry about, but you will have lots of heat. Try to find a regulator such as the 7805 which has its tab connected to ground. That will make it much easier to sink heat to a metal enclosure, if you end up putting the completed project in one.
  • Aim for "star" grounding such that all your individual device grounds come to a common point which is as close as possible to the lowest-impedance ground reference. This might be the negative return on the laptop supply.
  • Your audio amp very likely used bipolar supply voltages. If you don't have a true negative supply available this could be a problem. It might be simpler to find an audio chipamp such as an LM386 that runs off a single supply than to generate a negative supply locally.