Posted on January 18, 2017 at 9:00 PM
A Long Time Coming: The PiMiniMint Project!
The idea of having a computer in an Altoids tin came to me back when in early 2012, shortly after the original Raspberry Pi came out. With the release of the Pi Zero, this became a possibility. The first version of the PiMiniMint contains a screen, Wi-Fi, Bluetooth, 32GB of storage, an infrared camera, and a full-sized USB port. When I decided to add a battery, I realized the camera needed to be removed. The current vision of the PiMiniMint contains a battery life of around 6-8hrs, a 2" screen, 32GB of storage, Bluetooth, Wi-Fi, and a full-sized USB port (in the form of an OTG cable).
Parts:Battery: 1200mah 3.7v Li-Po battery(pictured) 2500mAh battery used for most of the prototyping. This battery is rechargeable, thin enough to fit under the Pi in the case, and very easy to use. Just solder the red and black wires to the '+' and '-' connections on the charging circuit, and that's all for the battery itself. Any 3.7v Li-Po should work, although your mileage may vary.
Charger: The battery runs at 3.7v, the pi needs 5v. Additionally, Li-Po batterys have a habit of exploding if charged for too long, or not charged properly. Adafruit, one of the greatest websites out there, provide a circuit to both charge Li-Po and step-up the voltage. However, the cheaper option, is to purchase a generic USB charger, as pictured below. Often these USB chargers have a 3.7v battery, and output 5v. These little USB chargers are much cheaper then the Adafruit boards cost, although they will take a bit of preparation and desoldering to get it ready to use.
Pi Zero: Pretty straight forward on this one. A Raspberry Pi Zero. Should run you $5 if you can find it in a store, a bit more online if you need to pay shipping.
SD card: The Raspberry Pi doesn't boot off a hard drive, it runs off an SD card. Therefore, you need an SD card with an OS on it. There are plenty of guides out there on how to load an OS onto an SD, I may write one soon.
Male Headers: The Pi doesn't come with any sort of pins. 2x40 male header pins are cheap if you buy them in bulk. They are what allows the connection between the pi and the IoT HAT.
RedBear IoT HAT: This neat little device is a HAT for the Pi. What that means, is that it sits directly on top and interfaces with the Pi. In this case, the HAT gives the Pi Bluetooth and wifi capabilities. RedBear originally launched this as a Kickstarter, but it is now available in some stores. It is best for this project to get an IoT HAT with the female pins NOT soldered on, although you can only order the un-soldered ones from RedBear directly.
Screen: The Adafruit 2" screen was chosen simply because it fits. Any other size screen will not fit cleanly in the lid of the mint tin, and will cause issues with fitting any other parts in the bottom of the tin. Any screen will theoretically work, as long as it is a NTSC/PAL screen, (as long as it uses the yellow composite wiring).
Switch: Small on/off switch. Any will do, just make sure it will fit in the Altoids tin and is rated for 1 amp.
Mint Tin: I use an altoids tin, any generic mint tin of this size will work.
Stranded wire: Thin stranded wire is the easiest to use for soldering this project.
Soldering Iron: I use a generic HAKO soldering iron. Any will work, just make sure you get a quality one that holds the heat, and heats up fast.
Solder: Use thin gauge solder. It heats up faster, and is easier to control.
Solder Wick: For when you make mistakes, solder wick is the best way to desolder.
Double Sided Tape: I use 30lb double sided tape from my hardware store. Any will work as long as it is non-conductive.
Hot Glue: I always hotglue over my solder points. After soldering, put a drop of hot glue right on top and it'll help keep things secure.
Sugru: I just use this to keep things from moving around. The charger port can get pushed around a little. Sugru just helps to keep it fro sliding backwards.
Step 1:This is the easiest part, mount the screen to the lid using double sided tape. The 2in screen will fit just fine with the white charge port towards the hinge. This is important. If the hinge is not near the charge port, the wires will stretch or not make connection properly. The picture belows shows the mounted screen in the finished product.
Step 2:This will be the trickiest part of the entire guide. Preparing the circuit board from the USB charger to be ready to use in the mint tin. Start by disassembling the USB charger. If you buy the cheap one I pictured, the back just pops off. If you buy a different one, you'll need to figure out how to get it apart. Inside you will see a battery, and a circuit board with a USB port. Start by desoldering the wires from the battery off of the circuit board. Touch the solder joints with a fully heated soldering iron, the solder will melt, then just remove the wires. Next is the tricky part, you need to desolder the USB port. Using solder wick, put the wick on top of the solder joints. Heat the solder wick with the soldering iron. The solder will flow up into the wick and away from the board. If all goes well, the solder will be off of the board, and you can just remove the USB port. Be careful to make sure you desoldered all 4 of the USB data/power lines, and the 2 clips on the side (If needed. Not all USB headers have the clips). The board, at this point, is ready to use! Here is the guts removed from the housing of a cheap USB charger I purchased from Micro Center I just popped the back off, and pulled the guts out. We want the blue board that the battery is soldered onto, and the large USB header is what we want to remove.
Step 3:In the previous step, you removed the battery from the circuit board. In this step, you are soldering the Li-Po battery onto the charging circuit you prepared in step 2. Take the red wire, heat it up, and apply some solder to the wire. The solder should flow into the copper wire. By flowing solder into the wire, it will be easier to get it to connect to the charging circuit. Do the same with the black wire. Then, heat up the solder point for the '+' on the charging circuit with the soldering iron, and apply the red wire. Do the same with the black wire. Make sure to put Red to '+' and Black to '-'. At this point you successfully have the charging circuit wired up to the battery!
Step 4:Next we need to solder wires onto the USB headers of the charging board. These wires will eventually run to the on/off switch, and to the Pi. Start by putting a drop of solder on each of the side USB lanes. These are you're '+' and '-' lines. the left hand should be you're positive, right hand should be the negative. Put your soldering iron on the lane, and melt a drop of solder on each lane. Remember, heat up the surface you want to put solder on, before applying solder. Solder will flow to heat, so if the surface of the board is cold still, solder will not stick to it. Make sure to have a red and black wire length ready, strip the wire, and apply solder to the wire first, the same as step 3. Once the wires are prepped, solder them to the USB lanes. Red on the left, black on the right. At this point, you could theoretically hook the red and black straight to the Pi, and it would turn on! The picture for this step is bundled with the next step, so see the icture under step 5.
Step 5:Without an on/off switch, the battery would drain immediately. The on/off switch is going to go on the ground side. So go ahead, grab your switch, and put a drop of solder on 2 of the pins. On one pin, solder in the black wire from the charging circuit we finished up in step 4. On the other switch pin, solder on another black wire length. Remember to apply solder to the wire prior to soldering the wire to the switch. At this point, the loose red and black wires are ready to get soldered onto the Pi.
Step 6:The green Pi zero needs to be soldered to the red IoT HAT. To do this, take you're 2x20 pin male header section, and slot it into the GPIO pin holes on the side of the Pi. All 40 pins need soldered, and the easiest way to do it is to start on one side, do one pin, and get one pin on the far corner. The 2 pins will hold everything in place while you do the rest. To solder to a circuit board, the trick is this. Apply the soldering iron to the little ring on the board to heat it up. Then apply the solder to the other side of the ring, and the solder should flow perfectly around the pin, securing it. Do this for all 40 pins. Once all 40 are on the Pi, place the HAT on top of the 40 pins, and solder all 40 pins on the red IoT HAT. The easiest way to handle the HAT is to solder the inside row of 20 first, then do the outside. Note: This picture also shows some extra wires on the right, you havent quite gotten there yet. Thats step 7.
Step 7:Next, we need to solder the NTSC/PAL connector for the screen. It should be a red, black, yellow, and (white or black) wire. You have a positive, negative, data in, and ground/data out wire. The red positive wire gets soldered onto the pad "PP1" on the bottom of the Pi. This is 5v. The black ground wire gets put on "PP6". This is the negative. Your screen connector now has power. Remember, apply a drop of solder to the pad on the Pi, and apply some solder directly to the wire, prior to soldering both together. The Pi Zero has 2 sets of 2 holes off to the side of the GPIO that you previously soldered. The farther out set of 2 is the holes for the video wires. The square one is the data line, the circular one is the ground hole. I soldered mine on from the top, but it is easier to do if you do it from the bottom, and treat it like a pad. Fill each hole with solder, the more inner circle is the "square" one. This is the data one, and where the yellow one gets connected. If it all went well, you now have the screen connector soldered in. This picture is from an earlier build, when I soldered the wires onto the Pi first Now, I solder the all to the bottom. So the yellow/white wires should be on the bottom, not peeking out the side as seen here.
Step 8:The Pi works now. If you put the SD in, and plug it up to a regular micro USB charger, you should see it boot up just fine. So the Pi works, and the charging circuit works. Now to connect the two. The pads "PP1" and "PP6" on the bottom are where you attach the red and black wires from the charger, and the on/off switch. Attach them to the pads next to the NTSC/PAL wires, using the same bit of solder. Now, if you turn on the on/off switch, and if you have it hooked up to a screen with a charged battery, it will all work!
Step 9:Mount it all to the mint tin. Using snips, double sided tape, and hot glue, mount the whole creation into the mint tin. Use your imagination, my mountin method is not necessarily the only way to do it. If you discover a better way, let me know! Make sure you put the screen JST connector (the little white piece on the end of the NTSC/PAL wires I've been talking about) into the slot on the screen/lid, and it should all work perfectly. If not, its probably something shorting on the power line, so double check all solder joints.
All Done!You now have a fully functional computer in an altoids tin! If you can fit an OTG cable in the tin like I managed, awesome! The Pi also has a micro HDMI port, so if you do need/want to hook it up to a larger screen, you can! Enjoy, and find cool uses for it! If anyone uses it as a base for another project, feel free to email me about it! Additionally, if you run into issues definitely message me. I'll help you out! Some notes: Pictured here I used black Sugru over the charger. This is just to keep the charge port from getting shoved in. I also fit an OTG cable in the case, this is simply to make life easier.
Enter your name and email to receive notifications about new posts.
Like What You See?Consider backing us on Patreon to help cover server/project costs! Follow us on Facebook or Twitter!
Contact MeFeel free to email me at mwagner@hackmypi.com with any questions!
Comments