Brain-Controlled RC Helicopter

 by puzzlebox
Featured
helicopter-00-helicopter.png
helicopter-01-unboxing.jpg
helicopter-02-open_lid.png
This Instructable will show you how take a Radio Controller Helicopter and modify the remote control hardware such that it can be operated by free, open source computer software and flown based on brainwave measurements of concentration and relaxation taken by consumer-grade EEG headsets.



The software used in this Instructable consists of two applications, Puzzlebox Synapse and Puzzlebox Brainstorms. The former connects to commercially available consumer-grade EEG headsets, such as the NeuroSky MindSet or Emotiv EPOC. The latter connects to the transmitter chip extracted from the RC Helicopter's remote control and issues flight commands and settings based on detections received from Puzzlebox Synapse. Software (including source code) is available for download from the project website:


http://brainstorms.puzzlebox.info


Required Materials
- Radio Controlled Helicopter
- EEG headset such as the NeuroSky MindSet or Emotiv EPOC
- USB-to-Serial converter cable, capable of being set at an arbitrary baud rate
- An oscilloscope
- A logic analyzer
- Soldering Iron and Solder (optional)
- Connection cables and prototyping board (optional)
- Puzzlebox Synapse and Puzzlebox Brainstorms software


Note: Items in bold can be found in the Glossary and Link Index listed the final step of this Instructable.


Before beginning, unpack the helicopter, charge and install the batteries, and make sure everything is in good working order before beginning to examine or disassemble any individual components.

You should also familiarize yourself with the basic controls of your helicopter, including how trim settings operate and basic flying characteristics.


Note: The RC Helicopter used in this Instructable is a Blade mCX2 :

http://www.bladehelis.com/Products/Default.aspx?ProdId=EFLH2400

 
Remove these adsRemove these ads by Signing Up

Step 1: Examine Remote Control Components

01-exterior_controls.jpg
helicopter-04-rear_cover_removed.png
helicopter-05-circuit_board_removed.png
09-rear_markup.m.2.jpg
03-front.jpg
05-aileron_stick.jpg
06-throttle_stick.jpg
helicopter-12-under_a_microscope.png
The first step is to disassemble and examine the components of the circuit board of the remote control. It may be useful to employ a microscope to examine the manufacturer's name and part number of the various chips in order to research their features and protocols. This can save time later when working with the oscilloscope and logic analyzer.

Note: The remote control used for this Instructable is a Blade MLP4DSM.

There are 4 channels which are used for flying:

Throttle (Up/Down in the air)
Elevator (Forward/Backward while flying)
Aileron (Left/Right while flying)
Rudder (Rotate Clockwise/Counter-clockwise while flying)

The two joysticks are connected to potentiometers which adjust the voltage of the circuit to which each are connected from the DC power source through to an Atmega88PA micro-controller.

The micro-controller measures the input voltages and converts them to digital PCM values which are sent to a transmitter chip which uses the Spektrum DSM2 protocol to communicate with the RC Helicopter.


Layman's Explanation:

(Note: this explanation is not 100% accurate but may be a helpful way to visualize and understand what is going on)

It may be helpful to think of electricity as water, flowing through pipes as opposed to wires or tracks on the circuit board. If you were to measure the pressure or level of the water flowing inside the pipe at any one point that would be its voltage, with the diameter of the pipe the maximum voltage the circuit can handle. The volume of the water passing through that point is the current of the circuit, measured in amperes (amps). If you were to picture a large storm drain dripping a trickle of water that would be a high voltage, low current circuit, whereas a firehose blasting water would be a relatively low voltage, high current circuit. It is for this reason that amps are often considered more dangerous than voltage.

The batteries act as the both the source and the destination for the water (electricity) flowing through the pipes (circuit). The potentiometers connected to the joysticks on the front of the remote control act as gates which alter the level (voltage) of water flowing through the pipes. For example, when the throttle joystick is in the lowest position, where the rotor blades are normally off, the gate is entirely closes so no water is flowing throw the pipes and the voltage is zero. When the the throttle is in the highest position the gate is completely open and the water and voltage are likewise at their highest level.

If the pipes passed through a wheel on the way to their destination and that wheel turned the helicopter rotor blades, it might make sense that more water flowing through (high voltage) would turn the wheel and therefore rotor blades faster, allowing the helicopter to fly higher.

Now of course the joysticks and circuit we are talking about is on the remote control, not the helicopter, so we need a few extra steps.

In this imaginary example, the micro-controller measures the water level in the pipe as it flows past. This number represents the voltage and therefore the joystick position. The number is converted into a digital format and passed on to the transmitter, along with the number which correspond to all of the other joystick positions. The transmitter broadcasts these numbers to the helicopter. Finally the receiver in the helicopter talks to its own micro-controller which converts the digital values into the appropriate physical settings for the rotor blades and servos.

1-40 of 65Next »
nhormell says: Apr 3, 2013. 5:56 PM
could you use a hacked mindflex headset instead of the mindwave?
michael3 says: Dec 23, 2012. 9:55 PM
Hi sir:
I am michael,a university student from China.Actually,i made a control for a aircraft (not a RC Helicopter like yours )by using a Mindwave after reading your artical.The software is written by myself,it is Labview and they are connencted by bluetooth.My question is since we just can get two datas:attention and meditation,how can we control our aircraft to a correct direction by Mindwave.For example,if i want the aircraft to go left,what should i do by dealing with the two datas?
fatihah88 says: Apr 5, 2012. 9:57 PM
Hye sir...

This technology is really new for us..even there is no implementation and development have been made in our country..

I am a student and would like to do this for my final year project..

So here,

I have questions to ask you..

1) If i don't have logic analyzer, can still proceed the project?

2) Why using serial usb converter instead of parellel?

3) Is there any different if I use cheap helicopter in term of the microcontroller?
Still using the Serial-usb converter?

Hope to here the answer from you a.s.a.p or can reply to my email..
Thank you.
puzzlebox (author) in reply to fatihah88Apr 8, 2012. 10:38 PM
Hello there, thanks for writing.

Before proceeding, you should be aware that you should assume every model helicopter will use a different microcontroller and/or transmitter chip and potentially an entirely different control mechanism, even when working with two models from the same manufacturer. Its even possible two helicopters which are listed as the same model will have different chips inside over time due to differences in production runs! There are no guarantees.

That said, our helicopter used a "Spektrum DSM2" transmitter chip, which was printed on the side of the box. So its fairly reasonable to assume anything else with that same brand and logo will have a similar configuration. But again, no promises.

To answer your questions more fully:

1) We used a logic analyzer to figure out what was going on with our circuit. The oscilloscope was a more important first step though as it helped us to learn about our circuit - specifically that there was a digital signal between the microcontroller and transmitter chip. If this wasn't the case we would not have had any use for a logic analyzer. If you are affiliated with a university they should have an oscilloscope and someone capable of educating you in its use.

2) Most digital devices speak to one another using some serial protocol. That's a good thing. Just as it is easier for you to read this message one word at a time (letter by letter in fact) than trying to read multiple lines all at once (ergo in parallel). Anyway you are probably thinking of the type of parallel port printers used to use but I think you'll find it is nearly impossible to locate a modern computer which still has one.

3) A "cheap" helicopter is likely to use less complex parts and likely different control mechanisms, such as IR. It would be easier to hack the joystick potentiometers for such a device.


Finally, one last word - if you do not have a solid foundation in electronics you're going to want to find and work directly in person with someone who does. Most of what I have learned personally was from working on projects such as this alongside much more experienced individuals. Trying to ask complex questions over an internet forum will quickly become an exercise in frustration - not the least of which for the person trying to answer them!


Cheers

Steve Castellotti
cdanger in reply to puzzleboxOct 10, 2012. 9:11 PM
Mind controlled helicopters may or may not get you laid, but I think you are a cool person for sharing knowledge and answering this person's questions in such detail.
he who crashes often in reply to cdangerNov 7, 2012. 4:07 PM
who says mind controlled helis won't get you laid? =P
akhandelwal2 says: Sep 4, 2012. 1:31 PM
hello.sir

I am from India

i want to build this project. I have neurosky mind set..

So i want to ask few questions regarding other parts of that project ..

Q-1. can i use another company's RC helicopter. I didn't find the same company's helicopter or if that helicopter company supplying their product in india then where should i buy?

Q 2- can u tell me full specification of usb to serial cable that used by u and where can i buy is it available in india....?

Q3- i didn't understands that why u by passing all the circuit and components and connceting only the transmitter chip to usb to serial cable .....can u please expalin it ...


fatihah88 says: Jul 1, 2012. 5:36 AM
Hi.. one more thing to ask you.. can i use Arduino usb yo serial converter board or just build the simple board like what you have done? pls advise me.. thanks..
samando says: May 31, 2012. 4:51 AM
Here's a thought: Thought-controlled slot cars. The harder you concentrate, the faster the car goes. When you need to brake, however, you have to relax. Which is difficult, 'cause your car is hurtling towards a bend at far too high a speed. It'd be engaging, difficult and fun. I see a profit in this.
shijau says: May 13, 2012. 9:55 PM
Hi..

I would like to ask few things..

1) Can we just use USB to parallel?why and why not?
2) Why you choose to use USB to serial?any advantages of using this kind of board?

That's all ..

puzzlebox (author) in reply to shijauMay 13, 2012. 10:53 PM
Hello shijau, thanks for writing.

In this project we encountered a Spektrum DSM2 transmitter chip, which receives as its input a serial protocol from the remote's microcontroller. The chip does not, to my knowledge have a parallel interface.

In any case we modified an existing hardware device, so our equipment had to match.


Cheers

Steve Castellotti
The Cartographer says: Apr 27, 2012. 7:28 PM
Dude thats so cool.
Bionic Chandru says: Jan 17, 2012. 4:00 AM
Sir,
I have some doubts. So please me explain these...
Your project explanations are very nice...I can understand your explanations. But I can’t able to understand your proto type board connections, because it is quite different from my text book explanations. So please explain me about “there are four wires one is +ve, -ve, Gnd, and data sending connections in data cable and remote control and also why you are using Blade mCX2 model helicopter to control the MLP4DSM type of remote control...why not the same model helicopter... and after finishing connections, you have shown another one 55 seconds video, why you are using here same 2laptops and what are all the software installed in it”...

puzzlebox (author) in reply to Bionic ChandruJan 18, 2012. 7:27 PM

    Thank you for writing.

    To quickly answer your questions:

- The MLP4DSM is the controller provided with the Blade mCX2, so that was the most obvious choice to use.

- The USB-to-Serial adapter cable we used provides 4 pins: Power, Ground/Negative (they are the same wire), Rx and Tx. We first needed to receive data (Rx) from the remote control's circuit board microprocessor to read the commands it would send to the transmitter chip. Later we needed to transmit that same data (Tx) to the transmitter chip. In our example we used Red for positive power, black for ground/negative, yellow for Rx and orange for Tx.

- Only one laptop is necessary. We used two during our development for our own convenience. The only software you need to control the helicopters is Puzzlebox Brainstorms. If you want to use mind-control from a NeuroSky headset (or similar) you will also need Puzzlebox Synapse. In the course of the modification we used special software for the software-based Logic Analyzer. All required materials are listed on the first page of the instructions and links to all manufacturers and relevant software is provided in the Glossary:

http://www.instructables.com/id/Brain-Controlled-RC-Helicopter/step9/Glossary-Link-Index-and-Credits/


    I hope this helps.

    If you complete the project, please send us photos so we can add them to our website!


Thank you.


Steve Castellotti
Bionic Chandru in reply to puzzleboxJan 20, 2012. 2:05 AM
Sir,
Thank for your kind response, definitely I' ll finish this project and send you a photographs, and I can't able to sing up your official site, some more doubts also I have for neurosky headset I have o install drivers provided with headset and puzzle box synapse, and thoshiba blue tooth software also is it... nerosky head set connected with PC via blue tooth is it sir, and after wearing headset how to think a commands.
Thanking you,
Chandru
Bionic Chandru in reply to Bionic ChandruJan 20, 2012. 2:49 PM
One more doubt also sir,
In prototype board two terminals is connected to the RC one is black and another one is orange and that orange and yellow wire connections are connected random in connections...this is what I am getting confusion...
puzzlebox (author) in reply to Bionic ChandruJan 22, 2012. 8:21 PM

I think the word you mean to use is "question" not "doubt" (c:

Happy to help.


The official site for the software is http://brainstorms.puzzlebox.info


If you are running Windows XP, then the recommended Bluetooth stack to use with with the NeuroSky MindSet is from Toshiba. It should be included on the installation CD which comes with the MindSet. The default Microsoft Bluetooth stack should work but many users have experienced connections hanging and frequently timing out while using it.

Besides being able to establish the Bluetooth Serial connection, no other drivers or software should be necessary. Specifically, Puzzlebox Synapse is a replacement for NeuroSky's ThinkGear server, so you don't want to run both at the same time. Puzzlebox Brainstorms can talk to either NeuroSky ThinkGear or Puzzlebox Synapse as they both provide the same protocol.


The NeuroSky MindSet measures levels of attention and relaxation. Some suggestions for achieving and maintaining a high level of focus include performing mathematics in your head, reciting song lyrics, or naming each street from one part of a familiar city to another. To achieve high levels of relaxation it helps to close one's eyes and meditate. Everyone is a little different so perhaps you will find what works best for you by experimenting.


Finally to answer your question about the wires, the connections are not random. If you are using the exact transmitter chip described in this document with a USB serial cable, you don't need to worry about reading values from the microcontroller because we have already traced them out for you in the source code.

You will only need to connect the positive (red) and ground (black) cables from the USB serial adapter to the positive and ground pins of the transmitter chip. Then you will need to connect the "transmit" (Tx) wire from the USB serial adapter to the "receive" (Rx) pin of the transmitter chip -- because your computer will be transmitting commands to the chip, the chip will receive those commands, and re-transmit them through the radio signal.

A prototype board with several wires are shown in the video so that we could easily change between reading values from the microcontroller to writing values to the transmitter. If all you want to do is fly the helicopter form computer software you don't need to reproduce all of that work and you will only ever need three wires to connect the transmitter chip to the USB-to-Serial adapter.

I hope this helps.

Cheers

Steve Castellotti
Bionic Chandru in reply to puzzleboxJan 25, 2012. 2:04 AM
Sir,
When I wearing a mind set, what are the words I have to think to fly helicopter.
puzzlebox (author) in reply to Bionic ChandruJan 26, 2012. 4:04 PM
You don't think a specific word or command, the EEG simply measures your brainwaves and compares characteristics to those of a known baseline (composited from a large pool of test subjects during a scientific study).

In other words, if you ever play sports such as basketball, while on the court taking foul shots one after another, you have to block the noise and distraction of people around you in order to focus on making the shots. In that moment, if you were doing well, you would tend to measure a high level of focus. If on the other hand you were shooting poorly because of someone shouting or the sun in your eyes, then you would tend to measure low focus.

Its the same if you are watching a boring television show (low focus) versus your favourite movie (high focus).

If you are trying to write a paper for class and you're not making any progress, you would tend to measure low focus, but if you knew everything you wanted to say and were typing it out as fast as your fingers would let you, you would tend to measure with high focus.

We use those high-focus-tendencies to make the helicopter fly. Whether you happen to be playing basketball, watching a movie, or writing a paper at the time you are wearing the headset doesn't affect the software - only how focused or engaged you are at the time.

Bionic Chandru in reply to puzzleboxFeb 5, 2012. 7:53 AM
Sir,
I am waiting for your reply, Puzzle box synapse will work for radio frequency mind wave, else shall I buy mindband, Mindset is not possible because it is outdated manufacturing.....

Thanking you,

By,
M.Hariram Chandar
Bionic Chandru in reply to puzzleboxJan 25, 2012. 1:42 AM
Thank You so much sir,
Chandru
ilpug says: Aug 19, 2011. 9:59 AM
now all you need is something that when you think "beer" it will bring you beer.
dentman1 in reply to ilpugJan 16, 2012. 7:27 PM
a good wife
THEORANGESNOWFROG says: Dec 27, 2011. 12:24 PM
AWESOME!!! I immediately subscribe to you!
nrosenberg says: Aug 29, 2011. 7:45 AM
You don't plan on releasing this as a pre-configured kit for those of us, who don't have access to oscilloscopes and logic analysers, do you? ;P
build52 says: Aug 19, 2011. 9:54 AM
awesome!!!!!!!!!!!!!!!!!!!!!!!!!!!! my brother made some thing like this but it was a rc car. didn't even know that you could do that.
iScience says: Aug 18, 2011. 10:35 PM
This is awsome!!
But with some EEG paste and more electrodes, we can make this go
Forward, Backward, LAnd, Right, Left
I think we have to amplify the signal and decode it with a formula and program it

I think im gonna do this :)
ms10 says: Jul 29, 2011. 1:27 PM
cool.great rc project
kmpres says: Apr 17, 2011. 7:46 AM
Fabulous! Now, could you please write an instructible with some how-to detail so those of us with some electronics knowledge can build one of our own? I have built digitally controlled R/C transmitters in the past and would enjoy flying a simple plane or helicopter by brain control. Today, up and forward. Tomorrow, simple maneuvers and a controlled landing. How tough is it to teach yourself how to manipulate your brainwaves?
puzzlebox (author) in reply to kmpresJun 4, 2011. 4:55 PM
We tried to make the Instructable as detailed as we could, if you have any specific questions about the process please feel free to just ask!

Teaching yourself to control your brainwaves is actually quite simple and intuitive, at least for this application. All you have to do is focus your mind and maintain concentration. You can focus or concentrate on anything - doing math problems inside your head or naming every street and intersection between your home and school or office, that sort of thing.

If you wanted to perform more complex control there are methods to do that using Brain-Computer Interface, but they use different parts of the brain, such as the sensorimotor or visual cortex, requiring more electrodes with different placement on the head. Attention / Relaxation measurements are a great start with the equipment currently available at the consumer-grade level however.
sdobbie says: Apr 17, 2011. 10:43 AM
It would be good if you could actually find these consumer headsets.
puzzlebox (author) in reply to sdobbieJun 4, 2011. 4:49 PM
You can find them online here: http://store.neurosky.com/

We used a MindSet for this project but there is support for the $99 USD MindWave in the SVN for Puzzlebox Synapse.
james.mcglashan says: Apr 17, 2011. 8:23 PM
Which linux distro are you currently using?

Also it would be a bit of a pain to carry around a laptop when ever you want to fly it. Have you any ideas for a case design and making the whole thing smaller so you can have nothing but an electrode on your head and a little box in your pocket?
puzzlebox (author) in reply to james.mcglashanJun 4, 2011. 4:42 PM
Currently we are using Fedora Linux and releasing RPM packages alongside Windows executables and plain source code. The software should work under Apple OS X as well or any other distribution of Linux for that matter.

Regards the laptop question, it should be possible to port the code to run from an Arduino or similar embedded device.
james.mcglashan in reply to james.mcglashanApr 17, 2011. 8:28 PM
P.S: if you did this to a real helicopter, and you start to worry (maybe about to crash) will you fly up or down?
puzzlebox (author) in reply to james.mcglashanJun 4, 2011. 4:46 PM
ha ha, no you would have a failsafe in place at all times. In fact the current software version does not do it but there's no reason you couldn't program a "safe landing" procedure to be called any time attention levels dropped below a certain threshold, including if the headset was turned off or became disconnected.
samando says: Apr 18, 2011. 2:21 AM
This is just amazing., but as most entry-level indoor RC helicopters are controlled by infra-red, it it possible to use IR with this setup?
-Hope that makes sense.
puzzlebox (author) in reply to samandoJun 4, 2011. 4:38 PM
There's no reason why an IR transmitter wouldn't work, although the hack would be slightly different. Because our modification was tailored to the protocol used by the Spektrum transmitter chip, you would need to adapt the code (and possibly the approach) to deal with the differences between the two systems.

One suggestion would be to set the voltage levels of the joystick potentiometers manually using an Arduino or similar. In theory that should work with any type of remote control which has variable throttle and steering.
matthewvenn says: Apr 18, 2011. 10:19 AM
ace! would like to know more about how to use a logic analyzer.
puzzlebox (author) in reply to matthewvennJun 4, 2011. 4:34 PM
We used a software-based logic analyzer from Saleae. The control software is Open Source and we found the hardware pricing to be quite reasonable. You can check them out at their website: http://www.saleae.com/logic/
1-40 of 65Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!