+91-7834999925       contact@tacthub.in

BRAIN CONTROL DRONE USING ARDUINO MKR1000

This Project describes how to lift-off a drone with our mind and a controller using a MindWave sensor and Arduino MKR1000.

Hardware Required:-

 

1:- Arduino Mkr1000

 

2:- Micro Drone

 

3:- Breadboard

 

4:- Mind Wavesensor

 

5:- Software Required

The Arduino Integrated Development Environment (IDE)


Steps to follow:-

 

STEP1:-

The first step of this project is to open the case of your controller. This controller needs approx 3.3v which can be done using two series connected batteries and is same as the output of the Arduino MKR1000.

STEP2:-

Measure with a multi-meter what the middle, high and low voltages are of the joysticks once powered. Write them down for later use.

STEP3:-

Desolder the joystick components from the PCB.

STEP4:-

Connect the multimeter to the + and - to read the resistance.

STEP5:-

Digital to analog (AnalogWrite) on with your Arduino the output will be a PWM (Pulse Width Modulation) signal.

 

STEP6:-

The Arduino Circuit part of the circuit shown above is the low pass filter we have to create.

 

STEP7:-

 

MindWave Sensor Setup:-

Install all the drivers on your computer.

Pair the MindWave sensor with your computer via Bluetooth.

Hold on button up for 3 seconds so that the blue led blinks twice, then it will become discoverable.

Once connected you start processing.

CODE

  • This part shows the void setup and loop of the code

void setup() {

 

size(150, 500);

 

receiver  = new Serial(this, "COM10", 115200);

 

mindSet = new MindSet(this, "COM5");

 

smooth();

 

strokeWeight(5);

stroke(255);

strokeCap(SQUARE);

 

fill(255);

 

}

 

 

void draw()

{

background(0);

 

line( 0, height*0.60, width, height*.60);

 

line( width*.5, height, width*.5, height*map( float( attentionLevel ) / 100, 0, 1, 1, 0) );

 

throttle = int( map( attentionLevel, 40, 100, 30, 255) );

 

throttle    = constrain( throttle,  0, 255);

pitch       = constrain( pitch,     0, 255);

roll        = constrain( roll,      0, 255);

yaw         = constrain( yaw,       0, 255);

 

if( receiver .available() > 0)

{

println( "attentionLevel: "+attentionLevel+" throttle: "+throttle+" yaw: "+yaw+" pitch: "+pitch+" roll: "+roll );

receiver .write( "throttle: "+throttle+" yaw: "+yaw+" pitch: "+pitch+" roll: "+roll );

}

 

}

 

void keyPressed() {

if(key == 'k'|| key == ESC) {

if( receiver .available() > 0)

{

receiver .write("throttle: "+0+" yaw: "+127+" pitch: "+127+" roll: "+127);

exit();

}

}

}

 

int signalStrenght = 0;

int attentionLevel = 0;

 

public void attentionEvent( int attentionLevel_val )

{

attentionLevel = attentionLevel_val;

}

 

public void poorSignalEvent( int signalNoise )

{

if( signalNoise == 200) {

println( "Mindset is not touching your skin!");

}

 

signalStrenght = int( map( ( 200-signalNoise ), 200, 0, 100, 0) );

println( "Signal strength: "+ signalStrenght + "%");

}

Price: 7000 INR

Buy Now