Introduction: Adafruit Pigrrl 2
Hi!! I'm a student in Ms. Berbawy's Robotics Class at Irvington High School tasked with building a project to be presented at Maker Faire Bay Area in San Mateo this year. For my project, I chose Adafruit's PiGRRL 2.
The PiGrrl 2 is a DIY handheld gaming device that utilizes the RetroPie OS on the Raspberry Pi 3B to emulate a plethora of roms and their associated games.If you choose to make this project, be aware that it does require a know-how in soldering and access to a 3D Printer. To see the original design and additional information visit the Adafruit Page.
Step 1: Parts
All hardware utilized in this project can be purchased from Adafruit's associated project page. The page also includes an all in one kit, save for the Lipo Battery and Pi 3, although the kit is rarely available. If you wish not to buy this project from Adafruit, you may also find all the parts on Amazon; it will, however, run the project price somewhat higher. Here's a comprehensive list of all the hardware:
- Raspberry Pi 2 or Raspbery PI 3
- Micro SD card 8gb+
- USB (for installing roms)
- 2.8" PiTFT Plus
- PiGRRL Gamepad PCB
- PowerBoost 1000c
- 2500mAh battery
- PAM8302 2.5W Audio Amp
- Mini Metal Speaker
- 40pin GPIO ribbon cable
- Slide Switch
- 10x 6mm + 2x 12mm tactile buttons
- 1x 2by20 pin IDC box header
You will also need some tools and supplies:
- Soldering Iron and Solder
- 3D printer and PLA/Ninjaflex
- Wire Strippers
- stranded wire from 20 Awg to 30 Awg (Your preference)
- 14x #4-40 3/8 machine screws
- 6x #2-56 3/8 machine screws
- Screw driver
- Super glue or Mounting tack
Step 2: Software
Before you start anything else on this project, you must first install the Retropie OS onto a micro sd card to later be inserted into you Raspberry Pi 3. I found that youtuber ETAprime provides a very well made guide on how to install retropie and its respective roms.
Step 3: Mapping and Connecting to Wifi.
After the Pi has loaded in Retropie, you will be prompted to map the buttons to your keybaord. After mapping the buttons, scroll down to the wifi option and hit enter. Connect to your preferred network. You may also connect the Pi to a LAN cable to provide a ground connection.
Step 4: Software Pt.2
After you have connected to an internet network, hit f4 to enter a command-line prompt. You need to set up the support for your PiTFT (the small screen included in this project). Enter the commands below hitting enter after every line:
curl -O https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/pitft-fbcp.sh
sudo bash pitft-fbcp.sh
You will be prompted to select a system to download the files for, select PiGRRL 2. It will then ask you to reboot, answer "NO"
Now you will download the script that enables the button layout on the PCB.
Enter these commands in the command-line prompt:
curl -O https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/retrogame.sh
sudo bash retrogame.sh
Once more select the PIGRRL 2 option and reboot once you have been prompted.
Your monitor could possibly display "weak or no signal" as it can not display the resolution your pi is now running on
Step 5: Gamepad
To begin assembling your gamepad, you need your Gamepad Pcb, ten 6mm tactile buttons, and a box header.
First you insert the box header on the back of the PCB so that its 40 pins all go through their respective port on the PCB. Maker sure the notch on the header is facing up.
Flip to the front making sure the header does not fall out and begin soldering each pin on the PCB.
TAKE YOUR TIME! The last thing you want to is de-solder a pin (it can be a pain).
Once your soldering is complete, your PCB and box header should look like the second photo above.
Now you solder the 6mm buttons onto the PCB.
Place one button so that its four pins can go through the 4 holes on each spot on the PCB. On the back of the PCB, bend the four pins of each button inward and solder each individual pin. You will do this ten times, once for each button.
Step 6: PiTFT DISPLAY
This step is relatively easily, all you are doing is severing a connection on the back of the PiTFT display.
The connection is labeled as "#18" on the back. Cut the tiny connection with an exacto knife or any other sharp tool so that the bridge is severed.
Step 7: PiCable
This part is also relatively simple although you have to work very carefully. You will be resizing the picable from its stock 152.4 mm length to 108 mm length. First measure out 108 mm on the cable and mark it. You will cut the remaining 44.4 mm with an exacto knife or some sharp scissors. On the snipped off end, carefully remove the the pin connector, its has two tabs on the sides that you have to disconnect in order for it to be removed. Once you have removed the top half, you will be left with the end connectors internal pins puncturing through the cable, slowly peal off the remaining cable from the pins on the connector.
Now, you re-apply the the header onto the resized PiCable.
To do this, you will put the top part of the header (one without pins) on the bottom of the PiCable. Make sure the small cables of the PiCable fit evenly into the grooves of the header half. Now you with put on the header half with the pins such that the notch on the header is facing away from the cable as seen in picture 2 (I borrowed a picture from adafruit to help demonstrate this).
Now the pins on the second half of the header must puncture the cable and clamp with the other half. Your best option to do this is lightly hammering the pin header with a rubber mallet on a hard surface. BE CAREFUL TO MAKE SURE BOTH HEADERS ALIGN AND THAT NO PINS BREAK.
Step 8: Amp and Speaker
This step requires you to connect two components, your Amp and you metal speaker.
First you need to cut two pieces of stranded wire (red and blue), each at 9mm in length. Strip both ends so that they can be soldered.
Now solder your red wire and blue wire to each pad as seen on the picture above.
You will now solder the other ends of the wires to your Amp. Red is soldered to the positive output on the amp and Blue to negative as seen in the second picture.
Step 9: The Power Circuit
The central part of this circuit is the PowerBoost 1000c. We will be connecting all our major components to this board in order to create the circuit to power our project.
First you will connect you Amp and speaker to the Power boost via to wires measuring 3cm.
Strip both ends of these wire and solder the the red wire to the VIN pin on the amp and blue wire to the GnD pin.
Now you will solder the wires to the PowerBoost. The VIN connection on the Amp goes to the 5V connection on the PowerBoost and the Gnd goes to the G connection.
Now you will solder the button to the PowerBoost.
Cut yourself two stranded wires, at 7cm of length, and strips its ends.
Now you will cut off one of the 2 outer legs of the button (this is your preference)
Solder one wire to each of the two remaining legs of the button.
Now to solder the button to the PowerBoost, you will solder one wire to the EN connection and the other to the GND connection on the PowerBoost.
Above a picture of the completed part.
Step 10: Pi Audio
This is arguably the easiest part of the project
You are soldering the Amp to the Raspberry Pi to enable the audio connection
Get your pi 3 and flip it to the under side. Locate the two pins in the top picture and prepare to solder wires to them.
Cut two wires to about 10cm in length and strip both ends. Now you will solder both wire to the pins as seen above
You will now solder the other ends of these wire to the AMP. Red goes to the top most pin labeled as "A+" and blue goes to "A-". After soldering your audio should work once your everything has been put together
Step 11: The Shoulder Buttons
Finally, your 12mm buttons come to play.
Before any soldering is to be done, you must snip off two pins on either side of of the buttons. The first picture shows a before and after, just so you dont mess up.
Now, you will get two stripped wires for each button. They should be measured out at 14cm each.
You will solder one wire to each pin as seen on the second picture.
Now you with solder these buttons to the gamepad PCB. The third picture above shows how to solder the buttons to the back of the PCB. From left pin to right, you solder L button, R button, and then Ground Ground.
Now you want to solder the finalized PCB to the PowerBoost 1000C.
Strip two 14cm long wires and solder them as seen in the fifth picture.
In my photo I used a black and white wire. Black is connected to the 5V pin and white is connected to the GND PIN.
Connect the PCB to the PowerBoost as seen in the sixth photo. Black to the "+" connection and white to "-".
Step 12: 3D Printed Parts
To find the STL's for all the 3D printed parts, visit Adafruit's Thingiverse page at http://www.thingiverse.com/thing:1277483.
You will print both halves and the shoulder mount in PLA of your prefered color
The buttons can either be custom made or printed in NinjaFlex.
Step 13: Connecting and Testing Your Curcuit
Now that you have all your components soldered together, you want to connect your parts to create a functional curcuit. First you want to connect your gamepad to your PiTFT; the 1st photo demonstrates this connection. Now you want to connect your pi3 and your PiTFT together; the second reference photo demonstrates the connection.
Now to power the circuit you need your LiPo. Connect your LiPo to the powerboost 1000 and flip on the switch. Loading retropie takes a while. Once emulation station has opened up, you will be prompted to map the keyboard buttons; map the buttons accordingly so that your gamepad key presses correspond to emulation station. Don't forget to map your shoulder buttons.
Step 14: Putting Together Your PiGrrl 2
First insert your buttons into their respective ports.
Next, you'll mount your PiTFT screen to the the inside of the front half of the case. Under the screen you'll mount the game pad PCB, this can be a hassle as the game pad is shifted to the left in respect to the PiTFT (the picable will sit at an angle inside the case. After you have mounted those said parts, insert your metal speaker into the spot shown in picture 4 and secure it with super glue.
Now, you will mount your Amp and Powerboost 1000c into the back half of the case as seen in picture 5. To secure your back buttons, glue them onto the 3D printed shoulder mount and screw the mount into your case. Now you want to secure the power button into its respective spot on the case making sure it not loose, you can use super glue to secure it.
Before closing up your case, you will want to plug in your Pi 3B into the PiTFT screen as seen in picture 8. Furthermore, you will want to plug in your LiPo battery into the Powerboost 1000c and secure it into the case as seen in pictures 9 and 10.
Now to complete your project, close up your case and make sure no cables have been caught between both halves of your case. Make sure all seems have been fully closed and feel free to secure the cases together together with screws, they will go through screw holes on the back of the case.