1
\$\begingroup\$

First of all, I apologize ahead of time if my terminology is a bit off. I'm more of a software guy, so the hardware side of things is a little tricky for me. My problem is as follows:

I'm building a project inside of an enclosure that will contain a Raspberry Pi, a USB input for a MIDI keyboard, and a string of LED lights. I'm not entirely sure what kind of power supply I would need for a project like this, but I'd like to reduce it all to one power input jack for the entire enclosure. I'd imagine any wall wart would work fine, but the LED strip seems to use more power (correct terminology?) than the Rasp Pi and I'm not sure if I'd be able to supply power to both using the same power input.

Does anyone have any solutions to this design approach?

\$\endgroup\$
6
  • 1
    \$\begingroup\$ Do all the components need the same voltage? The LED strip, in particular, what voltage does it need? \$\endgroup\$ Aug 11 '21 at 14:35
  • 1
    \$\begingroup\$ Everything you listed can be bought in a 5v powered variety, so buy 5v devices and connect a 5v power supply rated for at least the sum of the amperage of all components. There isn't much else to it unless you choose to make this more complicated by using high voltage LEDs (which you should not). \$\endgroup\$ Aug 11 '21 at 14:56
  • \$\begingroup\$ The LED strip is listed as 12V, although it doesn't say anything about amps. The Rasp Pi I'd imagine would require a 5.1V iirc. Also, I can't seem to find blue strip lights that are below 12V. Is there a better approach to providing a blue light to the inside of an acrylic enclosure? Like a Hughes&Kettner amp head \$\endgroup\$ Aug 11 '21 at 15:13
  • \$\begingroup\$ The purpose of the project and specs you want to achieve determine the choices. All white are typically 3S LEDs + R to run from 9 to 14V or nominally 12V and RGB types are programmable with 5V. This just means a 12V supply with a 5V LDO that can handle the power drop to supply load. \$\endgroup\$ Aug 11 '21 at 15:37
  • 1
    \$\begingroup\$ A couple of questions you may find helpful to review: electronics.stackexchange.com/q/34745/2028 and electronics.stackexchange.com/q/501176/2028 \$\endgroup\$
    – JYelton
    Aug 11 '21 at 16:00
2
\$\begingroup\$

Take the highest voltage and then use step down DC DC converters (or voltage regulators) to get the other voltages you may need.

Step down DC DC converters can come in 3 pin versions (3-SIP on digikey) and are similar to a 7805 voltage regulator (and some are drop in compatible).

For example: if I needed 12V, and 5V and 3.3V. I would get an AC/DC converter that sources 12V and then get two DC DC converters one that outputs 5V and one that outputs 3.3V

One thing you will need to watch for is the current, as an RPI4 requires 2A (which means you would need to parallel two 1A or buy a bigger wired module on ebay or amazon that can do more current)

\$\endgroup\$
2
  • \$\begingroup\$ I do think that's the right answer in this case, but in the case where you just need a small current at higher voltage (eg. +12 or +/-12V for op-amps) a boost converter or DC-DC module or charge pump from +5 might be better. \$\endgroup\$ Aug 11 '21 at 16:43
  • \$\begingroup\$ I usually go from the 'top down' and set the main rail to the largest load, that way the largest load does not carry the inefficiencies of converters. I suppose if the largest load was on a 'middle rail' and a smaller current on a higher voltage rail, it would be good to run a boost scheme. For a hobbyst it might be good to use a top down approach (especially since most of them are familiar with LDO's anyway) \$\endgroup\$
    – Voltage Spike
    Aug 11 '21 at 19:49
1
\$\begingroup\$

You can power multiple devices with just one input source if needed by implementing various voltage regulators or converters.

For example, it's common to have a circuit board with multiple voltage requirements. The board might have switching regulators (buck/boost), linear regulators (LDO), transformers, etc. Often in an assembled device (like a desktop computer) the job of supplying different voltages is handled by the power supply.

The first thing to do is determine how much power every device will use, whether these are components on a PCB or separate devices in an enclosure.

  • The Raspberry Pi 4 specs show that it needs 5V DC at ≥ 3A. If USB ports on the Pi aren't providing more than 500mA, it mentions you can use a 2.5A supply.
  • I'll assume your MIDI keyboard is a controller and not a synth, and further that it is USB 2.0 compatible. Most devices like this use < 500 mA.
  • The LED strip is the ambiguous item from your question. A general rule of thumb is to take the number of discrete elements (individual diodes) and multiply by 20 mA. Note that by "individual diodes" I mean the red, green, and blue diodes inside each pixel. If your strip has 100 white LEDs or pixels, then that would be 300 diodes x 20mA = 6A. This would be the current it draws at maximum brightness, full white.

At this point you can add up the requirements to get an idea what size power supply would be needed. I'll use 100 white pixels for the LED strip as an example. Calculating the power used gives us a useful spec for sizing the main power supply:

  • 5V 3A (15 W)
  • 5V 500mA (2.5 W)
  • 12V 6A (72 W)

From this, we know that we need a power supply capable of ≥ 89.5 watts. It is good practice to plan for inefficiency and build a little overhead into your design. Based on this, I'd consider a 100 or 120 watt supply.

The next step is to consider some options:

  1. A 5 volt supply with a 12 volt boost regulator to power the LEDs;
  2. A 12 volt supply with a 5 volt buck to power the Pi and keyboard;
  3. A 12 volt supply with a 5 volt linear (LDO) regulator to power the Pi and keyboard;
  4. Two separate power supplies;
  5. Replace the 12 volt LED strip with a 5 volt version.

Because the Pi and keyboard require much less power, I might consider using a 12 volt supply and adding a buck regulator. It doesn't make sense to me to use a 5 volt supply but have to boost it to 12 volts for more than 80% of the load. DC-DC buck regulators can be found relatively inexpensively. As long as it is rated for ≥ 17.5 W and can accept 12 V input, it should work. (An LDO could also work, but for various reasons I'll dismiss that option.)

You could also use two separate power supplies. I realize that your question specifically states just one power supply, but there are dual-output supplies available (like a Meanwell RD-125A) which may be an easy or cost-effective option.

Finally, you could replace the LED strip with a 5 volt version, and no longer need to supply a second voltage. The determining factor would be based on time and cost (perhaps you've already mounted the LED strip in a way that's difficult or time consuming to change).

\$\endgroup\$
2
  • \$\begingroup\$ So if I go with an RD-125A, I could just hook up the 5V output to the USB jack on my Pi without any sort of regulator or anything? I'm just worried about damaging the Pi by providing it with too much voltage, current, etc. \$\endgroup\$ Aug 21 '21 at 20:40
  • \$\begingroup\$ That is correct. It is a regulated 5V output. For more info about how voltage and current relate to loads, check out: electronics.stackexchange.com/q/34745/2028 \$\endgroup\$
    – JYelton
    Aug 21 '21 at 20:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.