Arduino Leonardo Game Controller for Quadriplegics

by Jimmy Drohan in Circuits > Assistive Tech

678 Views, 4 Favorites, 0 Comments

Arduino Leonardo Game Controller for Quadriplegics

IMG_4704.jpeg

The goal of this project was to make a cheap alternative game controller that can be used by quadriplegics. It works by using you head to hit different buttons to play the game at hand. In this example we will be using Space Invaders. Using the knowledge gained from my engineering class I recreated a Makey Makey by soldering using a perf board. All of the coding and actualy game side of this project will be provided for you below. Enjoy!

Final Result Demo Video

Supplies

Supplies:

With this Arduino code these ports will correspond with these buttons

A0 = A, Left

A1 = D, Right

A2= Space, Shoot



Makey Makey Controller OPTIONAL (More Expensive But Easier To Use Alternative):

These items will not be needed if you choose to use a Makey Makey

  • Arduino Leonardo
  • Perf Board
  • Jumper Cables
  • 1M Ohm Resistors
  • USB Micro B to USB A


Tools:

  • Soldering Iron
  • Hot Glue Gun (and hot glue sticks)
  • Drill/Driver (needed for drilling holes and putting in the screws, if you don't have one you might be able to do it by hand with a hand drill and screwdriver)
  • Drill Bits and the appropriate screw bit if using a Drill/Driver
  • Laser Cutter (YOU DO NOT NEED THIS, but if you own one or have access to one it will be useful, I used the laser cutter to cut out a box to hold the components but you can just as easily create one out of cardboard)(see below or information on laser cutting)
  • Scissors
  • Box cutter

Making the Circuit

IMG_4610.jpeg
IMG_4606.jpeg

Use the images above for reference when wiring the circuit. Make sure there are 3 ground wires going from the Arduino ports (A0,A1,A2) into the perf board. Attach these individual wire to 3 separate 1M OHM resistors. You will then need to attach a ground wire to the ground port and a wire for the 5v port on the Arduino. You will also need to attach 3 analog wires to the other side of the resistors mention earlier. Once finished attach jumper alligator clips to each analog wire. It is not necessary but nicer if you still have the clips attached the the end of the alligator clips.

Wire and Circuit Board Holder

IMG_4652.jpeg
IMG_4643.jpeg

In this example, I used a laser cutter to make a box to contain the Arduino and Perf board but using cardboard or foam board will work just as good. When making this box make sure you are still able to easily access the circuitry. If your box is fully enclosed with a lid like mine make sure to cut holes in the top or side so that the alligator clips, wires, and usb wire are able to come out from the box.

Building the Structure

IMG_4631.jpeg
IMG_4653.jpeg
IMG_4662.jpeg
IMG_4665.jpeg

Start of by layering a few pieces of card board to make a thick tube, This will be the base of you structure. When complete you will need to make a head piece at the top out of foam or cardboard (I recommend cardboard for extra strength). This head piece can either be a circle for semi circle like mine. If needed you can add support struts going from the base to this head piece. It is best to attach the head piece by using hot glue or strong tape. After attaching the head piece to the main post add 3 metal plates (this can either be tin foil or thin scarp metal) to the right, left, and back these will be the buttons that allow you to play the game. (Optional) if you find your structure is not sturdy and is flimsy you can attach a wooden post by screwing that original cardboard base into that piece of wood. This will also make the mounting process easier.

Head Band

IMG_4702.jpeg

This is a small step but the one thing that makes this whole system work. Make a cardboard ring that fits around you head and wrap it in tin foil. When playing the game this head piece will be the thing that comes in contact with the other metal buttons completing the circuit allowing those controls to work.

Connecting the Wires

IMG_4652.jpeg
IMG_4664.jpeg

First start of if you haven't done so already by gluing or taping you holder box to the main support post. It is better to mount it lower just incase the box is heavy. Now run the wires up the post to the headpiece as seen above (tape helps keep it organized). You may need to connect extra alligator clips to the existing ones to make it longer. Once the wires are able to reach the metal buttons. Correspond the wires so that they match the left right and shoot buttons. The ports that the wires are connected to on the Arduino decide the button that wire activates in the game. Lastly attach the ground wire to the head band to complete the wire hook up.

Connecting to a Chair

IMG_4691.jpeg
IMG_4703.jpeg

Now for the last step. Using a piece of wood that goes across the bottom of the support strut drill in the the piece of wood on the other side of the structure. Make sure this attachment piece in screwed in on the side the head piece is connected to. How high or low you put this piece is decided by the height of the user. Finally to attach the structure to a chair clamp the attachment piece to a chair using and sort of standard clamps. And with that your build is complete.

Downloading the Code

As written above in the supplies section here are the links to the different sets of game code and Arduino code you will need along with the corresponding ports to match he code given.


Space Invaders Game Code

Arduino Leonardo Code

With this Arduino code these ports will correspond with these buttons

A0 = A, Left

A1 = D, Right

A2= Space, Shoot