Professional Documents
Culture Documents
Brain-Controlled Wheelchair
by jerkey on December 5, 2010 Table of Contents License: Attribution Non-commercial Share Alike (by-nc-sa) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro: Brain-Controlled Wheelchair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . step 1: Acquire materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . step 2: Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . step 3: Test the wheelchair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . step 4: Modify the wheelchair's joystick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . step 5: Build the Interface Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 3 5 6 8 9
step 6: Program and connect the Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 step 7: Install the Python interpreter and program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 step 8: Install the Puzzlebox and Emotiv software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 step 9: Train the software and the human operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 step 10: Practice makes perfect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
Image Notes
Image Notes
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
1. interface board 2. action arrow storm series Electric Wheelchair 3. this joystick will be unnecessary to move around
1. An outdoor Tienda in the mission and FRESH AIR 2. it was raining 3. Brain-Control EEG headset 4. Thanks Mike!
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
Image Notes 1. Arduino board 2. USB cable to computer 3. connector to eight pins and ground between interface board and Arduino 4. cable from interface board
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
Image Notes 1. four wires from joystick 2. input cord to interface board 3. interface board
step 2: Software
The Software necessary includes the Puzzlebox Brainstorms BCI (Brain-Computer Interface) package which provides a GUI and visual feedback to the user and issues control commands to the Arduino hardware. Also required is the standard drivers and software included with the Emotiv EEG headset as well as an Aurduino Sketch which is a simple program written by us for an Arduino. An optional Python-based backend control script can operate independently of the Puzzlebox Brainstorms GUI (see Step 7) and will translate keypresses entered on the keyboard into commands sent to the Arduino, which is connected to the interface circuit. The interface circuit makes the wheelchair move by simulating someone pushing on the joystick. This option is useful for controlling the wheelchair remotely via SSH session from another computer or device such as a mobile phone. The backend control script can be found here: http://brainstorms.puzzlebox.info/tracker/browser/trunk/brainstorms/Puzzlebox/Brainstorms/Wheelchair_Control.py And a suitable Python interpreter can be found here: http://www.python.org/download The Puzzlebox Brainstorms software runs alongside the Emotiv headset's Control Panel and EmoKey application, which allows the wearer of the headset to cause characters to be "typed" on the laptop when a learning algorithm matches the user's current brainwave patterns to previously trained sequences.These "typed" characters activate buttons displayed in the Puzzlebox Brainstorms GUI (or the backend control script) which tells the Arduino to activate the Interface Circuit which simulates someone pushing on the joystick, which causes the wheelchair to move. The Puzzlebox Brainstorms software can be found here: http://brainstorms.puzzlebox.info/static.php?page=downloads There are two programs from Emotiv which we will use for this project: Emotiv Control Panel and EmoKey. Both are available to download freely as part of their "SDKLite" software pack: http://www.emotiv.com/store/sdk/edition/sdklite/ We were running the Microsoft Windows operating system because that is the most supported operating system by the Emotiv software at this time. (They are working on a Linux version) The Arduino Sketch is a program which is loaded into the Arduino hardware using free software from the Arduino site. The program watches for a series of characters coming in the USB serial port from the computer. When it sees the letter "x" it watches the next eight characters that come through, and they correspond to eight pins on the Arduino. If a character is "1" then that pin is set to ON, and outputs 5 volts, otherwise the pin is turned OFF and outputs zero volts. The Arduino sketch can be found here:
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
http://brainstorms.puzzlebox.info/tracker/browser/trunk/brainstorms/arduino/puzzlebox_brainstorms_wheelchair_noisebridge/puzzlebox_brainstorms_wheelchair_noisebridge.pde To load the above program into the Arduino, you need the Arduino software, found here: http://arduino.googlecode.com/files/arduino-0021.zip You might also need drivers for the USB serial interface on the Arduino, depending on your operating system and which version of the Arduino you own. Details at: http://arduino.cc
Image Notes 1. these functions cause letters to be "typed" which are received by the python program 2. three settings determine whether one transistor, the other, or both are activated when a direction is enabled. 3. displays of EEG-interpreted signals from the operators' brain
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
Image Notes 1. OFF/ LOW / HIGH power switch 2. FAST / SLOW switch 3. joystick 4. battery and operation lights 5. cord to wheelchair controlbox
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
Image Notes 1. the four wires we added 2. tape from when we cut the wires to measure the joystick's behavior 3. joystick on / off switch and speed switch (view from bottom of joystick) 4. the bottom of the actual joystick, which contains two variable resistors.
Image Notes 1. OFF/ LOW / HIGH power switch 2. FAST / SLOW switch 3. joystick 4. battery and operation lights 5. cord to wheelchair controlbox
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
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.
Image Notes 1. 2N7000 FET transistor 2. output pull-up resistor 3. diode (kathode up) 4. resistor to turn transistor ON if nothing is plugged into board, so chair operates normally 5. resistor to turn transistor OFF if nothing is plugged into board input, so chair operates normally 6. output pull-down transistor 7. to left/right variable resistor on joystick (middle terminal) 8. to forward/backward variable resistor on joystick (middle terminal) 9. from joystick 12V power supply 10. ground from joystick and board input connector 11. one of eight input wires to board
Image Notes 1. four-wire cord from joystick 2. connector for input to board - pins 2-9 are inputs, pins 18-25 are ground 3. transistors 4. socketed resistors for forward and right 5. socketed resistors for backward / left
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
Image Notes 1. four wires from joystick 2. input cord to interface board 3. interface board
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
Image Notes 1. Arduino board 2. USB cable to computer 3. connector to eight pins and ground between interface board and Arduino 4. cable from interface board
Image Notes 1. choose the type of Arduino you have before loading the program into it. We used an Uno which is newer than this picture 2. If the USB serial port of your Arduino does not come up, you need to install drivers from the Arduino page 3. If you bought a ready-made Arduino you will not need to "burn bootloader"
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
Image Notes 1. chair is told to stop after going forward 2. forward in speed 1 is only 1 bit change from a stop 3. forward in speed 3 changes both the last two bits to zero 4. pressing 3 sets speed to 3 (it starts off in speed 1)
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
NOTE: On the right-hand portion of the GUI there are meters labelled "Concentration" "Relaxation" and "Speed". These meters are used for controlling the wheelchair using an alternative EEG Headset NeuroSky called the NeuroSky MindSet. In this mode when the user's concentration level reaches a certain threshold, the wheelchair will being to drive forward (so long as the "Enabled" button is checked under the "Speed" meter). It will be necessary to connect to the NeuroSky MindSet under the Control Panel tab, through a program such as Puzzlebox Synapse (also available at the Puzzlebox Brainstorms website) or ThinkGear Connect (which is included with the NeuroSky MindSet). For more information please visit the Puzzlebox Brainstorms website, as this Instructable focuses on using the Emotiv EPOC.
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
Image Notes 1. these functions cause letters to be "typed" which are received by the python program 2. three settings determine whether one transistor, the other, or both are activated when a direction is enabled. 3. displays of EEG-interpreted signals from the operators' brain
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
Related Instructables
Advertisements
Comments
13 comments Add Comment
jerkey says:
Dec 9, 2010. 4:41 PM REPLY Thank you! I am collaborating with PuzzleBox and we will be finishing this instructable in the next couple of days. It is already entered in the Humana Health Challenge!
TimeDroid says:
i can walk but it would be fun to control a dune buggy with your brain!!!
bowmaster says:
Dec 12, 2010. 11:20 AM REPLY Or a gun turrent. Have the forward and backward controls be up and down, the left and right the same, and stop would be fire.
SenKat says:
Dec 12, 2010. 9:13 AM REPLY WOW ! I am only part-time confined to a power-chair. What you have done here seems like the key to freedom for a previously "stuck" group of people who cannot operate their chairs on their own - simply phenominal ! When ingenuity meets necessity, great things happen :-)
jamwaffles says:
Linux :'D
EnigmaMax says:
finally, a use for these things!
burnerjack01 says:
Dec 12, 2010. 8:40 AM REPLY Without knowing more, I was wondering, is there a limit to the number of instructions possible? I ask this because this psycocybernetic interface seems to be a gateway to incredible advacements in both machine control as well as superfast data manipulation. Taken to the max, imagine issuing a letter by thinking it. SciFy is here! Now, about that George Jetson folding flying car in a briefcase..... Dec 12, 2010. 8:00 AM REPLY Beautiful. Thank you for the thorough details on sourcing the software, hardware, etc. I'm an OT, and *love* coming across high-quality instructables for AE/DME. Thank you thank you thank you! Dec 10, 2010. 5:32 PM REPLY
occupada says:
puzzlebox says:
Thanks for the positive feedback!
A demonstration video of final result being driven through the streets of San Francisco's Mission district has been added to the last step of this Instructable.
rachel says:
Effin awesome you guys! And you already made Hackaday :) http://hackaday.com/2010/12/10/eeg-the-locomotion/
http://www.instructables.com/id/Brain-Controlled-Wheelchair/
jeff-o says:
Yep, finish this up and you've got my vote!
EmmettO says:
I'd say finish up the last three steps and get this in the Humana Health Challenge!
kelseymh says:
Very nice! It looks like the last three steps still need to text. The titles are self-explanatory, but how? :-D
http://www.instructables.com/id/Brain-Controlled-Wheelchair/