Raspberry Pi PowerHAT - Powering Your Pi, Simplified

29K30432

Intro: 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

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

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

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!

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.

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!

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.

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!

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!

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

29 Comments

not help anythink, how power to 12 volt display, pi need display too not only pi and battery. i have 10 inch display 12 volt need power, then need step down dc-dc 3A little board i have some, under 1€ cost. need me regulate 12 volt too, 7 W display need about 1A raspi 3 need min 2,5A how big battery need can use 4-8 hour. about, how much speakers take power ? what speaker module this need ? how charger, need sametime can charge when use raspi . need wireles keyboard and mouse power this too ? or have own battery ? or wired old keyboard and mouse need this lot power ? many need know want build laptoip raspi whit 10 inch display, i have display,raspi 3, step down converter 3A max. what more need can use and charge and speakers.i made wood case.

Very nice, well done, but time flies and as we are two years down the line it would be cheaper to buy one :-)

Haha, very true! At the time I made this I remember them !being available but on the expensive side. Now, you're absolutely right, they can be had very cheaply! But, the fun was in building it

oh it definitely is and I am no stranger to building something that economically did not rival anything on the shelf

A little bit confusing. You are recomming a Adafruit PowerBoost 1000C Charger, and then you are using the PowerBoost 500 in your drawings, which a different Pin-Out than the 1000C.

But nevertheless interesting article.

True, but the 500 does have all the same pins as the 1000C, just the 1000C has a few extra. All the pins are labeled, so really it shouldn't be a problem. The circuit design software I used did not have the 1000C board.

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.

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.

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

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!

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.

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!

Very nice max amp output?

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.

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

Cheers

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.

More Comments