In this instructable I will show you how to properly supply power to a Raspberry Pi or Pi 2 with a battery pack or any voltage between 2.9 -32 volts DC. I will be using a efficient Pololu Step-Up/Step-Down Voltage Regulator and a toggle switch.
This can be done with any Raspberry pi version. Using a DC-DC converter allows us to have around a 90 percent efficiency in converting the power of the battery into power for the pi. You can substitute out for a fixed output DC to DC regulator but its nice to have a adjustable one if you want to use it for other projects. Its a dollar cheaper and available here (Pololu fixed 5v regulator). This will also allow to skip the steps on adjusting the above regulator.
Happy Pi day to you!
Step 1: Get the parts together
First a parts list:
- A Raspberry pi (with a screen or ability to console into it)
- Pololu Adjustable 4-12V Step-Up/Step-Down Voltage Regulator S18V20ALV (Pololu)
- A bit of wire or a 3 pin servo extension cable
- A battery pack, In this case I’m using a 6 cell AA NIMH pack. (please use rechargeable batteries if possible)
- Toggle switch (anything rated over 3 amps should be fine)
- Heat shrink tubing
- Soldering iron/station
- Wire strippers
- Small precision Philips head screwdriver
- Vise is recommend but not required
- A acid brush
- 91 percent isopropyl alcohol
- A 10 kΩ to 100 kΩ resistor
Step 2: Prepare the wire
Separate out the yellow wire from the servo cable and remove it completely from both ends. You will need something to pry up the plastic holding the wire in the header. (be gentle we will need the plastic retainer in a later step)
Step 3: Solder the headers to the output of the regulator
Break the headers into a 4 by 4 pin and solder the headers to the VOUT and GND locations on the regulator. Go ahead and connect the cable we made in the last step to the output header. Red to positive and Black to ground. Note you do not need to hook up the enable line (its internal tied with a 100k pull-up resistor)
Step 4: Clean the connections
Clean the connections well with isopropyl alcohol and acid brush. OH yes clean them well. Don’t be afraid to scrub a little. 🙂
Step 5: Solder the switch
Solder the switch between the battery and the Vin via on the regulator. Take some time and clean the connections. Also remember to use heat-shrink tubing to protect the connections. Solder the grounds up at this time to so the negative of the battery is tied directly to the GND via on the Vin side of the regulator. Then connect the switch lead (The positive wire) to the Vin via on the DC to DC regulator.
For more detail: Raspberry Pi powered by batteries