Hardware: The first controller

So for the first controller, I had a large piece of 1/2 plywood in the basement.  The idea was to basically make a sandwich out of two pieces of plywood with the wiring in the middle. (using regular wood is a better idea as this sits in your lap and the plywood splinters a lot easier, but I just went with what I had in the basement).

The joystick: I cut a piece about 9×15″ (which was my guess at how big it would be to fit comfortably in my lap). I then cut a rectangular hole on one side for the joystick….and threw that piece of wood out as the rectangle was too big.  The joystick has a pretty odd shape and you can’t cut the hole too big or you won’t have enough room for the mounting screws. So for my second attempt I traced as close as I could around the black frame of the joystick and inserted it through the bottom (taking the top metal plate off of the joystick).  The next problem was with the PCB boards that stick out around the black frame of the joystick. My wood is 1/2 thick and the gape between those boards and the top metal plate is less than 1/2 an inch. So I just inserted the joystick in from the bottom, and traced around the PCB’s with a pencil. I then took a router and routed down a little less than 1/2″ just in the areas where the PCB board needs room.  I gave the area where the wires connect to the joystick a little more room. I then sanded the whole thing down fairly well to remove any rough edges that may cause splinters. The whole joysticks in pretty snuggly when I put two mounting screws on the top and bottom of the joystick.

(Note: at this point when I was happy with how the top piece of wood looked, I set it ontop of another piece of plywood, traced around the border and cut another piece the same size to match. This will be the bottom piece)

The buttons: The buttons are 30mm, but I was able to  use a 1 1/4″ drill bit to drill 3 holes with 1″ between them. Then I just popped them in. Note that there’s 3 buttons instead of Adafruit’s 2 buttons. It’s just because I planned on connecting the controller to the RPi with a Cat5 cable. There’s 8 wires in a Cat5 cable so with 1 ground wire, and 4 wires for joystick directions, I had 3 wires left over…just perfect for 3 buttons.

The spacers. I then put in 6 spacers. It’s just a 1″ in diameter wood dowel rod that I cut into 1″ lengths and screwed them into the bottom of the board. In hind-sight, I’d make the spacers just a tad bit longer. The heigth of the buttons is right at 1.5 inches…so 1/2″ plywood + a 1″ spacer leaves no room at all for error. I had to bend a couple of the tabs over on the buttons to make everything fit.

Wiring, Preping the cable: To start, I took a piece of 30′ (ish) Cat5 wire and cut it pretty much right in half. This gave me two 15′ wires, each wire with male RJ45 connector on one side, and loose wires on the other.

(Note, here is where I started doing a chart to try to keep track of what colored wires were connected where…but at the end of the day I messed it up so I don’t actually recommend bothering with)

(Another note, I soldered all my connections as there’s nothing worse than trying to trouble shoot something with the possibility of a bad connection giving you additional problems)

Wiring, the ground wire: From here, I took care of the ground wires. I started with one tab (doesn’t matter which one) from the outside button and ran a piece of extra wire I had laying around to a tab on the middle button, then another wire from that tab to the 3rd button, and then another wire over to the black ground wire on the joystick. I then connected that last connection to one of the Cat5 wires.  This effectively connects the joystick and each button to the same ground wire.  So far, one Cat5 wire has been used.

Wiring, the other buttons: I then connected one loose RJ45 wire to each of the open tabs on the 3 buttons.  Pretty simple. So far, four Cat5 wires have een used (one for each button, and one for the ground).

Wiring, the joystick: With the four remaining Cat5 wires, I connect one to each of the colored wires on the joystick (remembering that black has already been connected to the ground).

1070084_10151729225538416_1844971478_n

Putting it all together: Now that all the wires are connected, I tied the Cat5 cable in a little knot around one of the spacers. This way if someone pulls on the cable, it pulls the whole controller, not the wiring connections. I screwed on the bottom board and it’s done. I now have one incredibly sturdy 3-button game controller (the third button needs to be mapped, but more on that later) that connects to the RPi with an RJ45 connector (more on that later too) that fits nicely in someone’s lap while they’re sitting on the couch. At some point, I’ll paint it to help prevent splinters (it’s plywood after all), but I sanded it fairly well and it’s okay for now.

controller

Advertisements
Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: