Quick thoughts on IT, fun projects, and the singularities I come across.

Powering a Raspberry Pi

I recently started building out a combination NAS and HTPC on a Raspberry Pi and came across some interesting information about powering Raspberry Pi’s. While this isn’t a project post per se, I thought it was interesting enough to share and wanted to send this out as sort of a PSA for the users out there who don’t know the potential danger of “backpowering” a Raspberry Pi.

For those who don’t already have one, here are a few suggestions for where to get a Raspberry Pi.

Where to get a Raspberry Pi

If you have some of the peripherals (SD card, HDMI cable, micro USB power supply), you can get started with a standalone Model B Raspberry Pi for as low as $35.

If you would rather get a starter kit, the prices are pretty reasonable and usually includes an SD card pre-loaded with the Raspberry Pi New Out Of Box Software (NOOBS). Here are two good starter kits.

Power Consumption

As an Arduino die hard, I didn’t think I really needed a Raspberry Pi for anything. I was sold once I realized I could run all of my home web server functions on the 3.5 watt ARM processor instead of 85 watt Intel chip in my desktop. The Raspberry Pi will actually pay for itself in about 4 months.

Utility cost of running home server on full x86 desktop (Intel dual core, ATI Radeon HD GPU, 3 HDDs) [high estimate]

(Power draw x hours per week x weeks per year x cost per kilowatt hour) / (1000 watts per kW x 0.85 efficiency x 12 months a year) = estimated cost per month

(150 watts x 168 hours x 52 weeks x $0.10 per kW hour) / 1000 watts per kW x 0.85 efficiency x 12 months a year) = $12.85 per month

Utility cost of running home server on Raspberry Pi and one external hard drive (5 watts for Raspberry Pi, 15 watts for HDD under load) [high estimate]

(20 watts x 168 hours x 52 weeks x $0.10 per kW hour) / 1000 watts per kW x 0.85 efficiency x 12 months a year) = $1.71 per month

Approximate cost savings: $11.14 per month

Powering the Pi and the Dangers of “Backpowering”

The Pi only has two USB ports, so obviously many folks incorporate a powered USB hub to expand its capabilities. At some point, someone discovered that the powered hubs were actually supplying power to the Pi via the uplink between the hub and the Pi. Now you can power your peripherals and the Pi from one outlet. Cool right?

no

It’s pretty cool until you accidentally fry your Pi or start a fire. The power supply connection on the Pi includes a polyfuse to protect against overvoltages (see diagram below).

Wiring schematic showing polyfuse

 

The USB data connections do not have an inline polyfuse! If you want to run your Pi off of a powered USB hub, you’ll need to do two things.

  1. Acquire a powered USB hub that specifically does NOT supply ‘backpower’ via the datalink/uplink/data port. If you want to play it safe, check out the list of compatible powered USB hubs that have been tested by the community. I chose to use the Plugable 7-port USB hub.
  2. Run a USB-to-micro-USB cable from one of the outputs on your USB hub back to the power input connection on the Pi. This will properly route your +5v power through the polyfuse, protecting your Pi.

See picture below for a visual explanation.

Powering Raspberry Pi with Powered USB

Obviously you still need to plug your powered USB hub into a power source. Now your Raspberry Pi will run off of the powered USB hub, allowing you to safely run your Pi and your peripherals from one power supply.

Anyway, just wanted to share a couple of lessons learned while getting started and highlight the details behind “backpowering.”

How do you power your Pi?

Social tagging: > > >

2 Responses to Powering a Raspberry Pi

  1. Milliways2 says:

    In fact this will provide NO protection. No current will actually flow through the Pi power cable because of the polyfuse, as this still has a higher resistance than the copper power lead.
    If you really want to do this (and I do on my system) you need to prevent backpowering, which I do with a data cable incorporating a Schottky diode in series with power lead.

    Of course the actual risk of a powered hub harming the Pi is low, so you might just leave off the power connection

    • Vlerherg says:

      I would have to disagree. This setup works correctly as stated, I have a Belkin powered hub that I bought specifically because of the 2.6A power supply and the fact that it meets USB 2.0 specs by not back-powering via the uplink cable (verified in my own tests as well). I then have a cable going from one hub port to the RasPi micro-USB power port, supplying the necessary voltage/amperage to power the Pi. Since the power is feeding through the power port, you still have the protection of the polyfuse. It is a simply and elegant alternative to having two power supplies while maintaining the protections built into the Pi.

Trackbacks/Pingbacks

  1. Alex D Glover Raspberry Pi Project 1: NAS and XBMC - Fun Electronics and Programming Projects

Leave a Reply