Arduino Leonardo Game Controller for Quadriplegics

by charlie.hart in Circuits > Assistive Tech

191 Views, 1 Favorites, 0 Comments

Arduino Leonardo Game Controller for Quadriplegics

FEECDB12-2F2E-4B1E-A7C0-25BBE8F088E1.jpeg

I have created a game controller for paraplegics that can be plugged into computers and used in place of the arrow keys. Paraplegics don't have control of their arms and often need to rely on their head movements, so the controller focuses entirely on head movements to move the arrow keys.


Completed Product Video

https://youtu.be/-309JN9eohk

Supplies

Breadboard Prototyping

arduino breadboard.jpg

Every good engineering project begins with a prototype. Using your breadboard, you can begin to build a mock perfboard model, allowing you to ensure that the circuit you designed would be functional on a perfboard.


Materials used:

  • 1 Breadboard
  • 6 Breadboard Wires
  • 3 1-Megaohm Resistor
  • 1 Arduino Leonardo


First, familiarize yourself with your breadboard. You'll maybe be able to notice that it's divided into three sections. In this description, I will be describing the breadboard as if it were oriented with the long edges on the side and the shorter sides on the top and bottom. The narrower sections on the sides consist of two columns of holes, whereas the much larger, central section is comprised of about 10 columns of holes. Beneath the whole breadboard, there are strips of conductive metal that allow electricity to flow between wires attached to different holes. In the central section, the holes are connected horizontally, allowing electricity to flow to wires attached to the same row, as opposed to the sections on the sides, which are connected vertically, meaning electricity can flow between wires plugged into the same column.


Next, attach 3 breadboard wires to the holes on the Arduino Leonardo labeled A0, A1, and A2. In the picture provided, I used 4 wires, but the final wire served no purpose in the final product. Attach these wires to the breadboard in separate rows in the central section. Then take another wire and attach it to a hole on the Arduino labeled 5V and plug that wire into a hole in the narrower section closest to the Arduino. From there, insert 3 1-Megaohm Resistors with one end in each row so that electricity can flow between the 3 wires and the 3 resistors. Attach the other end of the resistors to the same column as the 5V wire so that the electricity now flows from the 5V wire through the resistors to the 3 wires. Finally, take a wire and attach it to a hole labeled GND in the Arduino and a hole in the narrow section furthest from the Arduino. Now, in the picture provided I have attached the 6th wire to a hole to the left of the GND wire by mistake. Instead, if you want to be able to test your breadboard fully before building your perfboard, add the 6th wire to a hole below or above the GND wire, not to the side. This will complete your breadboard prototype.



Constructing Your Perfboard

perfboard.jpg

Now that you've done all that work, transferring the technology onto the perfboard will be a breeze. If you're able to use solder, then you're golden, but if not, I highly recommend you familiarize yourself with how to use a soldering pen and wear goggles when using the soldering pen.


Material used:

  • 1 Perfboard
  • 5 Breadboard Wires
  • 5 Alligator Clip Wires
  • 3 1-Megaohm Resistors
  • 1 Arduino Leonardo
  • Conductive Wire


This process is a wee bit easier than the breadboard. You can keep your 5 wires in the A0, A1, A2, GND, and GND. Remove them from the breadboard and put each end through a hole in the perfboard, maintaining the pattern of the breadboard (3 in the same column, and 2 in other columns near the edges of the board). It's not mandatory that you keep them in similar formation, but it's a bit more neat and satisfying, don't you think? However you choose to place them, solder them in place using the soldering pen. Once the wires are cemented in the board, place the resistors in the perfboard, connecting one end to the exposed tips of the wire and keeping the other exposed so that it may connect to another wire. Solder these in place as well. Be sure each wire/resistor combo are not touching or interacting with the other wire/resistor combos. Think of each wire/resistor as a path from the Arduino the game controller. Each wire leads to a different button, so if the wires are touching, the signals will get jumbled and the controller won't work. Now that your wires and resitors have established a conductive path from the Arduino to the end of the resistor, and you have attached the 5V wire to the perfboard, you may need to add a bit of conductive wiring to connect the exposed ends of the resistors. Now, I know I just made it very clear that the wires shouldn't touch, and the proceeded to instruct to connect the resistors to one wire. Sorry for the confusion, but this is because the 5V wire adds power to the circuits, whereas the A0, A1, and A2 slots receive the electrical signals from those circuits, so keep each wire separate but attached the ends of each resistor to the same source of power.

Finally, take the 5 alligator clip wires and strip one end of each wire, keeping only one alligator clip attached and exposing the actual copper wires within the rubber covers at the other end. Attach these copper wires to the exposed ends of the breadboard wires.

Cardboard Frame

cardboard.jpg

Now you're moving on to building the body of the controller.

Materials used:

  • Cardboard
  • Hot Glue
  • Tinfoil


The first step is pretty simple. First, cut out 4 18"x4" cardboard strips. Then, cut out 3 5"x4" strops and a 2"x4" strip. Place the 4 strips in the form of a square, connecting the smallest edges (4") of each rectangle at the corners. Hot glue these pieces together. Now, to add both stability and simpler buttons, glue the remaining pieces of cardboard inside each corner so that they form a right triangle within the square. If you want to adjust the size of each cardboard strip, feel free to do so, just make sure that the pieces remain proportional to one another. Once everything is glued into place, wrap the three larger triangles in tinfoil. Tinfoil is conductive, and when all the wires are attached, these tinfoil squares will act as the buttons, the center button being the up arrow and the side buttons as the side arrows.

Building the Headband

851A2282-4050-495D-90E2-9EC667E8BEE9.jpeg

Now we're moving on to the headband for whoever is operating the controller. When the headband makes contact with the tinfoil buttons, the circuit will complete and the computer will receive a signal that the up arrow has been pressed.

Materials used:

  • Cardboard
  • Duct Tape
  • Tinfoil


Heads come in all shapes and sizes, so be sure that your headband fits securely over the head of whoever is intended to operate the controller. I started by cutting out 12 small 1"x2.5" pieces of cardboard to create a strong skeleton for the headband. Then, I lined them up in a row, leaving a little bit of space between each piece, with the long edges on the side and shorter edges on the top and bottom, and duct-taped them with two pieces of duct tape. I placed the duct tape perpendicular to the cardboard so that one strip could cover multiple pieces. I used 2 pieces and placed each one so that they could cover either the top or bottom half of the pieces of cardboard. This left a significant amount of duct tape hanging over the tops and bottoms of the row of cardboard which I could wrap over the edge and cover the other side of the cardboard pieces with duct tape.

I know it may be a little hard to visualize, but imagine you placed 10 playing cards in a row and duct-taped the upper half of them with one single strip and folded it over the top, creating a strip of cards with duct tape cover the entire top half, and the did the same with the bottom.

Now, you should have a sort of snake of duct-tape-covered cardboard pieces. You can wrap this around to form a circle. This is the base of the headband. If the circle isn't big enough, feel free to add more pieces to the edge. It's fairly easy to add more pieces because duct tape is a magical substance. Once the headband wraps around the player's head snugly, but not too snugly, wrap the edges in tape so they maintain that circular shape.

PVC Post

724ECE20-001E-4AC2-BEF4-8A01ACF5DCDC.jpeg

To keep your controller at head level, you will use an adjustable post to prop it up in place.

Materials used:

  • 2' PVC Pipe
  • Hot Glue
  • Duct Tape

This step is fairly simple. If your PVC pipe is longer than 2 feet, just cut it down to size. Otherwise, it's pretty simple. Drill a hole into one side, not through, 2 inches above the base of the PVC pipe. Add 2 more holes, each placed 2 inches above the last hole. You should end up with a line of holes with one placed 2 inches above the bottom, one 4 inches above the bottom, and one 6 inches above the bottom. Now, Insert the pipe into the smallest triangular hole of the cardboard controller so that the holes face away from the corner of the controller and add some hot glue so it stays in place. The hot glue isn't the strongest, so don't apply too much pressure, unless you feel like hot gluing it again later. I added a layer of duct tape


Building the Prop

1D46A798-C16C-4018-910B-374B82116234.jpeg
AF66D58E-D4C9-4C04-9D60-2C308E646ED6.jpeg
D9910025-91EA-4959-9D04-3EBE03ECD2C9.jpeg

Now you're in the final stages! You are going to build a prop for your post that attaches to the back of a chair, allowing the controller and post to stand freely.


Materials used:

  • 2 14" Planks of Wood
  • Wood Glue
  • Clamps
  • 4 Screws
  • 2 8"x0.5'x0.5" Strips of Wood
  • 1 Bolt
  • 1 Washer
  • 1 Nut
  • Duct Tape
  • 1 8" PVC Pipe slightly wider than the other PVC Pipe

Place the first plank of wood horizontally and lay the other plank perpendicular so they form a T-shape. Use the 4 screws to secure the planks together. You can screw in the screws in whichever pattern you choose. I chose to make another T-shape. Next, drill a hole just above the bottom all the way through the PVC Pipe. This will allow your bolt to go through the pipe and secure it in place. Drill another hole through the vertical plank of wood 2 inches above the bottom. Line up the two holes and push the bolt through so that it pokes out the back of the plank. Use the washer and nut to secure the pipe in place. Now, your pipe is swiveling about because it's only attached at one point. To correct this, use wood glue to glue down the 8"x0.5" wooden strips to either side of the pipe on the plank of wood. Once they are glued, clamp them down and let it dry overnight. This should prohibit your pipe from moving too much, assuming it's screwed in tight enough. Finally, drill one more hole halfway up the pipe but don't go all the way through. The hole will allow a dowel to go through both that hole and one of the 3 holes on the post pipe, keeping the post in place without any necessary intervention. As a final precaution, I wrapped the top of the pipe and the plank in duct tape, just to add more security.


Put It All Together

D1E4B12E-82D0-4A08-9C59-1A7EF563BA2F.jpeg

Now, all that's left is to set it all up.

Materials used:

  • Alligator Clip Wires
  • Duct Tape


Clamp the horizontal plank to the back of any chair. This should be strong enough to keep the brace in place. Now, place the post in and adjust it to a comfortable height. Use the dowel to go through the hole drilled into the wide pipe and one of the holes in the narrow pipe to adjust the height. Now, attach the alligator clips to each corresponding button. The front panel should be the shoot mechanism, and the sides will allow the character in the game to move. Since the alligator clips are attached to the perfboard, I used some duct tape to just tape the berfboard and arduino to one of the sides of the controller. Attach the GND wire to the headband. Now, you've fully wired your controller! Using an adapter for the USB-C port or just simply plugging the arduino in to the USB port, you can now use the controller in place of the arrow keys. Use the codes for both the game and the arduino that I have attached above to play the game for which I designed the controller. Have fun!