MindFlex Hack (OT)

Marcwolf

Senior Member
Hi Folks
Found an interesting toy with some fun possibilities (Dr Acula your input needed)

What this toy does is to read the level of your brainwaves - sorta of like a one channel EEG - and then control a small flowting ball with it.
Now the fun thing is that you can hack the headset and read the raw data for other purposes. the code they have is for the Arduino but I can see no issue with converting to one of the X2 chips. the 18M2 might have issues re no scratchpad

You can get these on Ebay from the US - Second hand is about $50 with $55 post and pack

Look at these links and give the imagination a workout

http://ericmika.com/itp/brain-hack

http://www.bigmech.com/misc/mindflex/


Take Care
Dave
 

slimplynth

Senior Member
Not sure what the rules are on here any more.. some forums have bizarre rules about not posting to old threads but this is the only Mindflex thread I found on searching.. just to add that I was curious about these earlier last year and bought one for about 18 quid on ebay (definitely look at suppliers from the US selling spares/replacements).. there are some Ard**** videos for connecting to the serial interface ( I used kynar) btw I always use the colour coding of wires.. Ser'O'ut always = Orange Wire and Serin is always Yellow.. dunno why but it is important if you only have 100ft of red kynar.. and you don't want to really be probing what is what when it's supposed to be telling you how relaxed you are ;)

There are plenty of youtubes but mostly seem similar to this:

www.gdiy.com/projects/mindflex-eeg-with-raw-data-over-bluetooth/index.php?lang=en

I'd already connected it successfully at 9600 baud but the mobile apps uses 57600 (I think)... definitely aim for this.. the app i used is BrainWaveVisualizer..

The HC-06 bluetooth module takes about 20 seconds to pair so don't be disheartened if it looks dead from the outset.

You do need to put the HC-06 into the correct baud mode - I just sent this via an 08M2:

Code:
#no_data

setfreq M8

symbol Tx = C.4
symbol BAUD = T9600_8

main:

serout Tx, BAUD, ("AT+BAUD7",13,10)

pause 5000

end
I also added an 08M2 to send the correct hex code 02 to put the MindFlex into the correct baud mode on power-up:

Code:
init:
setfreq m8

main:

pause 100

for b0 = 1 to 5

serout C.4,T9600_8,($02)

next b0

end
... it's working, apparently 512 samples per second once you get the NeuroSky chip putting out raw EEG data..


if you just want a picaxe to interface at 9600 baud:

Code:
;hard wired connection to mindfles
#No_Data

Symbol TX    = C.0
Symbol RX    = C.2
Symbol LED   = c.4
Symbol BAUD  = T9600_8 
Symbol CTRLZ = 26
Symbol QUOTES = 34
Symbol blinkPause = 1000

init:


setfreq m8


main:

Serin RX,BAUD,b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b15,b16,b17,b18

Sertxd("Signal=",#b0,CR,LF,"Attention=",#b1,CR,LF,"Meditation=",#b2,CR,LF,"8Bit Raw=",#b3,CR,LF,"8Bit Raw=",#b4,CR,LF,"Raw Marker",#b5,"Raw Wave",#b6,#b7,#b8,#b9,#b10,#b11,#b15,#b16,#b17,#b18,CR,LF)

goto main
 

slimplynth

Senior Member
Not sure what the rules are on here any more.. some forums have bizarre rules about not posting to old threads but this is the only Mindflex thread I found on searching.. just to add that I was curious about these earlier last year and bought one for about 18 quid on ebay (definitely look at suppliers from the US selling spares/replacements).. there are some Ard**** videos for connecting to the serial interface ( I used kynar) btw I always use the colour coding of wires.. Ser'O'ut always = Orange Wire and Serin is always Yellow.. dunno why but it is important if you only have 100ft of red kynar.. and you don't want to really be probing what is what when it's supposed to be telling you how relaxed you are ;)

There are plenty of youtubes but mostly seem similar to this:

www.gdiy.com/projects/mindflex-eeg-with-raw-data-over-bluetooth/index.php?lang=en

I'd already connected it successfully at 9600 baud but the mobile apps uses 57600 (I think)... definitely aim for this.. the app i used is BrainWaveVisualizer..

The HC-06 bluetooth module takes about 20 seconds to pair so don't be disheartened if it looks dead from the outset.

You do need to put the HC-06 into the correct baud mode - I just sent this via an 08M2:

Code:
#no_data

setfreq M8

symbol Tx = C.4
symbol BAUD = T9600_8

main:

serout Tx, BAUD, ("AT+BAUD7",13,10)

pause 5000

end
I also added an 08M2 to send the correct hex code 02 to put the MindFlex into the correct baud mode on power-up:

Code:
init:
setfreq m8

main:

pause 100

for b0 = 1 to 5

serout C.4,T9600_8,($02)

next b0

end
... it's working, apparently 512 samples per second once you get the NeuroSky chip putting out raw EEG data..


if you just want a picaxe to interface at 9600 baud:

Code:
;hard wired connection to mindfles
#No_Data

Symbol TX    = C.0
Symbol RX    = C.2
Symbol LED   = c.4
Symbol BAUD  = T9600_8 
Symbol CTRLZ = 26
Symbol QUOTES = 34
Symbol blinkPause = 1000

init:


setfreq m8


main:

Serin RX,BAUD,b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b15,b16,b17,b18

Sertxd("Signal=",#b0,CR,LF,"Attention=",#b1,CR,LF,"Meditation=",#b2,CR,LF,"8Bit Raw=",#b3,CR,LF,"8Bit Raw=",#b4,CR,LF,"Raw Marker",#b5,"Raw Wave",#b6,#b7,#b8,#b9,#b10,#b11,#b15,#b16,#b17,#b18,CR,LF)

goto main
(sorry if this is considered bumping or repeating) Out of interest, has anyone worked on Mind Flex recently? I did start a 3D printed effort.. got the main hand body printed before having to give up on my deltabot.. the mindflex picaxe projects seem an ideal picaxe/student project for schools? getting it to report at the standard 9600 baud rate is no prob.. and might even be more useful than the highest baud rate they're capable of? (ps. nothing against deltabots but min just pushed me too far, its been seconds from the window several times..
 
Top