Godzilla multiplied by Arcade Games plus McDonalds divided by Pepsi Max plus StepMania equals Tom Tilley
Thomas Tilley
Godzilla arcade games McDonalds Pepsi MAX StepMania Tom Tilley

[ Home ] [ Publications ] [ Resume ] [ Family ] [ Projects ] [ The Others ] [ Sitemap ]

The Others



Lollybot on the surface of Mars

Note: this version of the instructions for step 11 can be adapted to any joystick but the images below and the wire/pin numbers are for the blue thumbstick board from an 'OKER' brand clear-bodied joystick with the number 'M-918B' printed on the board. Read on below if this is the board from your joystick or click here to go back to the original version of step 11.

11. Line Sensor Circuit: Connecting it to the Joystick

For this step you will need these parts & tools:

Parts Tools
  • Line Sensor Board (with wires attached)
  • Thumbstick Board
  • Solder & Soldering Iron
  • Side-cutters
  • Craft/Utility Knife

The brown component side of the thumbstick board contains two mini joysticks and looks the same in any Dualshock-like joystick. However, the layout of the circuit on the bottom of the board will vary from manufacturer to manufacturer. In this step we will look at the circuit to work out where to connect the four wires on the line sensor you made in the previous steps (the images used in this step are for an 'OKER' brand clear-bodied joystick with the number 'M-918B' printed on the thumbstick board but you can adapt the steps for any joystick.)

In the first image below I have overlaid the position of the two mini joysticks on the other side of the board in yellow. The small squares towards the top of the image are the buttons (you can click down on the thumbsticks) while the larger square shape is the body of the joystick. This is the bottom of the board so the sides are reversed - the right-side thumbstick is the one on the left and the left stick is the one overlaid on the right. The rectangles on the side of the mini-joysticks with three solder connections are the Y-axis variable resistors and the ones along the bottom are the X-axis resistors.

The ribbon cable that connects this board has ten wires: 2 for the motors, 2 for the buttons, 4 for the joystick axes (X and Y for each joystick), +5V, and ground. The 2 button wires are the easiest to identify and the wiring for these will simply run from one side of the cable connection to each of the buttons. They wiring won't be connected to any other components - just the buttons. See the right image below which has the button traces overlaid in red. If we number the cable wires from left to right then the "left" button will be wire 1 and the "right" button wire 2.

The wires for the joystick axes are also easy to identify because they are connected to the center pin of the joystick resistors. You can follow the wiring back from each of the resistors to the cable connection as shown in the image below left. On this board wires 5 and 6 are the Y-axis and X-axis for the right joystick and wires 7 and 8 are the Y-axis and X-axis for the left joystick respectively. See the image below left. So far you have identified 6 of the 10 wires - only 4 to go!

In most USB joysticks the rumble motor wires are soldered onto the sides of the main brown board but on this joystick the motor wires connect to the edges of the blue thumbstick board. One of the wires for each motor connects to +5 volts (see the next paragraph below) and the other is connected to the cable connection. On this board the right motor connects to wire 9 and the left motor to wire 10. See the image below right.

All of the components on this board (the four joystick variable resistors, the two motors, and the two buttons) share one common connection and on USB joysticks this is normally connected to the +5V wire. An easy way to find this is to find a connection between one of the buttons and one of the variable resistors and follow it back to the cable connection on wire 3. The +5V wiring is shown in red in the left image below. The dashed yellow line inidicates that the circuit connection is made using the push buttons.

By a process of elimination that means wire 4 must be the ground connection becuase it is the only one left! This is easy to check because the ground connection is only connected to the variable resistors (and NOT the buttons or motors). See the right image below. The only trick here is that sometimes the circuit designers use the metal body of the mini-joystick as a wire to connect parts of the circuit (overlaid dashed yellow lines). So while it looks like there are 3 separate red sections in this image they are all actually connected back to pin 4.

By just looking at the board you have been able to work out what the connections are but if you have a multimeter you can plug the joystick in carefully and check your +5V and ground wires. Choose a DC Voltage setting that is greater than 5V and connect the black lead to wire 4 (ground for this particular joystick board) and the red lead to wire 3 (+5V). Make sure you don't touch the leads together. If it doesn't read as around +5V then go back over the circuit again.

Now that you know which wires are which you can connect the line sensor. Use the side cutters to clip the ends of the wires down to around 4mm in length and then solder the sensor's:

See the picture below.

You now need to disconnect the joytick's resistors so that they don't interfere with the voltage dividers in the line detector. If you look carefully in the image below you will see inside the yellow oval that part of the right joystick wiring has been removed. Use the craft knife to carefully make two cuts about 2 or 3mm apart in the wiring to the X and Y joystick axes - you may need to choose a different location on your joystick. Heat the section in-between the cuts with a soldering iron for about 10 seconds and then you should be able to carefully remove it from the boards using the craft knife. If you have a multimeter you can check that this part of the circuit is now open so there is no connection between the joystick's resistors and your joystick axis wires.

Alternatively, you could carefully cut through the plastic along the sides of the two joystick axis wires on the connecting cable with the craft knife and then de-solder the connections from the board (by heating the connections on top of the board while pulling gently on the wires). You could then join your blue and green wires onto the newly de-soldered ends of the wire instead of modifying the board.

(Note that the picture of the thumbstick board that I've used in this step is still screwed into the joystick and the motors are still attached but your board will still be loose and without the motors - for now.)

Click here for the next step