Wednesday, February 12, 2014

Powering your Rasberry Pi

I bought a Rasberry Pi recently and quickly the question I was faced with was: How to power it? Then I started digging into some specifics of power supplies. Most common answer was to use a standard micro-USB phone charger which ships with most Android phones. While this worked for me, I was curious to know more about power supplies.

Let us think about what a power supply is really. The electricity that runs in our wall sockets, is AC or alternating current. This AC supply has to be converted into a low voltage DC supply before powering your electronic circuits. This is the primary function of a power supply.

Standard power consumption of the Raspberry Pi device is
  • Board A: 5V, 500 mA (2.5W) without any devices connected (e.g. USB, Ethernet, HDMI)
  • Board B: 5V, 700 mA (3.5W) without any devices connected (e.g. USB, Ethernet, HDMI)

But it doesn’t end on that. We need to ensure that the power supply we use can provide enough electric current to power the Pi plus any additional peripherals. In addition, we need to take into account inefficiencies of the supply itself and the cable between the power supply and Raspberry Pi. Most of us will use the USB ports to connect a keyboard, mouse or a Bluetooth module. The community advises that we use a power supply that can at least supply 1A of current. A poor quality power supply unit may result in corruption of your SD card. The Pi gets unstable, freezes, lags for even simple tasks if enough power is not supplied. So if you have such problems, better take a look at the power ratings of your supply.

The power required by the Pi varies depending on what peripherals are connected and what functions it is currently performing. The Pi draws extra power when:

  • Running a GUI.
  • Connecting USB devices and an Ethernet connection.
  • When running the GPU.

This means that it is difficult to say exactly how much power is needed at any time. Adding peripherals increases the loading on the power supply to your board and this, in turn, may affect the voltage presented to the Raspberry Pi. If the Raspberry Pi's supply voltage falls below a certain value (around 4.75 V), or it begins to fluctuate, your setup may become unstable.

For regular "low power" USB devices this doesn't cause a problem as they are designed to work with voltages as low as 4.4 Volt. This isn't the case however with some USB devices such as WiFi dongles which may need 4.75 Volt, and are also known to draw more than 150 mA when configured and active. Each of the two USB ports on the Pi has a polyfuse rated at 140 mA, so any connected USB devices should draw less than this amount of current. The polyfuse itself can cause significant voltage drop. So be sure you know what you connect to the Pi. It is common to use a powered USB hub to power your USB peripherals. Also know that you can power your Pi from the USB hub also. There is a thread on that too.

Alternate ways to power your Pi: 
Although I never tried, but there are some interesting alternate ways to power your Pi. They are listed here.

There is still a _lot_ to know about power supplies and how they affect parts of an electronic and electrical devices. For example, how does overclocking affect power requirements? It is an interesting topic and I will keep this post updated on any new things that I learn and may be useful to others.

All the info written above has been compiled by reading blogs, wiki, manuals, etc. If you feel there is anything incorrect/overlooked, I would be more than glad to correct them.