Arduino Leonardo Game Controller for Quadriplegics
by cristian.oscar-ramirez in Circuits > Assistive Tech
187 Views, 2 Favorites, 0 Comments
Arduino Leonardo Game Controller for Quadriplegics
I was tasked with creating a prototype of an adaptive gaming controller for quadriplegics. We started by learning how to make our own circuits, using perf boards, breadboards, and Arduinos. Our first project was to make a simple LED card that used conductive tape, allowing me to see how basic circuits work. We then moved on to soldering with perf boards, adding switches, and buzzers. This helped me experiment with how to solder and complete more advanced circuits. The last step of preparation was making a simple game controller for paraplegics or people with cerebral palsy. We were assigned to incorporate ground into the button, helping me with the design of this final prototype. Using all of these new skills that I learned throughout the course, I was able to solder a perf board to an Arduino and connect it to a creative game controller with three separate buttons, all incorporating their own ground.
Click HERE to view an intstricional video of the controller.
Supplies
List of Materials:
Tools
Without Makey Makey:
- Arduino Leonardo
- Perfboard
- Soldering Kit
- 1 Megaohm Resistors
- Perfboard Wires
- Alligator clips
- Wire Stripper
- Click here to purchase a MakeyMakey (more expensive/simpler alternative to using the Arduino Leonardo)
Perfboard and Ardunio
Skip this step if you have a Makey Makey
Material needed for this step:
- Arduino Leonardo
- Perfboard
- Soldering Kit
- 3 1-Megoohm Resistors
- Perfbarod Wires
- Alligator Clips
- Wire Stripper
In this step, you will be making the brain of the controller. This will allow the pressing of a button to be translated into actions on the computer.
- Gather 5 perfboard wires and 4 alligator clips. Each one should have a matching color with one another aside from one wire. Get 3 1-Megoohm Resistors and set them aside.
- Cut one clasp from each of the alligator clips and strip the end about 1/8 in.
- Solder the one non-matching wire onto the top left corner of the perfboard.
- Bend the resistors so that both wires are facing down and insert them vertically into the top of the perfboard. Leave two holes of spacing between them.
- Flip the board over and bend the top wires of each resistor to the right. Clip some of the wire so that there isn't too much overlapping. Solder them all to each other and then solder the end to singular perfboard wire
- Next, bend each of the bottom wires of the resistors downward. From the top of the board, insert the perfboard wires as close as possible to the bottom of the resistors (not the end of the wire, the actual resistor). Solder the pieces to each other. Do this for each of the wires and make sure each resistor corresponds to one wire, not touching the others.
- Insert the stripped ends of the alligator clips into the perfboard from the top. They should be about 5 holes below the bottom of the resistors. The colors of the clips should match the color of the wires that you are soldering them to. Solder the wire of the resistor to the end of the alligator clip. Do this for each of the clips, and again, make sure none of them are touching.
- To make the ground you will insert a matching colored alligator clip and a perfboard wire into the perfboard. They should be a bit below the single wire. Solder them to each other (they shouldn't be connected to anything else on the perfboard). This will be the ground.
- Now you should plug all the loose perfboard wires into the Arduino. The singular wire goes to V5, for power. Insert the ground wire into GND. For the wires connected to the resistors, you will put the left one into A0, the middle into A1, and the right into A3. You will also have a micro USB cord to plug into the Arduino.
- You finished your DIY Makey Makey! The ends of the alligator clips will be attached to the buttons of the controller, which we'll talk about later.
Cutting Out Base
For this step, you will need:
- Foamboard
- Exacto knife
- Measuring device
- Cut a piece of foam board into a 20" by 12" rectangle
- Cut the board into a half-circle
- Cut out a half-circle with a 6" radius from the larger half-circle. There should be about 6" of foam board from the edge to the inner half-circle.
- Cut 3 4" x 3" rectangles and 3 2" x 3" rectangles out of foam board. These will be used to hold up the buttons.
Creating and Attaching Buttons
For this step, you will need:
- Cardboard
- Exacto Knife
- Tin Foil
- Paper Clip
- Hot Glue/Gun
- Use hot-glue to attach the "button supporters" to the base. Hot-glue the 4" x 3" piece about 3" from the inner half-circle, it should be leaning forward. Do this at the top and on the sides.
- Glue the smaller 2" x 3" piece under the large piece so that they are leaning against each other. Do this three times.
- Cut 6 small circles out of cardboard. The diameter should be 3".
- Rip some tin foil and wrap only half of each circle in it. You can use hot glue to attach the foil if it won't stay on its own.
- Bend three paper clips so that they look like "V's"
- Hot glue one side of the paper clip to the cardboard half of one of the circles. Hot glue the other side of the paper clip to another circle, again on the cardboard half. Once the hot glue dries, you should be able to close the button so that the two pieces of tin toil make contact. The button should go back to its original position when released.
- Repeat step 6 three times, making 3 separate buttons.
- Hot glue the backside of each button onto its own "button supporter". Make sure you are only hot gluing one side of the button, or else it won't be able to close. The side of the button connected to the base will the ground for the controller.
- Later, I added an extra layer of circular cardboard to the buttons to make them closer to the head. This is optional.
Making Shoulder Rest
For this step, you will need:
- Foamboard
- Exacto knife
- Measuring device
- Hot Glue
In the picture above, you can see two pieces of foam board on each side of the base. After some testing, I realized that you only need the inner piece, because the other one didn't even touch your shoulders.
- Cut out a foam board rectangle with the dimensions 10" x 8"
- Cut a half-circle with a 2.5" radius (smaller if better because you can adjust it later) from the long side of the rectangle.
- Hot glue the shoulder rest pieces to the bottom of the base. They should be about an inch away from the inside edge of the base. The cut-out half-circle should be facing down.
- Try resting the controller on the shoulders of the user. If it is too snug, make adjustments by cutting the half-circle larger.
Adding Velcro Support
For this step, you will need:
- Scisors
- Velcro
- Duct Tape
The vecro support is necessary to make the controller stay on the patients body. With out it, the controller would be moving around or even falling off, making it very hard to play a game.
- Cut 4' of the loop side of velco. Do this twice.
- Cut about 6" of the hook side of velcro. Do this twice.
- Duct tape the loop velcro down onto the base, with the vecro facing down. There should be a piece between two buttons, and another between the other two buttons.
- Using the adhesive side of the hook velcro, attach it to outside of the shoulder rest. Have it at a 45 degree angle. There should be a piece on both sides of the controller.
Connecting Buttons to Arduino
For this step, you will need the Arduino Leonardo and perfboard that we made in step one or the Makey Makey. You will also need two more alligator clips, the same color as the gound one from the perfboard.
- Using these two new alligator clips, connect the ground of the buttons on the left and right to the ground of the middle button. Then connect the ground alligator clip from the perfboard to the ground of the middle button as well.
- Connect the alligator clip from the perfboard to the left button (not to the ground). Make sure the alligator clip you use is on the furthest left of the three on the perfboard.
- Connect the middle alligator clip from the perfboard to the middle button on the controller (again, not the ground).
- Connect the right alligator clip from the perfboard to the right button on the controller.
Now, your controller is connected to the Arduino. These steps would be the same with the Makey Makey. Just have the left, middle, and right inputs correspond to each other on the Makey Makey motherboard rather than the perfboard.
Make Adjustments to Buttons
It was pretty difficult to make the buttons connect without moving your head a lot so I decided to make some adjustments. Using tin foil and duct tape, I made a little bumper on the buttons so that they would press down easier. Just duct tape a folded-up piece of tin foil to the button and make sure nothing is interfering with the tin foils connection.
Attaching Controller to Body
You might need some outside assistance to attach the controller to the body. First, rest the game on your shoulders using the shoulder rest. Take the long end of velcro from the back and put it under your arm. Bring it across the front of your body and attach it to the hook velcro on the right side of the shoulder rest. Make sure it's tight. Next, take the long velcro on the right (it will be behind your head) and bring it under your right arm. Pull it across your body and attach it to the velcro on the left side of the shoulder rest.
Downloading the Code
Download the Arduino software HERE
Copy and paste the DIY Makey Makey Code into the Arduino.
Change the inputs from letters to Space and arrow keys: Ex: Keyboard.print("d") into Keyboard.print("RightArrow"). A to left arrow, w to the space bar, and d to right arrow.
Here are all the files for the space invader game that you will be playing: Space Invaders
To play the game, open the HTML zip file. Change the javascript from UpArrow to the space bar. Do this by just pressing the space bar. Ex: "ArrowUp" to " ". You can change how the game looks using CSS.
Thank you for following along! Good luck making your very own adaptive controller! Here's the video showcasing how it works and how to play the space invaders game: Video