FajarNugroho
Posts: 7
Joined: Mon Sep 21, 2015 1:54 pm

Powering Raspberry Pi 2 and Power-consuming Peripherals

Mon Sep 21, 2015 2:34 pm

I am using my Pi 2 as file server and to share its internet connection via usb wlan adapter. Connected peripherals are
  • - Powered 4-port USB Hub
    - USB 3G Modem
    - USB Wireless Adapter
    - USB to SATA bridge
    - USB Keyboard
I modified the USB hub so that it could only be powered externally and not from its usb connector (to prevent external power "backfeeds"). The keyboard, sata bridge, 3g modem, and wireless adapter are connected to the hub.
I powered all device including the hard disk and Pi itself using a lightly modified 480W ATX power supply (my modification was done to add microUSB connector to power the pi, a switch to power on the PSU via green wire, and soldered 5v line to the USB hub).
My questions are:
  • Am I doing it right from perspective of power consumption and safety?
    Is there any other way (or any other kind of power supply) that is better for this purpose?
    Assuming 100% efficiency, will the power supply consume 480W (max rated) or just as needed?
Other thing, I have a 19V 3.4A laptop charger lying around. Could I use it to power my "rig" (by stepping down the voltage to 12v and 5v)?

User avatar
davidcoton
Posts: 5083
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Powering Raspberry Pi 2 and Power-consuming Peripherals

Mon Sep 21, 2015 8:41 pm

From your description it sounds OK. Safety-wise, you need to take care with all wiring, make sure you use thick enough wires to carry the current otherwise they will overheat (and lose voltage along the way). The voltage on the output side of the PSU is not hazardous in itself but you can get very heavy currents when things go wrong. You might want to provide separate fuses for the Pi and the hub at appropriate values. I don't know what the total load on the hub will be, it will depend on the peripherals and disks. If there are no peripherals powered from the Pi, from memory it will draw well under 1 Amp -- the internal resettable fuse is 2A.

Don't mess with the mains side unless you really know what you are doing. Even then, if possible get someone else knowledgeable to check your work. Make sure the mains earth/ground is connected. Don't remove any covers from the mains powered PSU -- there will be high AC and DC voltages around.

Almost all electrical equipment will consume the power it needs, not its maximum rating unless that is the actual load. As you say, that assumes 100% efficiency but that just doesn't happen. Remember that efficiency will be lower at a relatively low percentage of full load -- most PSUs are most efficient at something approaching (but often not at) full load.

Powering everything from your 19v supply sounds possible -- you will just need suitable ready-made converters. If possible go straight from 19V to 5V, it will be roughly twice as efficient as a two stage conversion via 12V. It should be as easy to find a converter with 19V in, 5V out as one that is 19V in, 5V out. Both are less common than 12V in, 5V out.
Signature retired

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Powering Raspberry Pi 2 and Power-consuming Peripherals

Mon Sep 21, 2015 9:08 pm

Depending on how old the ATX supply is it probably has 5V standby power available. It will be a purple wire coming out of the supply and provides 5V at around 2.5 amps. If that's enough amperage I'd go that route. It's powered anytime the supply is plugged in, even when the supply is "off". Like most things electronic these days even when it's "off", the PS is not really "off", it's just waiting for something to wake it up. Standby power doesn't need the green "enable" wire to turn the supply "on" and the PS fan won't run so it will be silent.

User avatar
davidcoton
Posts: 5083
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Powering Raspberry Pi 2 and Power-consuming Peripherals

Mon Sep 21, 2015 10:48 pm

2.5A may not be enough for the Pi and all the peripherals :o :shock: :ugeek:
Signature retired

FajarNugroho
Posts: 7
Joined: Mon Sep 21, 2015 1:54 pm

Re: Powering Raspberry Pi 2 and Power-consuming Peripherals

Wed Sep 23, 2015 1:38 am

davidcoton wrote:Powering everything from your 19v supply sounds possible -- you will just need suitable ready-made converters. If possible go straight from 19V to 5V, it will be roughly twice as efficient as a two stage conversion via 12V. It should be as easy to find a converter with 19V in, 5V out as one that is 19V in, 5V out. Both are less common than 12V in, 5V out.
I don't really mean two stage conversion like that, What I mean is to wire the 19v out to both 19v-to-12v and 19v-to-5v in parallel. The idea is to use the 12v for powering the hard disk, and the 5v for others.
JimmyN wrote:Depending on how old the ATX supply is it probably has 5V standby power available. It will be a purple wire coming out of the supply and provides 5V at around 2.5 amps. If that's enough amperage I'd go that route. It's powered anytime the supply is plugged in, even when the supply is "off". Like most things electronic these days even when it's "off", the PS is not really "off", it's just waiting for something to wake it up. Standby power doesn't need the green "enable" wire to turn the supply "on" and the PS fan won't run so it will be silent.
I do know about the purple wire, but that's not what I need. I want the peripherals powered on at the same time with the Pi.

User avatar
davidcoton
Posts: 5083
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Powering Raspberry Pi 2 and Power-consuming Peripherals

Wed Sep 23, 2015 8:38 am

FajarNugroho wrote:
davidcoton wrote:Powering everything from your 19v supply sounds possible -- you will just need suitable ready-made converters. If possible go straight from 19V to 5V, it will be roughly twice as efficient as a two stage conversion via 12V. It should be as easy to find a converter with 19V in, 5V out as one that is 19V in, 5V out. Both are less common than 12V in, 5V out.
I don't really mean two stage conversion like that, What I mean is to wire the 19v out to both 19v-to-12v and 19v-to-5v in parallel. The idea is to use the 12v for powering the hard disk, and the 5v for others.
All OK. Let us know how you get on.
Signature retired

FajarNugroho
Posts: 7
Joined: Mon Sep 21, 2015 1:54 pm

Re: Powering Raspberry Pi 2 and Power-consuming Peripherals

Wed Sep 23, 2015 1:42 pm

Alright, I'm going to buy those converters, but not today, not tomorrow. It's holiday here and stores are rarely open. I'll let you know how's it going.
Any ideas of how to measure power consumption?

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Powering Raspberry Pi 2 and Power-consuming Peripherals

Wed Sep 23, 2015 4:22 pm

FajarNugroho wrote:Alright, I'm going to buy those converters, but not today, not tomorrow. It's holiday here and stores are rarely open. I'll let you know how's it going.
Any ideas of how to measure power consumption?
The hard drives are easy, just look on the drive label and it will have current rating for both the 12V and 5V. The spindle motors are 12V and the electronics are 5V, you'll need both. You'll probably need about 1A of 12V and 1.3~1.4A of 5V for the two drives. The 19V 3.4A supply is going to be cutting it pretty close to power everything, it may not be enough as you'll have some loss in the conversions as well. WD "RED" or "Green" drives will have a lower power consumption, as will 2-1/2" form factor drives that are designed to be powered only from the USB.

If you have an ammeter I'd feed the hub 5V and put the ammeter in line. Then plug in all your USB devices and see how much current the hub is drawing to power all of them and add a little for fudge factor. You could even plug them in one at a time for your measurement if you wanted a value for each USB device.

User avatar
davidcoton
Posts: 5083
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Powering Raspberry Pi 2 and Power-consuming Peripherals

Wed Sep 23, 2015 5:13 pm

JimmyN wrote: The 19V 3.4A supply is going to be cutting it pretty close to power everything, it may not be enough as you'll have some loss in the conversions as well.
Why do you think that? Ignoring losses, 3A4 at 19V is about 65W. Lets say 75% efficiency, leaves 48W. By your reckoning the disks will take 1A at 12V plus 1A5 at 5V, total say 20W, leaving 28W (or over 5A at 5V) for the Pi, hub, and peripherals. That should be plenty!

FajarNugroho wrote: Any ideas of how to measure power consumption?
As JimmyN says, you can use an ammeter to measure any of the DC power leads (meter in series, observe polarity!). Power(W) is voltage(V) multiplied by current (A) -- use the nominal voltage of the power supply whose rail you are measuring, or check it with a voltmeter.

Another rough figure can be obtained with a plug-in mains wattmeter -- it will give you the overall power drawn from the mains (though at relatively low power the accuracy may be questionable). For the power drawn by each component, notice the difference in the reading as you power up each part. This reduces the meter errors, but is less accurate as the efficiency of each converter will vary with the load. It will give you a general idea.
Signature retired

FajarNugroho
Posts: 7
Joined: Mon Sep 21, 2015 1:54 pm

Re: Powering Raspberry Pi 2 and Power-consuming Peripherals

Fri Sep 25, 2015 1:03 pm

I figured that I'll be needing the 19v laptop charger for another project, so I resolved by buying a 12v adapter and a DC-DC converter. :D
The converter would give me about 3-3.5A of 5v and that should be enough (I remembered that I once use a 2A phone charger for Pi and the peripherals, with exception for the hard disk. It has its own supply). The hard disk only need 720mA 5v and 520mA 12v.

The first attempt leaves the Pi with a blinking red LED (undervolt, as some people suggest in another website. But the OS is not affected and running fine and gives no warning). I debugged the system and found the fault. It was the converter. I set it at 5.00 volts unloaded :lol:
So I set it at 5.17 volts (still within Pi's tolerance) and it is stable until now. I am using it to share internet connection that I use for replying this topic.

By current configuration, did I do something unsafe or anything that I shouldn't do?

User avatar
davidcoton
Posts: 5083
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Powering Raspberry Pi 2 and Power-consuming Peripherals

Fri Sep 25, 2015 10:09 pm

All sounds OK. What is the current rating of the 12V supply? It will need to be about 2.5A to supply the full load of 3.5A at 5V plus the 12V for the HD, allowing for converter inefficiencies.

You are correct that 2A is the maximum load through the Pi , limited by the polyfuse. You may need to check the 5V current consumption of the powered hub and attached peripherals, since that power does not pass through the Pi. But I would be surprised if there is inadequate capacity in the 12V-5V converter.
Signature retired

FajarNugroho
Posts: 7
Joined: Mon Sep 21, 2015 1:54 pm

Re: Powering Raspberry Pi 2 and Power-consuming Peripherals

Sat Sep 26, 2015 1:45 am

davidcoton wrote:All sounds OK. What is the current rating of the 12V supply? It will need to be about 2.5A to supply the full load of 3.5A at 5V plus the 12V for the HD, allowing for converter inefficiencies.
The 12v supply is rated at 4A and when I test it using an ammeter, the reading said it was about 4.5A. I couldn't test it longer than a couple of seconds as the ammeter's wires get hot pretty quick. I don't really understand why, the ammeter itself was designed to handle 10A max and the wires are CAT II

klricks
Posts: 7172
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Powering Raspberry Pi 2 and Power-consuming Peripherals

Sat Sep 26, 2015 3:00 am

FajarNugroho wrote:
davidcoton wrote:All sounds OK. What is the current rating of the 12V supply? It will need to be about 2.5A to supply the full load of 3.5A at 5V plus the 12V for the HD, allowing for converter inefficiencies.
The 12v supply is rated at 4A and when I test it using an ammeter, the reading said it was about 4.5A. I couldn't test it longer than a couple of seconds as the ammeter's wires get hot pretty quick. I don't really understand why, the ammeter itself was designed to handle 10A max and the wires are CAT II
You can't test the output of a power source by connecting the ammeter directly across the output terminals. Ammeters must be connected in series with a load. An ammeter acts as a dead short to the power supply. In theory the amps across a dead short is infinite. In reality something will burn up before that can happen........ And that something will likely be your meter.
Likely the power supply is shutting down then coming back on repeatedly as most power supplies have current limit built in.

Using Ohms law we can calculate the load required for 12V 4A. 12/4= 3 Ohms. The power (watts) required would b 12*4 = 48 Watts
So in order to properly test the power supply you would need a 3 Ohm 48+ Watt resistor as a load then connect the ammeter in series with that.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

User avatar
rpdom
Posts: 17275
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Powering Raspberry Pi 2 and Power-consuming Peripherals

Sat Sep 26, 2015 5:50 am

klricks wrote:Using Ohms law we can calculate the load required for 12V 4A. 12/4= 3 Ohms. The power (watts) required would b 12*4 = 48 Watts
So in order to properly test the power supply you would need a 3 Ohm 48+ Watt resistor as a load then connect the ammeter in series with that.
Something like an old style car headlight bulb (12V 50W = 4.1A) would work as an approximate load, but be careful as it will get bright and hot.

FajarNugroho
Posts: 7
Joined: Mon Sep 21, 2015 1:54 pm

Re: Powering Raspberry Pi 2 and Power-consuming Peripherals

Sat Sep 26, 2015 12:43 pm

klricks wrote:You can't test the output of a power source by connecting the ammeter directly across the output terminals. Ammeters must be connected in series with a load. An ammeter acts as a dead short to the power supply. In theory the amps across a dead short is infinite. In reality something will burn up before that can happen........ And that something will likely be your meter.
That's news to me. :shock:
Thank you for saving my ammeter :D

Now, a new problem arises. I don't know if it is related to the new power supply or not, but my usb to sata bridge stopped working. plugging it into USB 2.0 port in windows gives me a "port reset failed" error and plugging it into USB 3.0 on the same windows machine gives me a "device descriptor request failed" error.
Any ideas?

Return to “General discussion”