The interface board takes eight control lines in, from an Arduino or a PC parallel port, and can make the
wheelchair think the joystick is being moved. It does this
using transistors, some diodes and a bunch of resistors. All of these parts can be found at mouser.com or digikey.com or several other suppliers. Since the transistors (2N7000) are FETs, they draw no current (although their default-mode resistors take a milliamp or so) so they can be driven from any digital control signal. The diodes we used are 1N4148. A datasheet for the 2N7000 transistor can be found here:
http://www.fairchildsemi.com/ds/2N/2N7000.pdf The circuit contains eight transistors. Two of them pull the forward/backward wire toward ground through a resistor each. One has a larger resistor and the other a smaller one. When both transistors are turned on, both resistors are pulling toward ground, representing maximum speed in that direction. Another two transistors are used the same way for the left/right wire. The other four transistors are connected between ground and a resistor to the 12 volt power supply. These transistors are normally on, and their drain terminal is connected through a diode to the forward/backward or left/right wire. When these transistors are turned off, the resistor is no longer pulled toward ground and the joystick wire gets pulled toward the +12v wire through the diode. This is an easy way to let an eight-bit TTL (0 / 5V diigtal) controller like the PC parallel port or 8 pins of an Arduino control the 12-volt analog
wheelchair joystick. In actual practice (as you can see by looking at the schematic and the actual circuit) the resistor values have to be chosen to achieve values which will not cause the
wheelchair brain to think there is a malfunction in the joystick. (the 41K and 6.8K resistors are to pull the transistors’ inputs to their default state, so the joystick works normally when nothing is plugged into the interface boards’ input side). To determine resistor values, start with a variable resistor (a 100K-ohm is a good start) and connect a wire to its center and left terminal. With the
wheelchair safely elevated to prevent movement (or with the operator safely in the seat with room to drive around) connect the variable resistor while taking notes. Start by connecting to the left/right wire and ground and with your variable resistor turned all the way to the right. (this is the highest resistance, 100K ohms). A picture of a variable resistor is shown below. When the left/right function is activated on a
wheelchair, it rotates about its center like a tank. Make sure your feet are safely in the stirrups or you could get hurt! If the
wheelchair does nothing, turn the knob left until the slowest speed desired happens. Disconnect the resistor, measure it with an ohm-meter, and write everything down (how it was connected and what the chair did). Do it again and find the lowest resistance and the highest speed desired and write that down. For this direction, you will need a resistor for each of the two transistors associated – one will be the value of the first test (slowest movement) and the other will be (get ready) the inverse of [the inverse of the value of the second test minus the inverse of the value of the first test]. This way, when both transistors are activated, the
wheelchair sees the resistance of the second test. You can always just round up values if you don’t have the exact right number. These resistors and the next two will go on the lower transistors in the schematic, to pull the joystick wire toward ground when those transistors are activated. This test must be repeated with the forward / backward wire (you might go backwards at high speed). Take notes. After those two resistors are figured out, you will need to try the same tests but this time, connecting your variable resistor through a diode to the Red wire, which has +12 volts from the joystick circuit. Don’t let this Red wire get shorted to ground, even for a second – you might FRY your electronics. The results of these tests will be the resistor values chosen for the upper transistors, which pull toward the red wire as you can see in the schematic. Once you have determined the resistor values you want to use, or even before that, you can build the interface board. We used “perfboard” and assembled it according to the same physical arrangement shown in the schematic image seen below, except that we used 8-pin machine sockets which work well for shoving resistors into, so that changes can be made to the speed of movement of the machine. You could also just use a bunch of 100K-ohm variable resistors…. Perfboard on WikiPedia:
http://en.wikipedia.org/wiki/Perfboard The Gate terminal of each transistor goes to one of the eight control wires of the input cable. We used a DB25 Male connector since we were originally
using a PC parallel port. The control wires are connected to pins 2 through 9, and ground to pins 18-25. We then had to make an adaptor to connect this to the Arduino when it replaced the parallel port in our setup.
You can skip the whole DB25 connector and just wire directly from the Arduino to the transistors on the interface board as long as you wire it up the right way, which is easier without the extra step anyway.
[btn link=”http://www.instructables.com/id/Brain-Controlled-Wheelchair/” color=”orange” target=”_blank”]Read Full Instructions[/btn]