Introduction: Raspberry Pi PowerHAT - Powering Your Pi, Simplified

Picture of Raspberry Pi PowerHAT - Powering Your Pi, Simplified

The Raspberry Pi single board computer is awesome at what it does, but it requires a lot of power to do so. I think we've all been there - the Raspberry Pi isn't exactly the easiest thing to supply power to, as it's power draw fluctuates a lot, which basically makes powering it on the go impossible. In addition, several cables are needed to power to the Raspberry Pi. making it very immobile.

To solve this common problem with all Raspberry Pi's, I designed, prototyped, and engineered a mobile "Raspberry Pi Battery Pack", called the "Raspberry Pi PowerHAT"! It combines power management circuitry, a LiPo Battery charging circuit, and a Buck/Boost converter for external power supplies, such as a solar panel, to make an all-in-one Raspberry Pi PowerHAT. It has 5 different power input settings, while keeping a small form factor, to keep it portable, and can be powered with almost any power source, between 3 and 12 volts.

Keep reading to learn how you can obtain a FREE PDF version of this Instructable, a special FREE Raspberry Pi Power Patch, and a FREE 3-Month Pro Membership!!!
If you like (or hate) this Instructable, please vote for it in one or all of the selected contests!


Soon, I would like to use a laser cutter and/or an SLA 3D printer to design a strong, waterproof case with protection for the components, making the PowerHAT even more portable, as it would be very robust.

Step 1: (Hand) Tools and Materials

Picture of (Hand) Tools and Materials

Here are the materials and tools that you will need to complete this project. Each resource is a clickable link.
PDF files of the schematic and breadboard connections are made available, below.
Be sure to take advantage of the FREE PDF of this Instructable!

Materials:
FREE PDF of Instructable (See Below)
Adafruit PowerBoost 1000C Charger
Adafruit VERTER (Buck/Boost Converter)
3.7V - 2Ah LiPo Battery
Adafruit Prototyping Pi HAT (shield)
Schottky Diode
2x Mini Power Switch
(optional) 2-pin Spring Terminal
(optional) 5V 2A Power Supply with Micro USB Connector
Double-Sided Foam Tape
22AWG Solid Core Wire
Breadboard
Raspberry Pi (Model A+, B+, 2, Zero, or 3)

(Hand) Tools:
Soldering Iron with Solder
Wire Cutters
Wire Strippers
Needle Nose Pliers
(optional) Multimeter

Step 2: Solder the Headers

Picture of Solder the Headers

Before building and prototyping the circuit, we'll start off with sizing the headers included with the breakout boards, to the desired length, to fit the breakout boards. This can be done by using wire cutters, or angle cutters. Once you've completed that, insert the headers into a breadboard, and place the boards on top of the headers. Solder as normal, and be sure to check the straightness of the board.

Do the same with the Raspberry Pi HAT, but replace the breadboard with the Raspberry Pi. Stack the header on top of the Raspberry Pi, and place the HAT on top of the header. Make sure the board is straight! If there is any ugly solder flux left over on the board, now would be a good time to remove that by soaking the board in isopropyl alcohol.

Step 3: Prototype the Circuit

Picture of Prototype the Circuit

It's always a good idea to prototype and test all functions of the circuit, before soldering the components into the final layout. Use the schematic for reference to prototype the circuit on a breadboard. Use solid core prototyping wire of different colors to make circuit troubleshooting quick and simple. Two versions of the schematic are available above; a true schematic, and a visual wiring diagram.

The circuit has many power functions, so be sure to test all of them:

  • Power the Raspberry Pi with a LiPo Battery Only
  • Power the Raspberry Pi with a Micro USB Cable Only
  • Power the Raspberry Pi with an External Power Source Only
  • Charge the LiPo Battery and Power the Raspberry Pi with a Micro USB Cable Only
  • Charge the LiPo Battery and Power the Raspberry Pi with an External Power Source Only

The external power source can be any voltage from 3-12V and should be at least 500mA.

Step 4: Build It!

Picture of Build It!

Start off by laying out the screw terminal, header, and switches on the Raspberry Pi HAT, as shown above. It is very important that you get these parts in the correct spots and orientation, or the other parts will not fit! Follow the first picture above, closely, for reference!

Once you have laid out all the components, carefully solder on the components, trimming the leads when done. Again, use the pictures for reference!

Step 5: Build It! Cont'd.

Picture of Build It! Cont'd.

Next, we're going to add the Buck/Boost converter board to the HAT. Start by taking out the 2nd header pin (this is connected to the ENable pin), using a soldering iron and needle nose pliers. Insert the board into the HAT, on the back side of the board, in the correct orientation shown. The removed header pin should be above the cut-out on the HAT, for the Raspberry Pi Camera cable. Flip the HAT over and solder the pins to the board, trimming the leads once done.

Step 6: Wire It!

Picture of Wire It!

First off, we're going to wire the 5V output to the +5V rail, with a diode. The Raspberry Pi HAT is setup in a breadboard format, which makes everything easy to wire. Connect the diode to the last pin of the PowerBoost header, and the other pin to a hole on the +5V rail. Trim the leads when finished. The stripe on the diode should be closer to the pin entering the +5V rail. Check the pictures for reference.

Next, connect a solid core wire (preferably white in color) from the 4th pin of the PowerBoost header to the leftmost pin of the main power switch (in back of front switch). Connect another solid core wire (preferably black in color) from any pin on the GND rail (closest to the +5V rail), to the center pin of the main power switch. Cut the leads when done. Use the pictures for guidance.

Step 7: Wire It! Cont'd.

Picture of Wire It! Cont'd.

Before wiring any other parts of the circuit, it is a good idea to identify the positive and negative sides of the screw terminal block. The leftmost terminal should be positive (red in color) and the right is negative (black in color). I later went back and added + and - symbols on the HAT. Use the pictures to help color yours.

After identifying the terminals, we're going to wire together all the power inputs and outputs. The explanation below can be confusing at times, so refer to the schematic and wiring diagram for reference. Start by wiring the screw terminal pins to the corresponding pins on the Buck/Boost converter board (back side). Use a red solid core wire to connect the positive terminal to the VIN (voltage in) pin, on the bottom of the Raspberry Pi HAT. Do the same for both ground pins (on both the screw terminal and the Buck.Boost converter board), using black solid core wire, on the back of the HAT. Trim leads when done. These GND pins should both be connected to the GND rail, near the +5V rail.

Now, we'll wire the output of the Buck/Boost converter board to the second switch (external power switch), and then to the PowerBoost board. Use a piece of red solid core wire to connect the 5V pin on the Buck/Boost converter board to the rightmost pin (looking from back side) on the external power switch (front switch). Looking from the back side again, connect a red solid core wire from the center pin of the external power switch, to the USB input pin on the PowerBoost board (first pin on header). You will have to solder the wire in back of the header (1st pin, top view). Again, use the pictures and schematic for reference.

Lastly, connect a black solid core wire from the 5th header pin (top view) to a hole on the GND rail (near the +5V rail). Before moving on; it is a good idea to test that this circuit completes all functions properly. Troubleshoot (if needed) using the pictures, schematic, and wiring diagram.

If you would like to make switch identification easier, it is a good idea to add labels to the front, external power switch, as I have done in the pictures above. After testing the on/off positions of the switch, add the labels accordingly.

Step 8: Finish It!

Picture of Finish It!

Before using your Raspberry Pi PowerHAT, we need to secure the battery and PowerBoost board with foam tape.

To secure the LiPo Battery, size and cut a piece of double-sided foam sticky tape to fit on the bottom of the LiPo Battery. Peel off one side of the foam tape, and adhere it to the back (side without lettering) of the LiPo Battery. Peel off the other side of the foam tape and place the LiPo Battery on the HAT, using the pictures for placement guiding.

After doing that, take the PowerBoost board, and make a double-piece thick piece of foam tape, to fit on the back (side with no components and almost all lettering) of the PowerBoost board. Peel off one side of the tape, and adhere it to the back of the PowerBoost board. Peel off the other side of the foam tape, and insert the board into the headers, so the tape will make a sandwich between the LiPo Battery and the PowerBoost board.

Finally, plug in the LiPo Battery into the mating JST connector on the PowerBoost board. Wrap the wires around, to the back side of the board, and tuck the extra length under the Buck/Boost converter board.

Step 9: All Done!

Picture of All Done!

Congratulations! You've successfully built the Raspberry Pi PowerHAT!

Before testing it with your Raspberry Pi, it is a good idea to test all the functions of the Raspberry Pi PowerHAT, confirming the output is always ~5.2V, with a multimeter.

Now, there are many different ways you can power your Raspberry Pi!

  • Power the Raspberry Pi with a LiPo Battery Only
  • Power the Raspberry Pi with a Micro USB Cable Only
  • Power the Raspberry Pi with an External Power Source Only
  • Charge the LiPo Battery and Power the Raspberry Pi with a Micro USB Cable Only
  • Charge the LiPo Battery and Power the Raspberry Pi with an External Power Source Only

The "external power source" could be anything. From anything as simple as another battery, or more advanced power generation methods, such as a thermoelectric generator, a solar cell, a wind turbine, a motor in reverse, and even a hydrogen fuel cell! The possibilities for powering a Raspberry Pi are now endless, making Raspberry Pi projects more advanced and portable!

The First Instructables Member to Post Pictures of Their Raspberry Pi PowerHAT, Will Receive a FREE 3-Month Pro Membership!!! 0/1 Claimed

The Next 3 Instructables Members to Post Pictures of Their Raspberry Pi PowerHAT, Will Receive a FREE Raspberry Pi Power Patch!!! 0/3 Claimed

Comments

curtis.newton.104203 (author)2016-12-27

soldering the headers using your breadboard as a support is the last (useless) thing you wanna do

Actually, you're incorrect. You insert the headers fully into the breadboard, that way it is heating up only the metal area. It will not melt the plastic because there is a lot of metal surface area to be heated first, and that takes a while. This is a actually a very popular method.

kofthelake (author)2016-04-13

Hi,

If you want something off the shelf, you might want to look at:

http://redoakcanyon.com/power-controller-hat-with-... , a fully compliant HAT power controller with a built-in a/d, or this,

http://redoakcanyon.com/intelligent-power-controll...

just the controller (not a HAT).

Both are intelligent on/off controllers, have a battery level monitor that tells the % battery power remaining and to initiate safe shutdown/power off when the battery is low, and come with a 2000 mAh battery. You just add your switch.

JamesP43 (author)2016-03-23

Wish all Instructables were this detailed and organized. Super great job, you should consider selling them

DylanD581 (author)JamesP432016-04-07

Thanks for the kind words! I actually had someone from Germany contact me, who will be purchasing 2 of them. I'll be putting up a few for sale on Etsy soon.

Nice work developing this Ible Dylan. I plan on giving it a try soon. In case I'm not one of the first three you'd better make those patches available somehow.

Awesome! I'd love to see how yours comes out! Ping me with any assembly questions. Good Luck!

DejayRezme (author)2016-03-22

Very nice! How does this compare to a 5V usb power pack? I've bought one of those with 2amp @ 5V for experimenting with mobile stuff but haven't used it much yet.

DylanD581 (author)DejayRezme2016-03-22

Thanks! The Raspberry Pi PowerHAT has the same output as most battery packs (~5.2V @ 1A), but it is made to power the Raspberry Pi with ease. If you have any other questions, feel free to ask!

jesterod. (author)2016-03-22

Very nice max amp output?

DylanD581 (author)jesterod.2016-03-22

Thanks for the kind words! It currently has an output of ~5.2V @ 1A. If you replace the PowerBoost 1000C with another Boost converter, you can have a higher output voltage.

embeddedmicro (author)2016-03-19

Beautiful Clear Instructable with the right pictures. Voted for you!

Cheers

DylanD581 (author)embeddedmicro2016-03-19

Thanks!

sspence (author)2016-03-18

I built one very similar to this before seeing this instructable, but I added a low power shutdown script that monitors the low power pin of the boost board.

DylanD581 (author)sspence2016-03-18

That's awesome! I'd love to see a picture! I thought about doing this, but with a simple circuit instead of code.

sspence (author)DylanD5812016-03-18

Will post shortly. The booster board outputs battery voltage except in low battery condition, then outputs a low, triggering a transistor that brings a i/o pin low. The code looks for that low, then triggers a shutdown command.

wesleyfurr (author)sspence2016-03-18

Can you provide some additional details as to how you did the low battery signal trigger? I've got a PowerBoost 500 I've been trying to get to communicate with a Pi digital camera without much success. Sounds like your transistor is the trick...but I'm not sure exactly what to use or how...

aakashsunkari (author)2016-03-17

I voted. Great job!

DylanD581 (author)aakashsunkari2016-03-18

Thanks for your support, Aakash

skilalowski (author)2016-03-16

just voted for you, good work

DylanD581 (author)skilalowski2016-03-16

Thanks!

nigel.trewartha (author)2016-03-15

A well presented and useful project, well done indeed!

I assume that one can use a LiPo with higher rate then 2A/h if a longer battery useage is needed?

Thanks for the kind words! You can absolutely use a higher capacity battery, but I chose this battery as it fits perfectly on the HAT.

I haven't found any batteries with higher capacities that would fit on the board.

You can always add another battery through the external power source input.

About This Instructable

21,368views

294favorites

License:

Bio: I'm Dylan Desrosiers, and I was born with a passion for making. In my free time, I'm an Inventor, Maker, Hacker, Tinker, and ... More »
More by DylanD581:10 Campers You'll Actually Want to Sleep InAeroelastic Flutter Energy Harvester - More Efficient Than a Wind TurbineCustom Live Edge Table
Add instructable to: