Remote mind control with Arduino and ThinkGear module...




My project about controlling the speed of a motor by your mind... This is an Arduino and Neurosky ThinkGear module project... Mosfet motor driver circuit is as follows:

The Arduino script for controlling the motor with brain data is as follows:

// Arduino Brain Library - Brain SoftSerial DC motor control over Bluetooth
// Speeds up DC motor with attention values
// Description: Grabs brain data from software serial on pin 10 and sends CSV out over the hardware serial
// More info:
// Author: Eric Mika, 2014
// Modified by Dincer Hepguler 2015 for controlling speed of a DC motor
#include <SoftwareSerial.h>
#include <Brain.h>
int motorPin = 3;
int speed = 0;
// Set up the software serial port on pins 10 (RX) and 11 (TX). We'll only actually hook up pin 10.
SoftwareSerial softSerial(10, 11);
// Set up the brain reader, pass it the software serial object you want to listen on.
Brain brain(softSerial);
void setup() {
    pinMode(motorPin, OUTPUT);
    // Start the software serial.
    // Start the hardware serial. 
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()) {
        speed = brain.readAttention();
        speed = map(speed, 0, 100, 0, 255);
        analogWrite(motorPin, speed); 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
GroG's picture

Borsaci06 ! Thanks for this

Borsaci06 !

Thanks for this awesome post.  I enjoyed learning about your experiences with the mindwave / thinkgear module.

I have to say I got the experience of working with one of these modules remotely - Alessandruino had one, and I was not impressed with the hardware, software or data of the module.  I got the impression the system was considerably oversold.   It promised too much and delivered little.  To me, it is little more than a random number generator hooked up to a poor quality myo sensor.  

Here are a list of issues:

  • The product is oversold - the sellers promise all sorts of things the unit can not deliver on
  • The brain, inside the skull, inside the skin generates such weak electro-chemical reactions, I don't believe the unit is "really" picking them up
  • The electrico-magnetic activity of skin, muscle and outside interferrence would swamp the device if it was really capable of the sensitivity needed to pick up brain activity.
  • Even if it could pick up brain activity (which I am suspect) - I don't believe it can produce much useful control.  I know there has been "some" control produced when training with more sophisticated & expensive equipment. The most impressive is probably Air Force experiments with pilots - but if I remember correctly, even that was "not that useful".  There is a big difference between though & activity.  On an electronic level I like to think of this as laying a halls effect sensor next to a CPU and trying to figure out what code is running :)

So in the end, my experience with the thing is :
myo sensor + random number generator + nefarious salesgroup = thinkgear.

It looks like you have had a better experience.

Another thing I have to say, is after 5 years its great to see a video of you !  Now it feels I know you a little better and for that I really appreciate your video !



juerg's picture

@GroG, completely agree on

@GroG, completely agree on your comparison with having an outside detector trying to reassemble the code that is currently running on the CPU. Can also not see what the big brains try to learn from tiny temperature differences in the brain of people they ASSUME what they are currently thinking about - and even if that assumption is correct - how can it help to understand how humans think?...

The question I have: how can we proove the ball is moving up when he thinks up?

borsaci06's picture


It does not work that way... You don't have to think about "lifting" in order to lift that ball... you can of course try to do that way but indeed you have to increase your concentration in order to lift the ball... counting backwards or making multiplications from your mind helps better... the thing is you have to control your concentration... whenever you do that, you achive some lifting.... Indeed, I posted my project here with the hope that one can replace servos instead of the blower motor and use the PWM data to move an InMoov hand and grab something with my sketch...



juerg's picture

Sorry borsaci06 I did not

Sorry borsaci06

I did not want to downgrade your work, it was more of a general impression I wanted to share with GroG.

But if you have only 1 command - concentration (or magnitude of concentration) - it will give you control of 1 blower or 1 servo but InMoov (will have) dozens of servos? So what is your plan to e.g. control the closing of a hand around an object?


GroG's picture

Heh,  Just to be clear, I'm


Just to be clear, I'm completely fascinated where Borsaci is going to take this.  My only complaint was against the manufacturer making IMHO false claims and the quality of their sensor/code/interface.

Our brains are the most adaptable organs we have, they can re-write themselves just like a FPGA.  So it's interesting to see Borsaci train/re-program his brain :)

Although I do not believe borsaci is working on an InMoov, he is an entrepreneur, innovator and adventurer - imagining what things can exist, and trying them.

I think it would be a big challenge to provide accurate control dimensions out of this thing,  but perhaps that is not what borsaci is interested in.