Introduction: Mind-Controlled Traffic Light Using Arduino and MindFlex
Hi everyone,this is my first instructable.Today i will show you how to make a simple traffic light controlled by your brainwaves using the EEG toy MindFlex. This is a very simple and basic project,but the uses of the MindFlex Hack are much much more.
For this project you will need the following parts:
- 1 Arduino UNO R3
- 1 Breadboard
-1 MindFlex Headset
-1 Green LED
-1 Yellow LED
-1 Red LED
- 3 330 Ohm Resistors
-Hot Glue Gun
-Arduino Brain Library
Note: To install the Brain library you have to put the brain folder inside the arduino "Libraries" folder.
Step 1: Hacking the MindFlex Headset
Hacking the headset is very very simple. It has two cases,one for the battery and one for the circuit.You have to open the circuit case and look for a small board (The NeuroSky board).There you will see a pin named " T " .If you look the entire circuit you will also see a place where the battery is connected.You have to solder (Very Carefully) a wire to the " T " pin,and another to the negative pin of the battery.
Once done this,you have to drill a small hole in the case where the wires will pass,and i suggests that you put a small dab of hot glue there so the wires won't move.
Done this,we can proceed to the next step.
Step 2: Make the Circuit
The circuit is a standard traffic light circuit.You have to connet a GND pin of the Arduino to the negative rail of the Breadboard (Sorry,i forgot to connect the rail to the arduino GND on the scheme).Then,you have to connect the anode (Long Leg) of the green LED to the Arduino pin 2, the anode of the yellow LED to the Arduino pin 4 and the anode of the red LED to the Arduino pin 7 (But you can also use the PWM pins).Done this,you have to connect the cathode (Short Leg) of the three LEDs to the ground rail using the three resistors.
After this,you have to connect the ground wire of the MindFlex to the Arduino ground,and the " T " wire to the arduino 0 (RX) pin.
Now you have to upload the code (remove the wire connected to the RX pin first,and reconnect it after the code is uploaded,because the Arduino IDE can show an error).
Step 3: The Code
Here is the code :
1 Person Made This Project!
- the.pandorica.way made it!
Question 2 years ago
I'm guessing I'm missing something simple... but did you have any duh moments while making this? I feel like I followed this to the T but nothing's working. Any helpful insight is appreciated!
Answer 2 years ago
Update, got the led's to work but seems to be a problem with how and when they switch over. Example.. when first plugged in green led comes on, after a couple sec's yellow comes and stays on no matter how relaxed I get, green won't come back on. Took off my mindflex to have it read 0 brainwaves so it'd go back to green but nothing. Sorry if this makes little to no sense, just starting my arduino journey
5 years ago
Hello. Can you explain, how does it work, please? When I think about red, only red diod is ON, when I think on green, only green is ON etc,?
Reply 3 years ago
When your mind is relaxed the green light activates. When your mind is focused, the red one does. It's sort of a "Training" compiler for giving you better insight of how relaxed or focused your mind can become.
Question 3 years ago
Is this the brain.h library referenced in the code?
Answer 3 years ago
Yes it is. No need to add it.
Tip 3 years ago
This project can function perfectly well without the 330 ohm set.
7 years ago
Reply 7 years ago