Welcome back — it feels like it’s been ages since part 3! Sorry about that. Now that the site/forums/wiki are all in a stable place I’m hoping to crank out the last couple guides pretty quick after this one.
Today we’ll be:
- Mounting all the buttons (including the L/R buttons)
- Mounting the display driver board
- Mounting and running wires for the micro USB charging port and external USB port
- Desoldering the headphone jack and wiring it up to the amplifier and speaker
- Desoldering and wiring up the power switch
- Making a power strip that will let us power the front side of the case with just 2 wires coming from the back side
If you bought a used Game Boy and/or NES controller for this project, now is the time to wash those buttons before we mount them. Seriously, the ones I got were gross. Then put them in the case, and screw in the button board. Make sure everything feels right (it’s also not a bad idea to plug the Teensy into your computer and make sure all the buttons still work and nothing came loose).
If your wires are too long, you may want to consider desoldering them from the Teensy, trimming them down so they just reach the top of the case, and re-attaching them. The less excess wire in here, the better.
With where we’ll be putting the Teensy, I recommend putting a strip of electrical tape across the top, so that nothing touches any metal.
We’ll put the Teensy top-down at the top of the case, USB connector facing to the right. Just put a glob of hot glue at each corner. Make sure you don’t cover the USB pads (the ones on the right that say VUSB, D-, D+ and GND) with any glue.
Next mount the display board. Put some electrical tape over the top, just to be on the safe side:
CAREFULLY re-connect the display ribbon cable:
Lay it back down so the power and video wires are facing down. Put a glob of hot glue on all the corners, positioned about you see in the picture below.
Just make sure there is enough room on the right-hand side for the HDMI port and micro USB ports to hang over the edge (with the HDMI port lined up with the contrast wheel area):
Alright, onto the headphone-jack! Desolder the 5 pins holding it to the board. A desoldering braid will work, but it’s easier with a solder sucker if you have one. They are super handy, and you’ll definitely use it again in the future if you do more projects. If you’ve never used one before, you use it by pushing in the plunger, lining up the tip to the melted solder you want to remove, and pushing the button. Voila! The solder magically disappears.
Holding the pins up on the headphone jack, the bottom-left one is ground, the top-left two are the L/R channels. The two pins on the top right and bottom right are special. They are connected to each other until you plug in headphones, at which point they are no longer connected. So what we’ll do is wire up the speaker’s + to the bottom-right pin, and – to ground. That way the speaker will be connected until you plug in headphones, at which point it will disconnect.
Holding the speaker like you see in the image below, the right wire is positive and the left one is ground. You only need a little over an inch in length for both wires.
Once you have it wired up, it should look like this:
Now, I’m doing mono sound on mine (this ONLY applies to the 3.5mm jack though — HDMI will of course still output stereo), so we are going to bend the top two outer pins inward so they meet with the middle pin and solder them all together.
Now connect wires to your amplifier for power and audio input. The power wires don’t need to be very long at all, an inch or so is fine. Make the audio input ones pretty long for now though, and we’ll cut them down to size later:
Next solder the amplifier output to the headphone jack. Remember the ones we bent together are the positive, and the bottom-left one (holding the headphone jack hole down facing down) is ground:
At this point if you want to test it, you can do so by either wiring up the raspberry pi to it (Adafruit has a great guide for audio out on a raspberry pi zero). I’ll be covering audio out in the Raspberry Pi Zero in the next guide. Your other option is wiring it up to a breadboard with a 5v power source (like USB), and an audio input (like a phone’s 3.5mm output):
Now just glue it all down as shown below. It helps a lot to glue a small piece of plastic below where the headphone jack will go to act as support (watch the video to see what I mean).
Alright, that’s it for the audio stuff for now. Now we’re going to make a power-strip sort of thing that will let us power the screen, Pi, USB Hub and amplifier with only two wires from the other side of the case (which will have our battery and power boost in it). I used a prototyping board that I got from Radio Shack for I think $2. You can get them in all different configurations, and they are basically just perfboard with some copper traces connecting some of the holes in various patterns. Very handy.
Cut out a couple of the copper strips.
Someone on the forums mentioned using a couple strips of copper tape for this, which is a great idea, but I haven’t tried it and it seems like it might be a little messy. But if you don’t have access to a prototype board like I used and you still have some copper tape from doing your X/Y buttons, this is probably an option.
Solder two wires to one end of it for power input. The other end of these wires will connect to the Powerboost in the other side of the case later on, so make those wires fairly long. Also use a heavier gauge of wire than you used for the buttons and audio signal and stuff, since these will actually be carrying a fairly large amount of current:
Now solder on two more sets of red/black wires to the adjacent holes. These will eventually go to the Raspberry Pi and the USB hub:
Connect the screen and the amplifier to the remaining two sets of holes (assuming you had as many holes on your board as I did to start with…), and then glue it to the bottom-right wall of the case:
Now for the power switch. You have two options here: desolder the power switch, which is what I did and is a pain in the BUTT, let me tell you (and you run the risk of damaging the switch in the process).
Snipping the four corners of the metal shell helps:
Or you could just cut out that part of the circuit board as close to the edges of the switch as you can. I kind of wish I had done that in stead.
Once you have it off, you’ll see there are two sets of pins in the middle. The upper left pair is bridged when the switch is pushed that way, and the bottom right pair is bridged when the switch is the other way. We’ll wire it up to the PowerBoost such that when the switch is off (pushed left from this orientation) the EN and GND pins are connected, which will disconnect the battery:
Solder two long and thin wires to the top-left set of pins:
Now mount it in the case with some kind of support underneath. I’ve been using small pieces of perfboard, which has been working great. Put plenty of glue around it so it’s nice and sturdy:
Now for the micro USB charging port. From the way I’m holding it below, the leftmost pin is 5v, and the rightmost pin is ground:
If you hold it up to a light you can see that the vast majority of this board is empty space. Dremel it down as far as you can without messing up the traces in order for it to fit next to the screw post it will be up against. It’ll be roughly this shape when you’re done:
Solder wires up to 5v and ground (again, heavier-gauge than the ones you used on the power switch, buttons, etc, since it will actually be carrying a fair amount of current):
There is a small plastic protrusion right next to where we are going to put this, which gets in the way. Trim it down with an X-acto knife:
You’ll definitely want to put some support where we are about to mount it (again, a piece of perfboard is perfect for this). I also put a bit of electrical tape on the metal part covering the adjacent screw post, because I’m paranoid about that kind of thing:
Now glue down the micro USB port. It helps a LOT to actually plug it in to a USB cord and put a little tension on it, pulling it towards the side of the case and holding it straight. Like the power switch, put a fair amount of glue above and below this thing in order for it to hold up to heavy use.
Now for the external USB port. Your PowerBoost should have come with a port like the one below:
Connect wires to the 4 pins in the back. If you’re holding it like I am in the picture above, the wires will go (from left to right) black, green, white, red. You can use whatever colors you want, really, but these are the standard USB colors and they are what I’ll refer to them by when we wire everything up. Make sure the green and white ones are long enough to reach to the other side of the case, so they can connect to the USB port that will be there eventually. The red and black wires don’t need to be as long since they will stay in the same side of the case. Also use the same thicker wire for the red/black wires since they have to carry power to whatever you plug in.
Heat shrink tubing is fantastic here to keep the pins from touching eachother after you solder them:
Lay it in place as shown below, with the pins facing down. Put a piece of electrical tape behind where it will be seated, to avoid anything touching that metal plate.
Once you have it seated nice and straight, really let it have it with the glue, beside and below it. Inserting USB cords won’t be an issue with this one, since it has a nice wall behind it to let it push up against, but removing things will wear on it over time if you don’t put enough glue down:
The last thing for today is the L/R buttons! In the picture below, the two left pins are connected and the two right pins are connected. When you push the button down, all 4 are connected.
Solder a wire connecting the inner-top corners of both switches (not very long, maybe 3 inches). Then solder one much longer wire to the bottom-left pin on the righthand button. This is what will go to ground on the PowerBoost (which in turn is connected to ground on the Teensy). Finally, connect two fairly long wires (6-8 inches) to the bottom-outer pins. These are the wires that will go to the Teensy. The image below should help, and the video should help even more:
Seat them in the screw holes, make sure they are centered and straight, and glue ’em down. Might want to test your connections with a multimeter before doing this. Again, be generous with your glue here – these are buttons that will be pushed on repeatedly.
At this point you can either solder the L/R wires to pins 10/11 on your Teensy or save that for later. I’m saving it for later so the two halves of my case aren’t tethered together yet.
That’s it for this time! We’re getting close to the end here — I think maybe 2 more and we should be done!
Next time I’ll go over making the SD card reader cartridge, and showing you the options you have there (I’ll also show you how I made the label). I’ll also explain how to get audio output from the Raspberry Pi Zero, via both PWM audio and a USB sound card. I may also put the rest of the power wiring in there with the PwerBoost as well — we’ll see how long that other stuff takes.
Don’t forget to enter to win the one you see me making in the videos at the bottom of this post (sorry if you are having issues entering with twitter. I’ve emailed their support and they say they are aware of the issue and are working on it.)! The winner will be chosen at the end of this month (May 2016, for anyone reading in the future), and I’ll send it out whenever the guides are finished!
Until next time!Rewards Fuel social media contests