Given the type of USB port that the Raspberry Pi 2's DC input has, is it possible to just plug the Pi into a powered device with USB ports (such as a PC) and power it from that device?. Thought it'd be a neat idea since my PC is an all-in-one (an HP Pavilion).


The Pi doesn't care where you get the power from.

All will be okay as long as you can supply sufficient power to the microUSB socket for the Pi's needs and the needs of any peripherals you connect to the Pi.

|improve this answer|||||
  • 1
    That was one fast down vote that I do not understand. I'll vote up. – Bex Mar 28 '16 at 18:04
  • 1
    I'm not the downvoter... but it is probably worth noting that the USB3 standard only specifies that the port can output 900 mA. Many USB ports will output more (especially if they have a lightning bolt symbol), but it's not guaranteed. – Jacobm001 Mar 28 '16 at 18:08
  • @Jacobm001 Good point. I usually want to give my Pis at least 2A. A Model 2 or 3 are speced to pull 4W, which should keep them at 800 mA, so the Pi on its own should be fine. Not very much room for any peripherals, though. Model Zero should be no problem at all at 160 mA. – Bex Mar 28 '16 at 18:18
  • I've seen a 500 mA limit mentioned a lot for USB1/2. The Pi Zero/B+/Pi2 (not sure about Pi3) will work quite happily powered from my laptop USB. I generally only have a wireless dongle attached though. – joan Mar 28 '16 at 19:05

Yes, it is possible and should work fine (with one caveat). From a current perspective, the Pi2 draws 230ma at idle and under some load scenarios it stays below the 500ma rating of USB2 ports which are most common on PC's unless you have a newer PC that supports USB3, rated at 900ma (reference: http://raspi.tv/wp-content/uploads/2015/02/Pi2-power-table-1024x338.png ). As long as the current draw of the Pi2 plus all your connected peripherals remains below the rating of the USB power supply, you are OK from a power perspective.

Now here's the caveat, which takes a moment to explain and may or may not be a concern for you. In the normal case, where you power the Pi from a conventional USB power adapter (wall wart), it's not earth grounded to your AC main. The power adapter has a 2-wire plug and does not connect you to the AC ground (3rd pin). In this case, the Pi is said to have a floating ground.

Your PC, along with its USB bus, is earth grounded (with the exception of a laptop running on battery power) because it uses a 3-wire plug to connect to AC. Once you connect an earth grounded USB line to your Pi (could be a USB power supply or a USB peripheral like a printer or monitor), you have a common ground with earth.

When your Pi is earth grounded, you have the risk of a ground loop short-circuit when there is accidental contact with AC-powered devices (e.g., an oscilloscope for testing) on the Pi. The advantage of the Pi with a floating ground is that it is isolated from AC earth ground and will not pose this ground loop short circuit risk. There is a whole field of study about power isolation for safety as well as to eliminate noise that can occur due to a ground loop.

Admittedly, this ground loop risk only exists for some narrow use cases but you should be aware of it.

|improve this answer|||||

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