Brain Car

Drivers start your Attention !

By focusing attention, a toy car driver controls the forward motion.


A “Mind Flex” headband samples EEG data of the driver’s brain across several frequencies once per second. Follow this tutorial to make your own to work with an Arduino.


We chose to use only the “attention data stream” from the Mind Flex (MF).  We found this stream is most easily controllable by the driver. An Arduino samples the EEG data to process the “attention data stream” in preparation to control the toy car.

For this step, we opened the remote control of the car and connected the back and forth switches with two digital pins of the Arduino. It is necessary to use transistors to close the circuit of the switches and the Arduino output pins will turn it on or off.


Besides that, we need to be sure that the signal from the “Mind Flex” is good. For this, we added a LED. If the value signal is zero, then the LED lights up and we can use the attention values to direct the toy car  forward or backwards. From 0 to 30, your attention is low,  the toy car goes backward. From 30 to 65 the toy car doesn’t move and above 65 it goes forward.

Arduino and remote controller board

The Arduino is the blue circuit board in this photo.  The green PCB is the remote controller board for the toy car.  After testing, we realized attention values change drastically,  so we added a delay in the code for stability.

Our last step was to add a battery so we can be away of the computer while playing!


Code is below:

// Toy Car Race
// Brain Hackaton @ Parsons
// Bernardo Schorr, Patrik Matos, Maria Paula Saba, Scott Stensland


const int LED = 2;
const int front = 6;
const int back = 7;

void setup() {


void loop() {

if (brain.update()) {

int signal = brain.readSignalQuality();
int attention = brain.readAttention();

if(signal == 0){
digitalWrite(LED, HIGH);

if(attention < 20){ digitalWrite(front, LOW); digitalWrite(back, HIGH); delay(500); digitalWrite(back,LOW); } else if(attention > 20 && attention < 60){ digitalWrite(front, LOW); digitalWrite(back, LOW); } else if(attention > 60){

digitalWrite(front, HIGH);
digitalWrite(back, LOW);
digitalWrite(front, LOW);


digitalWrite(LED, LOW);
} } }

Our intention is to have a race with two toy car drivers,  each driver wears one “Mind Flex” headset and their own Arduino.  The first toy car to cross the finish line wins.

Mind Flex with Arduino


3 responses to “Brain Car

  1. Pingback: Hack-A-Brain Recap | Brain Interface Lab·

  2. really awesome, am really interested in this project, as i am computer science student i want to make it at my own my home, can i get all guidelines and help please.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s