Introduction: TinyPi - the Worlds Smallest Raspberry Pi Based Gaming Device
This is an entry in the
Pro Tips Challenge
This is an entry in the
Epilog Challenge 9
This is an entry in the
So I have been playing with making custom PCB's for the Raspberry Pi for a while now, and what started as a joke became a challenge to see how small I could go.
The TinyPi was born, it is based round a Raspberry Pi Zero, and almost fits within the same footprint. Im pretty sure this is the smallest Raspberry Pi based gaming device in the world, but thats unofficial ;)
So lets see what it takes to make a TinyPi...
Step 1: The TinyPi Kit
So the biggest requirement here is getting your hands on a TinyPi kit. They were on sale for a while on Tindie, but demand was too great, so they will be available on CrowdSupply soon...
The kit consists of the following parts,
- Custom made PCB
- 1.44" tft screen (128x128 resolution)
- 5 way navigation 'joystick'
- 2 silicone topped action buttons
- 2 Piezo transducers to provide stereo sound
- 3 way navigation switch for additional buttons
So that concludes the kit, lets put it together...
Step 2: Solder the Pi
So the first step is to solder the Pi to the PCB. This is a pretty tricky part of the process as the boards sit back to back and there are no headers. Your best bet is to watch the video.
The first step to attaching the Pi is to prep the PCB. The 40 gold pads that the pi attaches to need to be 'tinned' with a small amount of solder. This will make it easier to get the boards to attach.
Once your pads are tinned, add some flux to them to help with the next step
Your next step is to clamp the 2 boards together. The best way is to use some M2.5 screws and nuts, and clamp the corners.
Once your boards are clamped together, you need to apply solder to each one of the 40 gpio pin holes. The best method is to actually push the cold solder into the hole, then touch with the iron. This will help to get the solder into the hole before it melts. Feed a little more solder in, and keep the iron there for 4-5 seconds to let the heat transfer through to the pad below.
When you have done all 40 gpio holes, go and grab yourself a drink, then you will be refreshed for the next step
Step 3: The Components
Once you have soldered the pi, you can start on the front components.
5-way navigation switch
The 5-way switch looks like a tiny joystick. On the bottom of the component, there are 2 pegs of different sizes. These pegs will aid with locating the component, and ensure that it is the right way round. If it doesn’t sit right, try rotating it 180 degrees and see if that is better. Once the switch is in the correct place, carefully apply a small amount of solder to each of the 6 pins, and then the 2 anchor points at each end. Check the solder joints with a magnifier to check for good solder joints and to ensure there are no shorts between the pins
90 degree slide switch
This is the power switch for the system. It also has pegs on the bottom to help with location, however it is easier to check this part is correctly aligned. Carefully solder the 4 anchor points for the switch, and the 3 terminals of the switch. It is easier to hold the component firm with tweezers or a small clamp while you solder the first point. As before, check the solder carefully for shorts, and good clean joints.
These buttons are slightly more tricky to solder. They have no pegs to aid location, so you have to place them carefully. The easiest way to do this without having 3 hands, is to place a tiny blob of solder on one of the pads. This will allow you to hold the component in the correct place while you re-melt the solder to affix the component. You can continue and solder the other 3 pins, then check that first pin has enough solder on it. Repeat the process on the second button, and check your solder again
3-way navigation switch
This is another switch which has location pegs. It is again easy to see when this correctly placed. Some of these switches have longer sides, and are more difficult to solder the side anchor points. If you solder the 3 terminals which are easy to access, then you can hold the switch one side, then the other while holding the top of the switch out of the way. Check your soldering, then we can move on
This is the resistor that controls the brightness of the screen backlight. This is a tiny component, so you have a few spares in you kit. Being so tiny, there are no location pegs, so it is best to apply a spot of solder to one of the pads, as we did with the action buttons. You will need tweezers for locating the resistor, and melt the solder once you have it correctly placed. Once the resistor is in place, you can solder the other side. Because the resistor is so small, it is possible for the solder on both sides to melt, so be careful with the iron! Check again for shorts, and make sure your resistor has not moved off the pads
These are nice and large compared to the other components. There are no location pegs, but it is pretty easy to get them in the right place. The only thing to watch for, is to make sure the holes point outwards. This hole is where the noise comes from. You can use the pre solder method again to help with the soldering, and check you solder joints.
Now your ready to attach the screen!! That gets its own step!!
Step 4: The Screen
We have left the tricky soldering till last! Although don’t worry, is not actually that difficult if you take it steady. First off, tin the screen pads as we did the pads for the pi. apply some flux to the tinned pads and align the screen pads with the PCB pads. Double check you have the screen correctly oriented. If in doubt, tape the ribbon down and fold the screen where you would expect it to be (remove tape prior to soldering)
Once you are ready to solder take a deep breath and make sure the iron is clean and ready. Holding the ribbon in the correct place, gently hold the iron on the first pin on the ribbon. You should see the solder on the PCB change as it all melts together. Repeat this process for the remaining 12 pins taking care not to damage the ribbon with the iron. Gently check the ribbon is attached, and check your solder for shorts. Fold the screen back so it sits on the piezo traducers. The screen has some double sided tape strip’s on the back to help hold it firm. But it’s best to test everything is working before we go any further.
You should now have a completed TinyPi ready for some software. That is covered in the next step...
Step 5: Tiny Software
So your TinyPi is all built up. Your going to need some software to make it work. You can download this from the Pi0cket site here which is a custom made version of RetroPie that has the screen and buttons pre-configured. You can of course make your own image, however its a guide in its own right!! There is such a guide here
You will simply need to add your own ROM's. The image has samba removed so improve boot times, so you can either use the USB or the SFTP methods detailed here
For the SFTP method you will need to get your TinyPi on your WiFi network. The easiest way to do this is to download a wpa_supplicant file like this one and fill it in with your WiFi details.
Your ready to roll with your TinyPi!!!
Step 6: Adding Power
So you have your TinyPi all built up. But how do you power it?
Well the easy answer is to use a USB Power bank. Simply pop the USB into the pi, and you will see the screen spring into life. There are of course downsides to this method. Firstly the power switch at the bottom will have no function. So you will have to pull the USB out whenever you want to turn your TinyPi off. Secondly the USB Cable will be getting in the way!! nobody wants cables in the way!!
You may have noticed while building your TinyPi, that there are 2 unused pads, labelled BAT- and BAT+. Now i’m sure it doesn’t take Sherlock Holmes to realise that these are where you connect the battery!! Now a word of warning on these pads, there is no protection on these at all. If you connect things backwards, the magic smoke may be released from your freshly soldered Pi, and you may end up with a very expensive desk ornament.
So connection is simple enough. The BAT+ terminal is the positive battery terminal. BAT- is for the negative battery terminal. While you can connect the battery directly to the board, i don’t recommend it, as this will make your life more difficult when it comes to charging, plus if you accidentally leave your TinyPi switched on, you could destroy the battery It is therefore a good idea to use a charge/protect board between your TinyPi and the battery.
The case files are designed round the super common TP4056 charge/protect board. These have 6 ‘holes’ in the board to allow you to solder onto. Try to avoid the boards with just 4 ‘holes’ as these are not protected, only charging.
Here is how I connect the TP4056 board…
- + (by the usb socket) – this is for input, leave this unconnected
- – (by the usb socket) – this is for input, leave this unconnected
- B+ – this is where you connect the positive lead from the battery
- B- – this is where you connect the negative lead from the battery
- OUT+ – this is where you connect to BAT+ on TinyPi
- OUT- – this is where you connectto BAT- on TinyPi
Now the protection board is designed to disconnect the battery from the system when the voltage is too low. When the battery is removed altogether, this triggers the protection, so before we can test our wiring, we will need to connect the charger for a second. You should get the red ‘charging’ LED illuminated, if you get any flashing or flickering of any of the LED’s disconnect the charger and check your wiring.
Once your wires are good and you getting a steady charging light, you can try throwing the power switch down at the bottom of your TinyPi If all was well, your screen should have lit up, and if you have an SD card in there ready, the pi should be booting… Ready to play….
Step 7: Adding Casing
Your TinyPi is almost complete, but you will notice that it is a little fragile, and you wouldnt want it to break in your pocket now would you!! So to make it safer, we are going to need a case for that little bundle of joy.
Thankfully there are some STL files you can download to make a tiny case for TinyPi. You can find the files here...
- The back holds the charger board and battery
- The bottom cradles the bottom of the screen
- The top cradles the top of the screen
- The buttons give you the action controls
- The stick is a nice top for the 5-way navigation switch
The case is a little bit of a fiddle to assemble, but the video is the best way to explain
Step 8: Enjoy!!!
So thats it!! Your TinyPi is all ready to go. Now go and play some games :)
We have a be nice policy.
Please be positive and constructive.