Arduino Leonardo Game Controller for People With Quadriplegia
by scuffedtyty in Circuits > Assistive Tech
245 Views, 0 Favorites, 0 Comments
Arduino Leonardo Game Controller for People With Quadriplegia
I created this project for my Engineering for Social Good class. Our task was to make a cheap game controller for people who are quadriplegic. We started by learning skills like soldering, wiring, and coding, and created simple circuits on perf boards. We then looked at adaptive controllers such as the X-Box adaptive controller or the Sip and Puff controller for a computer. Even though these are very great products, we saw a flaw; they were really expensive. We then started to play around with a product called a "Makey-Makey". The Makey Makey allows you to make anything into a keyboard, which in turn opens up a lot of opportunities to make adaptable controllers. Even though this product is great, it was a bit too expensive and we realized that we could re-create the Makey Makey with an Arduino Learnaro for about half the cost. We then made our own Makey Makey's with the Arduino Leonardo and then set off to create these adaptive controllers with what we had learned. My own personal goal was to make my controller as cheap and as possible while still creating a product that could be used to play simple games on a computer.
Supplies
Extendable Arm
The first part that I made was the extendable arm that the headrest will be mounted to. I started by cutting out two long boxes. The bigger outside box is 50cm by 5cm and the smaller inside box is 50cm by 4cm. After cutting the pieces of cardboard out, use a hot glue gun to glue them together. Now, slide the smaller box into the top of the bigger one and you now have an extendable arm.
Headrest
The next step is to create the headrest. The measurements will differ for every person because each person's head is a different size. I would say that you want about 4-5cm of space between your head and the sides of the headrest. You will also have a tinfoil ring around your head so having that 4-5cm of space is really important. As for the width of the pieces, I went for about 10cm for the Y-axis. This is just so you have enough room to add your electronics in later. After you create the shell, you now need to make the bendy piece where you will mount your buttons. To create the bendy piece, you should start with a piece of cardboard that is pretty long and the same width as your headrest. It's really easy to cut down the cardboard, but pretty hard to add more cardboard after it's cut. I then made shallow cuts on the back of the piece of cardboard about 1cm apart. After doing that along the entire piece of cardboard, it bends really easily in one direction. The next thing you need to do is to cut holes on the bendy piece of cardboard and the headrest base. This is for the paper clips on the back of the buttons. Cut three holes on the left, right, and middle of both items. Makes sure the holes line up. After that, all that's left is to line up the pieces and glue them together.
Buttons
First, start by cutting out three 4cm by 4cm squares of cardboard. Then, grab three paper clips and bend them from the middle so that there are two hooks on each side (see picture). Then, use tinfoil to cover one of the sides of each cardboard square and also attach the paper clip on the backs of each button. You will also need hot glue to hold the tin foil down on the back of each square. Now, put the paper clips through the holes on your headrest, and hot glue them into place. These paper clips are where you will attach your alligator clips later.
Attaching Headrest to Arm
Now it's time to attach the headrest to the arm. Pull the smaller arm up so that the width of the headrest is the same distance from the top of the smaller box to where it goes back into the bigger box (see picture). Now hot glue the headrest to the smaller box. Because of the weight of the headrest, you will probably have to make supports. I found that the best supports were just some right triangles that helped keep the structural integrity of the arm. You will also have to make a thin stack of cardboard for the arm so that it can keep the length that you have adjusted it to and also it works as a spine to help keep the projects ridged and sturdy.
Chair Attachment
The next step is to create a way to attach the controller to the chair. First cut a square of cardboard about 25cm by 60cm. Bend it so that there are two sections, each one is 25cm by 60cm. Now cut a hole in the middle of one of the sections the same size as the outer arm tube. Now glue slide the tube into the slat that you created and glue them together. Glue the cardboard piece so that the bottom of the headrest is about 10-15 cm higher than the rectangle. Now, add a couple of triangles supports on each side of the piece to keep it in place. Now glue a couple of additional cardboard pieces to the bottom half of the rectangle so that you can keep it in place when you press it to the back of the chair.
Electronics
This step is a bit complicated so ill try to make it as easy as possible. First, you are going to need your Arduino, jumper wires, and a perf board. Start by soldering a jumper wire on the top left side of your perf board. This will be your power wire. Next, solder your resistors a couple of spaces away from each other so that one wire can go to the left and attach to the other wires and one goes straight down not touching any other resistors. Now, solder all the wires that are going left together so that your 4th resistor is wired to the 3rd, then the 3rd is wired to the 2nd then the 2nd is wired to the first and then the 1st resistor is wired to the power jumper wire (see diagram). Now that you have your power and resistors wired, it's time to connect the resistors to more jumper cables. Each resistor needs one jumper cable and one alligator clip. Start by wiring one jumper cable so that one side connects to the resistor and one side sticks up so that it can be connected to the Arduino. Now repeat that process with all the resistors. Now do the same exact thing with the alligator clips. Each jumper cable should have one alligator clip. You will have to strip one side of the alligator clip so that you can solder it to the board. The other side of the alligator clip is what you will connect to your controller. Now that you have those two parts done, you now have to create a ground wire. To do this, solder another jumper cable to the right side of the perf board. This wire will go to the ground on the Arduino. Now solder an alligator clip to the jumper wire. Now attach the jumper cables to all the correct spots on the Arduino. The power should go into to slot named PWR, the ground should go into the slot titled "GND" and the other wires (from left to right) should go into A0, A1, A2, and A3. A0 should be left, A1 should be right and A2 should be shot, so connect the alligator clips accordingly. You are also going to need to make a headpiece for the ground wire. Create a circle of cardboard (it's different for everyone's head size) and then cover it in tin foil. You can just alligator clip the ground onto the ring to create your ground.
Code
Click here to download the game code
Click here to download the Arduino code.
Click here to download the Arduino software
Click here to download the moving average filter library.
First, start by downloading the Arduino software. Make sure you download the correct version for your device. Next, download the moving average filter library. I would recommend dragging the moving average filter to your desktop to make it easier to find. Next, go back to the Arduino software and navigate to the top bar. You will see the option "Sketch", Click on that. Now click on "include library". Now click on "add .zip library". Now, you can close the Arduino software. Next, download the Arduino code and drag it to your desktop. Now open the code. It might have a pop-up telling you that it needs to make a folder, so just do what it says and then it will open the Arduino software with the code. Now, plug in your Arduino and upload the code to it using the light blue button on the top left. Now, download the game code. Open the file titles "space invaders master" and then open "index.html". You now should be able to play the game!