Raspberry Pi Powered by Batteries

48,775

544

23

Introduction: Raspberry Pi Powered by Batteries

About: I’m a 29 year old maker that has been working with electronics and robotics for over 10 years. I have a strong background in electronics and troubleshooting. I have a strong passion for building robots and wil…

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:

  1. A Raspberry pi (with a screen or ability to console into it)
  2. Pololu Adjustable 4-12V Step-Up/Step-Down Voltage Regulator S18V20ALV (Pololu)
  3. A bit of wire or a 3 pin servo extension cable
  4. A battery pack, In this case I'm using a 6 cell AA NIMH pack. (please use rechargeable batteries if possible)
  5. Toggle switch (anything rated over 3 amps should be fine)
  6. Heat shrink tubing

Tools needed:

  1. Soldering iron/station
  2. Solder
  3. Multi-meter
  4. Wire strippers
  5. Small precision Philips head screwdriver
  6. Vise is recommend but not required
  7. A acid brush
  8. 91 percent isopropyl alcohol
  9. 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.

Step 6: Adjust the Output

Connect a 10 kΩ to 100 kΩ resistor to the output of the servo cable/regulator. With a multi-meter on the output turn on the switch and adjust it down to 5 volts DC. Please use patience it will take a bit to tune it in. Using the screwdriver turn the potentiometer clockwise to increase the output voltage. The output voltage can be affected by a screwdriver touching the potentiometer, so the output measurement should be done with nothing touching the potentiometer (also, note that touching parts of the board with your finger can affect the output voltage).

Once you have a 5 volts out make sure its stable.

Step 7: Verify Setup and Connect to the Raspberry Pi

MAKE SURE TO CHECK THE SETUP SO YOU DON'T BURN YOUR PI

It should not matter what Raspberry Pi you have we can just connect the positive to 5 volt DC power and Ground. Move the red pin over one if using the servo header and connect it to the pi. Positive (red) should be facing away from the rest of the board. Go ahead and switch on the toggle switch. Pi's power and activity LED's should be on.

Congratulations you now have a battery powered Raspberry Pi.

Please vote for me and also stop by my personal blog @ www.secondrobotics.com to see awesome projects.

Soldering Challenge

Participated in the
Soldering Challenge

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    23 Discussions

    0
    JohnD212
    JohnD212

    Question 6 months ago

    So how long do your 6 rechargeable AA batteries last before the pi loses power?

    0
    Lee Wilkerson
    Lee Wilkerson

    1 year ago

    Love the project. I have purchased one Pi3B+, and I have a 4G 4B purchase planned for imminent future. One suggestion: use something non-reflective such as a towel for your backdrop. The picture with the wires and switch is confusing.

    0
    Ghloo
    Ghloo

    5 years ago

    Nice. I am planning about the same for my three-wheeled Raspi bot too.

    You may consider a DX.com regulator such as http://www.dx.com/p/255394 (way cheaper than one you are suggesting) . I also plan wiring the regulator to a micro USB connector so that I can power the Raspi the proper way (i.e. no thru GPIO) without bypassing its overvoltage protection.

    0
    The DocDoc
    The DocDoc

    Reply 4 years ago

    I chose the regulator as I know I'm getting a product with high quality parts made in America.

    This regulator also has built-in reverse-voltage protection, over-current
    protection, thermal shutdown (which typically activates at 165°C), and
    an under-voltage lockout that causes the regulator to turn off when the
    input voltage is below 2.5 V (typical). So there is no need to supply via USB on the Pi as the protection is built in. This will cause no harm to the Pi being powered though the I/O pins.

    Also the regulator you link cannot boost the voltage from the batteries if they drop below the output voltage. This means the regulator will stop providing power long before the batteries have fully discharged. Reducing on time.

    0
    Ghloo
    Ghloo

    Reply 3 years ago

    Yep, I get the Chinese stuff for cheapo proof-of-concepts (and I am also fairly lazy), if I were doing something seriously, I would probably take the time to buy one locally or look for a decent LiPol.

    ...and yes, it is only step-down as I planned a battery pack with some reserve. They got step-up ones too. ;o)

    0
    joelm145
    joelm145

    3 years ago

    Hi,
    How can I connect a Blackberry Bold Q10 nano-keyboard to a raspberry?
    I want to make my raspberry portable console with a nano-keyboard of a Blackberry Bold Q10 but i don't know how to connect it XD

    0
    benyblack
    benyblack

    4 years ago

    i am new to raspberry pi i know nothing about tham
    that being said i think this set up would work well for a project i want to do
    could i hook up a camera to this set up and have it so i can view it on the LCD

    0
    The DocDoc
    The DocDoc

    Reply 3 years ago

    Yes you can easily add a LCD and a camera, However you may want to think of a larger Li-ion RC car battery 3000mAh or higher @ 7.2 or 11.1volts. You would not need to use a different DC-DC converter.

    LCD official http://www.mcmelectronics.com/product/RASPBERRY-P...

    Camera http://www.mcmelectronics.com/product/28-21440

    There is also a 5MP camera that is slightly older. You can also chose a different LCD, However this one is supported out of the box and has capacitive touch built in.

    0
    khyale
    khyale

    5 years ago

    Congratulations for your project! I would like to know how long the battery takes before the raspberry's power goes down. what is the battery specifications (capacity)?

    0
    HarveyS1
    HarveyS1

    5 years ago on Introduction

    Nice job. Definitely better than brute force linear regulation.

    If you are doing something that is sensitive to the ripple Voltage of the switchmode power supply, like video, follow the switch mode with a low dropout (LDO) supply.

    When doing this, I set the the switchmode to about 6V - 6.25V and the LDO removes all the ripple presenting clean 5V DC. Don't forget that most linear regulators (and especially the LDO variety) require an input cap at the regulator and an output cap.

    Since the Voltage drop is small, the power disipation in the linear LDO is likewise small. At a 1V drop, the dissipation wil be 1W per Amp of supply output current.

    You could also use an R-C filter, but the Voltage regulation will not be as good. An Ohm or two with a 10uF ceramic cap is usually enough.

    0
    Gelfling6
    Gelfling6

    5 years ago on Introduction

    Maybe not as efficient as the DC-DC switching regulator, but I was able to power-up a Model-B with a 12V battery as source, through two 7805 regulators in parallel. Guess it's time for me to look into a switching regulator?

    0
    SeanS17
    SeanS17

    5 years ago on Introduction

    also after thinking about it and checking resistance in copper wire you would also improve performance theoretically ever so slightly because that looks like about 24 gauge to me.

    https://www.engineersedge.com/copper_wire.htm

    0
    SeanS17
    SeanS17

    5 years ago on Introduction

    In case others want another way. You could also do away with the voltage regulator if you used the right batteries supplying the right reserve current.

    0
    MikB
    MikB

    5 years ago on Introduction

    "adjust it down to 5 volts DC" ... Or even better aim for 5.25v -- a lot of proper PI supplies put out 5.25v (some even go to 5.35v!) to be on the UPPER end of the voltage tolerance range. It allows more scope for when you have USB devices/WIFI plugged in, and stops the "voltage droop" rainbow square appearing!

    It doesn't take much to lose a fraction of a volt here and there :(

    0
    AndreaC18
    AndreaC18

    5 years ago

    Hi! Can i have info about the display used in this project? Where i can find it?