Introduction: Brain Controlled Light Bulb

About: I am passionate robotics researcher

A Future technology experiment

Step 1: Description

This is brain computer interface experiment to control any electrical appliance via just thinking in the mind

When you think something in the brain the neurons inside the brain communicate each other to carry information from one place to another, these communication take place in the form of electrical pulse

And these electrical pulse can be detectable now with the help of modern technology for example Brain sensor

The brain signal can be further classified into delta,theta,alpha,beta and gamma waves based on the frequency band from 0 hz to 100 hz and more

The brain sensor does certain calculation with the brain waves signals and results in two major signal

Called attention and meditation signal

My experiment is based on the attention signal of the brain sensor

Step 2: Components

Components:

1 Brain sensor (mind flex game headphone)

2 Arduino UNO micro controller

3 Bluetooth module (HC-05) in two set

4 SPDT relay

5 Jumper wires

6 Electrical cable

7 Light bulb

8 9 V power supply for arduino

Step 3: Pin Configuration


1 First you need to synchnize both Bluetooth modules in master-slave mode

2 Brain sensor Bluetooth (Slave)

Tx ß--------à Rx

RX ß---------àTX

5vß--------à Vcc

Groundß-------àGround

2 Arduino Bluetooth (Master)

Tx ß--------à Rx

RX ß---------àTX

5vß--------à Vcc

Groundß-------àGround

4 Pin 10 of Arduino to relay terminal A

5 Pin ground of Arduino to relay terminal B

6 220V AC supply to common pole of relay

7 NC terminal to the electrical appliance for example(light bulb)

Step 4: Arduino Code

//Program:

// Arduino Brain Library - Brain Serial Test

#include

const int BULBPIN = 10; // the number of the BULB pin

// Set up the brain parser, pass it the hardware serial object you want to listen on.

Brain brain(Serial);

int AttentionValue=0;

int BulbState = 0;

void setup() {

pinMode(BULBPIN, OUTPUT);

// Start the hardware serial.

Serial.begin(9600);

}

void loop() {

// Expect packets about once per second.

// The .readCSV() function returns a string (well, char*) listing the most recent brain data, in the following format:

// "signal strength, attention, meditation, delta, theta, low alpha, high alpha, low beta, high beta, low gamma, high gamma"

if (brain.update()) {

Serial.println(brain.readErrors());

Serial.println(brain.readCSV());

// Serial.println("Attention :" +brain.readAttention());

if(brain.readAttention()>75)

{

//Serial.println("Attention :" +brain.readAttention();

if(BulbState==LOW)

{

digitalWrite(BULBPIN, HIGH);

BulbState=1;

delay(50);

}

else

{

digitalWrite(BULBPIN, LOW);

BulbState=0;

delay(50);

}

}

delay(2000);

}

}

Step 5: How It Works

when we
think something our brain emits certain brain waves these brain waves

Signals are captured by the brain sensor. The slave Bluetooth module attached with the brain sensor sends the signals to the another synchronized master Bluetooth module which further send the signal to the ardunino micro controller, the microcontroller manipulate the signals and read the attention and if the attention signal rises enough to cross the limit of threshold value , it now send signal to relay to turn on or turn off the light bulb.