Step 6: Program and connect the Arduino

You will need to download and install the Arduino software onto your computer.  This is the program which will let you load the Sketch onto your Arduino which will make it perform its function in this system.  The Arduino software communicates to the Arduino through a serial port which appears to your computer after the USB interface is plugged in.

If the Arduino is plugged in and your computer can't figure out that it is a serial port, you will need to download a driver from the Arduino website.

You will also need the sketch we have written for this application.

All of the above software is linked in Step Two of this instructable.

Once you have the Arduino software running, and it recognizes your Arduino hardware (which is plugged into your computers' USB port) you will need to load the sketch we have written using the File menu.  Then go to the Tools menu and select "Board" and choose the model of Arduino you have.  The Diecimila, Duemilanove or Uno are very similar and any of them would work for this application.  Next, from the Tools menu, make sure the Serial Port of your Arduino is selected.

At this point, with our sketch loaded, you can go to the File menu and select "Upload to I/O board" to load the sketch into your Arduino.  After this step works, you can quit the Arduino program.  You won't need it again unless you want to change the way your Arduino operates, and it shouldn't be running while the Python program is running.

After this, you will need to make a connector to go between the Arduino and the interface board which controls the joystick of the wheelchair.  We used pins 10, 2, 3, 4, 5, 6, 7, 8, of the Arduino and connected them to pins 2, 3, 4, 5, 6, 7, 8 and 9 of the DB25F connector from the interface board.  We also connected Ground from the Arduino to pin 18 of the DB25F connector.

If it is not obvious at this point, you can skip the whole DB25 connector and just wire directly from the Arduino to the transistors on the interface board.  Our setup is the result of originally using the parallel port of the PC instead of an Arduino (which is still an option if you have a parallel port and don't want to use an Arduino)
<p>Hi,</p><p>Nice job what you have done there ^_^</p><p>Really amazing, actually if you may i have a question, we are uni students, and we are about to do our final undergraduate project, your project has inspired us and we want to know, if we use the individual license that Emotiv offers, is it going to be suitable and useful for such a project ? or we have to buy the educational license in order to apply your project? you know in order to use the applications of Emotiv and their output in controlling any external device such as the wheelchair ?</p>
<p>hey, i am ubaid from rawalpindi , i chose final year project of controlling wheelchair by brain , can you help me</p>
<p>guys for the epoc headset, do we need the raw EEG data?</p>
<p>awesome, would like to get more information about it</p>
<p>hey i liked itt.... its ardino sketch is not openingg... </p><p>wt to do now??</p>
<p>Hello Puzzlebox team</p><p>This is William from Taiwan in Asia. And I just to know you have brain controlled wheelchair.</p><p>I want to purchase this device, please let me know what parts of this suit.</p><p>Where can I purchase those device?</p><p>I'm waiting for your reply.</p><p>e-mail: avsong1@yahoo.com.tw</p>
<p>Hello,</p><p>Can you tell me the following specifications of the EPOC Headset:<br>1. Baud rate<br>2. Protocol (ttl, RS232)<br>3. Inverted or non inverted parity bitstop</p>
<p>HEY<br>I loved the concept and I am trying to make the exact same thing.<br>I'm a student in Karachi, Pakistan. I am very much interested in making this Brain-Controlled Wheelchair.<br>Will upload pictures as soon as I make some progress. :)</p>
<p>I have that joystick in hand and need to use it for control. DO you happen to have the pinout of it?</p>
Hello :) <br> <br>I am working on a similar project. Its called mind controlled mobility scooter. The problem I am facing right now is to drive the rear motor, which is 24V DC by and Arduino 2560 and a motor shield. What should I use to create the interface board in order to amplify the current ?
what is the total cost of building this project.? <br>
is the file 'WheelChair_Control.py' can work from Windows console?
Great project. Congratulations...
I am newbie to all this and would like to know if you have safety procedures one should know prior doing anything other than mentioned. for example, dealing with the wheelchair... should I be worried to be shocked from the battery or something ? <br>Thank you :)
Yes. If you complete the circuit you can get shocked with 12 volts. It will hurt. You can make sparks and set things on fire. Be careful!
Is it possible for the Arduino to directly receive values fron the EPOC? If so, could you explain how this could be done.
What's the actual purpose of python software? Is it possible to use any other coding language like c,c++ instead of python. ? <br>how does the 8 bit data from python interpreter is transferred to arduino software and at what rate? <br>
kewl I am also working on brain control. take a look at my 6 axis robot arm with epoc headset control.
Which headset is used in this project, <br> <br>is it EPOC neuroheadset which costs 299$...? <br> <br>or <br> <br>is it EEG neuroheadset which costs 750$..?
i can walk but it would be fun to control a dune buggy with your brain!!!
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.
dude, have you ever seen the emotiv headset before? You don't need to think in terms of the wheel chair- you can make the commands anything you like, such as &quot;fire&quot; &quot;forward&quot; &quot;fire RPG&quot; or whatever. And in that case, you could make it so that you have just a person sitting in on a couch controlling it while eating chips.<br> <a href="http://www.ted.com/talks/tan_le_a_headset_that_reads_your_brainwaves.html">http://www.ted.com/talks/tan_le_a_headset_that_reads_your_brainwaves.html</a>
Do you know how many commands that thing can read? A mind controlled battle-bot would be awesome, or maybe multiple turrets.
The enthusiasm is very much appreciated, but it would probably be useful to re-read Step 9, which talks about the capabilities and limitation of the learning algorthim used with the Emotiv headset:<br> <br> <em>&quot;In our experience the Emotiv software is very good at training at least one direction direction for control, for example thinking &quot;Push&quot; to drive the wheelchair forward, and allowing that user to &quot;turn on&quot; or &quot;turn off&quot; that single command at will. However it seems that most if not all users have trouble training a second or third direction as effectively as the first. For this reason it is recommended when first using the software to &quot;cheat&quot; for left and right control by using facial muscles (which is technically EMG, not EEG) for example closing one eye to move left or right or clenching either side of the jaw.&quot;</em><br> <br> So while yes, the software will allow you to train multiple detections (actually I think you might be limited to four) which can each be used to control a different motion for driving the wheelchair or even a separate device, in reality one shouldn't expect &quot;unlimited thought control&quot; with current consumer-grade technology.<br> <br> Now that said there have been some incredible advances in the field of BCI research (including a paradigm which allows six-direction detection for fully 3D cursor control) but the physical location of the sensors has to be precise (specifically C3, Cz, and C4 according to the 10-20 system, check Wikipedia for details) and the layout of the Emotiv and Neurosky EEG headsets simply do not provide electrodes in those locations.<br> <br> This is a very exciting field of technology which is advancing quickly, but for the moment we feel it is very important to make sure expectations are being set which match the true current state of the art.<br> <br> Cheers<br> <br> Steve Castellotti<br>
Can we use The EEG shown in this site?????????please reply soon <br> <br>http://store.neurosky.com/products/mindwave-1/ <br>
Can you mail me all the programming and softwares to this id <br>johnson.romy314@gmail.com
? did you watch the vid? you can do as many commands as your computer/microprocessor can store and handle... or as many as you can imagine. <br>&quot;fire slingshot&quot; <br>&quot;cook meal&quot; <br>&quot;dig&quot; <br>You would just need to teach the program how you think each thing by example and then program the bot/buggy/whatever to do what that command implies, such as digging a hole. <br>You could probably take an exoskeleton (such as Ironman) and teach it what you think for pretending each muscle movement on your body... I'm kind of doubtful that you just happen to have just one sitting around though- 'Oh yea, I got one in 03 for Easter!'
OK, I watched it. That thing is pretty badass. Theoretically you could teach it the keys on your keyboard and use it to type by thing the letters/words.
Um... you don't need the Emotiv system for that, just a programming language. So you <em>theoretically</em>, could, yes, although that would be kind of unnecessary. (or do you mean to use an imaginary keyboard? &nbsp;In that case, you could just, 'theoretically', teach it what you think when you picture &quot;A&quot; or &quot;&quot; or &quot;&zeta;&quot; (zeta) or &quot;Д&quot; (de) or &quot;那&quot; (n&agrave;) or whatever language you speak... but why do that, when you can just imagine going forward, shooting or whatever. &nbsp;I don't really play it, but I can imagine that it would be pretty BA in COD and FPSs)
Yep, no physical keyboard.
... and quite literally &quot;as many as you can imagine&quot;
Reverse F/B control- think of the joystick like on an aircraft; Forward = down, Backward = up, Sounds like a plan in the works! Let me know what kind of motor[s] you would need. Possibilities are many.
Your right, that would work better. Some regular servos would probably work for a light-weight airsoft gun. A regular gun you could probably use heavy duty servos but a full sized turret would need hydraulics.
hello sir im interested in your project but i did not see the code for the arduino. can you post it or send it to my email if possible? this is my email &quot; want2learncoolstuff@yahoo.com &quot;
Jerkey, what a great project! People will seriously benefit from this!<br><br>One question though, I looked at Emotiv's website, and there are 2 types of EEG headsets, one is for consumer use ($299), and another one is for developer ($500). So which one are you using for this project?
Hello there, I managed the EEG side of this project.<br> <br> We did use a &quot;research&quot; version of the Emotiv headset (one step above the &quot;developer&quot;) but because we only used the Emotiv Control Panel and EmoKey utilities to interface with our own software there's no reason why you couldn't reproduce our results with just the $299 &quot;consumer&quot; headset.<br> <br> Incidentally, if you only wanted to control forward movement, you could get away with a NeuroSky MindWave which retails for $99 as there is also support for this hardware in Puzzlebox Brainstorms. The latest release allows &quot;blink control&quot; to select which direction a robot might be steered so we could do something similar for the wheelchair - that is to say, mental concentration would move the wheelchair forward, and blinking several times in a row rapidly would cycle the &quot;forward&quot; direction between left, right, or reverse.<br> <br> If you want finer levels of control however (it is difficult to start and stop &quot;concentrating&quot; on demand) you will probably want to stick with the Emotiv headset.<br> <br> Cheers<br> <br> Steve Castellott<br> <br>
I am using PSoC for my conrtoller. I need to know what is being sent by the wheelchair control panel so I can tell my PSoC what to look for. Will I need to alter the python code in anyway, How can I verify that my left from Epoc is left in puzzlebox? How does puzzlebox know I just went left with the emokey? Should i type the keystroke first or as soon as I move the box left in the emotiv control panel puzzlebox knows what left is? <br> <br>Thank you for this great product.
Hello there.<br> <br> You can find source code for Puzzlebox Brainstorms talking to our wheelchair's controller in the following two files:<br> <br> <a href="http://brainstorms.puzzlebox.info/tracker/browser/trunk/Puzzlebox/Brainstorms/Wheelchair_Control.py" rel="nofollow">Wheelchair_Control.py</a><br> <br> <a href="http://brainstorms.puzzlebox.info/tracker/browser/trunk/arduino/puzzlebox_brainstorms_wheelchair_noisebridge/puzzlebox_brainstorms_wheelchair_noisebridge.pde" rel="nofollow">puzzlebox_brainstorms_wheelchair_noisebridge.pde</a><br> <br> Our code was specific to our controller, but a similar technique to the one we used might be possible for you. I couldn't really say in more detail without knowing the specifics of your hardware.<br> <br> EmoKey is a program included by Emotiv with their EEG headset, or can be downloaded for free as part their &quot;SDK Lite&quot; package. It will you to declare a direction or detection you want to look for (such as &quot;Left&quot;) and assign that to a keyboard keystroke (such as the Left Arrow key). A good way to test EmoKey is to assign letters of the alphabet to each direction and then load and place Notepad in the foreground. It should print out keys when they are detected. You can use &quot;w&quot; &quot;a&quot; &quot;s&quot; and &quot;d&quot; to mean &quot;Forward&quot; &quot;Left&quot; &quot;Backwards&quot; and &quot;Right&quot; and those keys will work with Brainstorms as well.<br> <br> <br> Finally that said Puzzlebox is preparing to release an updated version of Puzzlebox Synapse which supports the Emotiv headset and eventually you will be able match detections there directly.<br> <br> <br> Cheers<br> <br> Steve Castellotti<br> <br> <br>
Hi, I wonder if we can control 5 relays instead of a joystick. If we modify the Arduino skatch we can pilot 5 relays that could be interfaced to a wheelchair special control module. The modern chairs has special interfaces able to connect many imput devices, please see www.pgdt.com and Omni R-NET interface. What they need is just 5 &quot;clean&quot; normally open contacts, Forward, Reverse, Right, Left, Mode selection.<br>Plese let me know your advices.<br>
hi !<br>i started working on this project recently<br>your website is really of great help!!<br>the thing is that we are trying to develop a more economic design for the indian users, all i want to know is that what are the changes we need to make with respect to your model if we use conventional eeg electrodes <br>lots of thanks !!<br>
there are many ways to control a wheelchair from eeg electrodes. If you are designing your own electrodes, you will also need to design software which interprets the signals from the electrodes. The software from Emotiv is very good at finding patterns in brain signals. If you are not using their software, you will have a big technical challenge to duplicate their work. It may be easier to use their hardware.<br><br>I do not know if the Emotiv software works with other hardware. Do you have anything specific in mind/
we are planning to use a conventional eeg cap fix electrodes then connect it to acquisition system then use filters,dsp processors, and driver circuits then connect it to the laptop then give its output signal to an interface circuit ,as suggested in your website and connect it to an electrical wheelchair.<br>what do you think? you can even suggest an corrections<br>thanks!<br>
hi,<br><br>The main differences is that you will need at least 30 min for cap preparation (electrolyte gel, check impedances etc).<br>But you are wise to avoid Emotiv caps wich are made with dry electrodes, have incomplete cortex coverage. It records very well muscles artifacts, but it can hopefully process P300.<br>Then you can find free software solutions with OpenViBE if you have the appropriated drivers.<br>You need to know what paradigm you want to use and how many degrees of control you want to have.
Before gettin excited, read that text from step 9<br><br>Emotiv software is very good at training at least one direction direction for control [...]. However it seems that most if not all users have trouble training a second or third direction.[...] For this reason it is recommended when first using the software to &quot;cheat&quot; for left and right control by using facial muscles
Sir,<br> I want to know which type of EMOTIV headset is suitable for this project &amp; what is cost of the headset.
hello sir,i am doing voice controlled wheel chair for the people who have both leg&amp;hand impairments.for this we have arranged scooty motor for wheel chair and i have arranged corresponding accelerator.i have fixed a chain like arrangement between accelerator and a gear motor.by using hm2007 module the speech command can control gear motor.but sir i am facing a problem that i cannot control speed in desired way as in manual operation.sir can u please help me ?how can i make use of ur project to mine for efficiency?
its really super..... iam interested to this project... can you help me.....<br>
if you have any specific questions let me know and i will try to answer.

About This Instructable


211 favorites


Bio: whats an engineer to do?
More by jerkey: Brain-Controlled Wheelchair Easy rechargable portable ipod/USB recharger How to make a shopping-cart sound-system for street parties
Add instructable to: