The aim of this project is to make a Puzzlebox Brainstorm Controlled RC Helicopter. For this, a Radio Controlled Helicopter will be required whose remote control hardware will be modified. The RC Helicopter will be maneuvered by using an open source computer software and flown with the help of brainwave measurements dictated by EEG headsets (consumer-grade). Software being used will be; Puzzlebox Synapse integrated with EEG headsets like: NeuroSky MindSet or Emotiv EPOC; and Puzzlebox Brainstorms connected with the transmitter chip extracted from the RC Helicopter's remote control. Here, the brainstorm device delivers flight commands which are perceived by it from the Puzzlebox Synapse. Be well acquainted with the avionics and basic controls of the helicopter before executing this project. Also assure at your end that the helicopter is functioning well at your end.
Difficulty Level: Challenging
The necessary resources required to execute this project are: EEG headset (like NeuroSky MindSet or Emotiv EPOC), USB-to-Serial converter cable (which can be set at an arbitrary baud rate), oscilloscope, logic analyzer, soldering iron and solder, connection cables and prototyping board, puzzle box synapse and puzzle box brainstorms software.
As a first step, introspect the remote control components- Blade MLP4DSM remote control should be used. Arrange the four channel forces which are used for flying the copter: Throttle (Up/Down in the air), Elevator (Forward/Backward while flying), Aileron (Left/Right while flying) and Rudder (Rotate Clockwise/Counter-clockwise while flying). After that connect the two joystick to the potentiometers which (regulate voltage of the circuit) from where it will be further connected to the DC power source and Atmega88PA micro-controller.
Step 2: Connect Control Board to Oscilloscope
With Oscilloscope the user can determine the characteristics of the signal sent between the micro-controller and the transmitter chip. After that connect the lead and ground wire to the pins of transmitter chip after making sure that which among them is used for sending signals and as the electrical ground. Make sure that the remote control of the helicopter sends a digital signal opposed to analog signal. Evaluate the measure of voltage level used by the digital signal for generating signals at the same voltage level by using USB-to-Serial cable.
Step 3: Connect Control Board to Logic Analyzer
Use a Tektronix 1241 Logic Analyze for connecting it with Connect Control Board. After that, use a Saleae Logic for measuring the frequency for which frames of data are sent - including format, quantity, rate and content of characters in each byte of its serial protocol.
Step 4: Desolder Transmitter from Control Board
For interfacing the RC helicopter via software we should deploy a transmitter chip direction using a USB-to-Serial cable in all the components and communicates.
Next thing to do is, desoldering the transmitter chip from the remote control.
Step 5: Connect Control Board to USB/Serial Cable
By referring to a simple switch circuit we can operate the helicopter in three configurations:
a). By reconnecting the original remote control.
b). Connecting the USB-to-Serial cable and operating the helicopter using software.
c). Integrating the remote control to the USB-to-Serial cable for capturing and recording data frames.
In Python we would have to write "Helicopter_Control.py" module available as a part of the Puzzlebox Brainstorms software.
We can write the "read" command as:
Python Helicopter_Control.py --command=read –device=/dev/ttyUSB0
Step 6: Test Flying RC Helicopter from Command Console
After operating the Radio Controlled Helicopter with the original remote control, the switches on the prototype board should be flipped, and a issue command to "fly forward" via Puzzlebox Brainstorms software operating in console mode.
Available console commands include the following:
Neutral: Command for establishing initial sync with helicopter
python Helicopter_Control.py --command=neutral
Hover: For hovering the helicopter in the air
python Helicopter_Control.py --command=hover
Fly Forward: For flying the helicopter forward (low to the ground for easy landing)
python Helicopter_Control.py --command=fly_forward
Read: Carefully go through the data frames of the remote control and output them directly to the console
python Helicopter_Control.py –command=read
Step 7: Connect EEG Headset to Puzzlebox Synapse
We are already having Puzzlebox Synapse which is a open source, cross-platform application which gets connected directly to the commercially available consumer-grade EEG headsets which gathers brainwaves signals, conducts visualization, records sessions to disk, delivers TCP/IP server infrastructure to relay information to distant clients.
In step 7, the Puzzlebox Synapse will be embedded with a NeuroSky MindSet and here it would report calculations of attention and meditation levels to Puzzlebox Brainstorms - which can be further used to fly, hover, or land the Radio Controlled Helicopter .
Set-up a bluetooth connection at your NeuroSky MindSet. After that select the Bluetooth MAC address of bluetooth connected NeuroSky MindSet and select the indicated COM.Click on the start option below down the Server Daemon section of the interface - with this the GUI will display EEG measurements in realtime.
Step 8: Fly RC Helicopter Using Puzzlebox Brainstorms
Puzzlebox Brainstorms allows Brain-Computer Interface (BCI) control of vehicles, LEGO Mindstorms, Radio Controlled Helicopters and even electric wheelchairs.
We can use this software to move our helicopter forward, hover, land automatically as per the detected levels of concentration and relaxation from EEG headset (NeuroSky MindSet/ Emotiv EPOC).
After downloading the application we would have to connect it via Puzzlebox Synapse server.
We would have to verify the Host and Port settings in the control panel of Puzzlebox Brainstorm for receiving EEG detections. By clicking on the RC Helicopter tab we can conclude a Puzzlebox Brainstorm Controlled RC Helicopter.
Frequently asked questions:
1. What is the use of micro-controllers?
The micro-controller plays a crucial role, it measures the input voltages and gives them digital PCM values for the ready of perusal transmitter chip. Here the chip uses the Spektrum DSM2 protocol to communicate with the RC Helicopter.
2. What is the purpose of logic analyzer?
The logic analyzer helps us in capturing the frames of digital PCM data. Since the signal is sent from the micro-controller to the transmitter it helps in visualizing and decoding them.
3. What is the importance of baud rate?
The baud rate is quite a very necessary element. The closest standard baud to our target supported by most if not all serial devices is 115200.
1. Use a microscope to check the remote control manufacturer's name and part number of the various chips for researching their features and protocols.
2. By adjusting the intensity of the oscilloscope we can make the image more clear.
3. With Emotiv EPOC headset and EmoKey" software it can be possible to directly send commands to Puzzlebox Brainstorms .
4. 0000 is the default Bluetooth pin for the NeuroSky MindSet and after establishing connection you can have a new COM port for your windows system or /dev/ttyUSB under Linux.
5. By using an Emotiv EPOC headset, arbitrary detections can be provided to helicopter functions by linking through the "EmoKey" program to these keyboard shortcuts:
"Home " or "[ " - Hover
"Page Up " or "] " - Fly Forward
"End " or " " – Land
Things to watch out for:
1. For dealing with different levels of voltage you will have to add a simple circuit to step up or down the circuit voltage for matching the USB-to-Serial hardware.
2. Select a USB-to-Serial device whose chipset permits the setting of an arbitrary baud rate. In this case a FTDI chipset was used.
3. There remains scope for a possible delay in the helicopter takes off and during that time period, the sync between transmitter and helicopter is re-established.