Thursday, February 6, 2014

mindfex headset disassemble hacked

Posted by rinson
The TGAM1 board that is inside the MindFlex can run in three modes. One of these is 9600 bits per second normal mode which is how the MindFlex is configured by default. This outputs a packet of data approximately every second that includes signal strength, attention level, meditation level, and pre-calculated values for 8 EEG power bands.
Friendly Warning and Disclaimer: Hack your toys at your own risk. I'm not responsible for any damage you do to yourself or your belongings. This information is provided here for information and education only. If you use the original hack and just use the data available in normal mode then the MindFlex still works as a game as originally intended. If you enable RAW EEG output then you break the toy!
To enable RAW EEG you need to remove a 10K resistor from the TGAM1 board, and solder an extra connection to the board, as shown in this image:
Connection on the TGAM1
Remove the 10K resistor that appears where the red X is on the photo. You should double check with a multi-meter that you're removing the correct part. It is connected to the B1 port. This B1 port forms part of the configuration of the TGAM1 board. In the MindFlex this 10k resistor connects the B1 port to GND which configures it in normal mode at 9600 bps.
Solder a connection on to the B1 port, then you can add a new 10K resistor that connects the B1 port to VCC. This enables raw output mode at 57600 bps.
You connect to the Arduino in the same way, but you can't use the Arduino Brain Library with this configuration. I'm working on an update for this.
The TGAM1 chip still sends the summary data packets that you get in normal mode once per second, but now you will also get a packet containing the raw EEG reading 512 times per second, approximately once every 2ms.
Read More

Wednesday, February 5, 2014

Dismantling Mindflex Duel Game FOR EEG ARDUINO HACK

Posted by rinson


Hi all,
Here in this video i have shown how to dismantle the Mindflex Duel Game FOR EEG ARDUINO Coding.
As you all know the casing of Mindflex Duel Game is very difficult to open. So this video will help you  to dismantle and also it will help you to know the parts inside this thing.
Read More

Monday, February 3, 2014

sharing eeg mind flex arduino hack with programs

Posted by rinson
hellow my name is rinson n raj   am from india i have done this project of controlling a chain drive robot with mind using mind flex dual and arduino i can give u all codes with a mind flex head set with tgam inside it please be free to mail me for details
rinsonnraj@gmail.com 
Read More

eeg based robot control using arduino and mind flex hack

Posted by rinson
We have done eeg based robot control using arduino and mind flex. For more help on this you can contact me directly. I will clarify all your doubts. Also you can comment below for further details on this project.


















Read More

Visualising mind activity with a hacked toy EEG

Posted by rinson

Visualising mind activity with a hacked toy EEG


The MindFlex toy includes a headset that reads EEG wave data. There's lots of information on hacking this toy to create a simple EEG machine using the limited data the headset provides by default. In this project I have extracted the full RAW EEG data using the same toy headset from the MindFlex game.
Update: I've posted an update to this blog, where I provide details of how to extract the full RAW EEG data from the MindFlex headset.
Friendly Warning and Disclaimer: Hack your toys at your own risk. I'm not responsible for any damage you do to yourself or your belongings. This information is provided here for information and education only. If you use the original hack and just use the data available in normal mode then the MindFlex still works as a game as originally intended. If you enable RAW EEG output then you break the toy!

Reading brain waves

An obvious place for us to start on this project might have been with the excellent OpenEEG project, but while being open, it still has substantial costs and complexity in getting up and running. For this project we looked for a simpler approach.
EEG technology has been incorporated into various toys and household items before. There are various commercial options available based on NeuroSky's ThinkGear chip.
The original Frontier Nerds blog post from 2010 provides a great starting point, but I've made a few changes along the way, including successfully extracting the RAW EEG values from the MindFlex toy.

Budget EEG with the TGAM1

The TGAM1 is the controller board responsible for processing the EEG signals in all of the products based on the NeuroSky ThinkGear chip. NeuroSky no longer sell the boards in small quantities (I've had confirmation of this from their business development team that this is due to support resources) and instead recommend that you buy the BrainWave starter kit. This is probably a good idea if you want easy access to EEG data, but they are still over 100 GBP to buy in the UK, and the toys are available for only 40.
Read More

MindFlex headset Arduino interfacing

Posted by rinson

Simple EEG reading

The basic data that comes out of the MindFlex headset by default actually gives us quite a lot of information for only £40. In the default configuration you have soldered on only two connections, one for a common ground and one for the serial data stream. I connect this to a SoftwareSerial pin on the Arduino and read in the packets. Here's what data you get:
  • Signal strength (0 - 200) where 0 means good signal, and 200 indicates a problem with the connection.
  • Attention and Meditation eSense values. These are a proprietary measure that is calculated by the TGAM1 using NeuroSky's own algorithm. The toys based on this technology use the attention measure.
  • EEG power band values: A measure of the various power bands that has been pre-calculated by the chip, this updates once per second.
The Arduino Brain Library already includes functionality for working with these values.

TGAM1 Region Change

If you bought the EU version and you're in EU then skip this bit.
The MindFlex, MindSet, Necomimi, etc all based on the TGAM1 that includes a notch filter on the EEG wave to remove electrical noise from the data. If you bought a MindFlex from a different region then you will need to adapt it to work for you. For example, if you've bought a headset from the US it will have a notch filter at 60Hz. In Europe our "mains hum" is at 50Hz. You can switch the notch filter to work at the correct frequency with a bit of soldering.

Getting full RAW EEG data

Now on to getting the full raw EEG data from the MindFlex headset. In addition to the two connections you soldered on before there are two extra connections required. This allows you to configure the TGAM1 board that is in the MindFlex to switch between two modes. The 'configure' connection is actually called B1 on the TGAM1 board. In the MindFlex headset B1 is connected to GND via a 10K resistor. I have marked this resistor with an X on the image.
You need to remove this 10K resistor from the circuit board, and connect B2 to VCC via a 10K resistor to enable full raw EEG data output.
The full EEG data is output at the higher baud rate of 57600. You also get the same packets as in normal mode.
You can switch back to normal mode, with just the basic data output at baud rate of 9600 by connecting B1 back to GND with the 10K resistor instead of the VCC connection.

Signal strength

The normal data and raw data modes both give you the summary packet once every second. In this is a measure of signal strength. It should be zero to indicate that the board is getting good measurements. Anything more than 0 indicates poor signal, and 200 is used to indicate a problem.
When I had the Arduino hooked up to the computer serial port I struggled to get the signal strength to 0. When running off batteries (I have an Arduino Pro mini connected to the headset's battery pack) I have had no issues with signal strength.
The issues were resolved by adding an extra GND connection from the Arduino and connecting to the body of the person being tested. I don't recommend this approach and running the headset completely off batteries is recommended.
This requires no wired connection to the computer, hence the RF link that has been implemented.

RF data link

I am using a cheap low-power RF transceiver to send the EEG packets to the computer. This makes the headset wireless and solves the signal strength problem that required the extra ground connection.

Receiving the data

The Processing Brain Grapher is a good starting point to check everything is working but it only works when the headset is in normal mode and sending the data via the serial port.
I am working on a Processing library that will work with the updated headset in full EEG mode, this giving access to the eSense meters, the EEG power band values, and the full EEG raw data. I'll be expanding this section as I make more progress with the libraries and visualisations.
Read More

Full RAW EEG data from the MindFlex headset hack

Posted by rinson
There have been many hacks posted online over the past few years that show how to build a simple EEG machine using the Mattel MindFlex headset.
It's simple to interface this with the Arduino to read the basic single signal EEG data the toy produces. The toy actually only uses one of the measures (attention) but it outputs various useful bits of information.
All of this is detailed in the original Frontier Nerds blog post and on our Brain Wave Visualisation project page.
The original hacks are all based around the preprocessed data that the TGAM1 board in the MindFlex toy produces. I have successfully modified one of these headsets to get full raw EEG data from it. I'm in the process of writing a library and updating the project page with full details, but in the meantime here's how it works.

Full raw EEG values

The TGAM1 board that is inside the MindFlex can run in three modes. One of these is 9600 bits per second normal mode which is how the MindFlex is configured by default. This outputs a packet of data approximately every second that includes signal strength, attention level, meditation level, and pre-calculated values for 8 EEG power bands.
Friendly Warning and Disclaimer: Hack your toys at your own risk. I'm not responsible for any damage you do to yourself or your belongings. This information is provided here for information and education only. If you use the original hack and just use the data available in normal mode then the MindFlex still works as a game as originally intended. If you enable RAW EEG output then you break the toy!
To enable RAW EEG you need to remove a 10K resistor from the TGAM1 board, and solder an extra connection to the board, as shown in this image:
Connection on the TGAM1
Remove the 10K resistor that appears where the red X is on the photo. You should double check with a multi-meter that you're removing the correct part. It is connected to the B1 port. This B1 port forms part of the configuration of the TGAM1 board. In the MindFlex this 10k resistor connects the B1 port to GND which configures it in normal mode at 9600 bps.
Solder a connection on to the B1 port, then you can add a new 10K resistor that connects the B1 port to VCC. This enables raw output mode at 57600 bps.
You connect to the Arduino in the same way, but you can't use the Arduino Brain Library with this configuration. I'm working on an update for this.
The TGAM1 chip still sends the summary data packets that you get in normal mode once per second, but now you will also get a packet containing the raw EEG reading 512 times per second, approximately once every 2ms.
Read More

mind flex out eeg data details

Posted by rinson
The Mind Flex (but not the Froce Trainer) provide eight values representing the amount of electrical activity at different frequencies. This data is heavily filtered / amplified, so where a conventional medical-grade EEG would give you absolute voltage values for each band, NeuroSky instead gives you relative measurements which aren’t easily mapped to real-world units. A run down of the frequencies involved follows, along with a grossly oversimplified summary of the associated mental states.
In addition to these power-band values, the NeuroSky chip provides a pair of proprietary, black-box data values dubbed “attention” and “mediation”. These are intended to provide an easily-grokked reduction of the brainwave data, and it’s what the Force Trainer and Mind Flex actually use to control the game state. We’re a bit skeptical of these values, since NeuroSky won’t disclose how they work, but a white paper they’ve released suggests that the values are at least statistically distinguishable from nonsense.
Here’s the company line on each value:
  • Attention:
    Indicates the intensity of a user’s level of mental “focus” or “attention”, such as that which occurs during intense concentration and directed (but stable) mental activity. Distractions, wandering thoughts, lack of focus, or anxiety may lower the Attention meter levels.
  • Meditation:
    Indicates the level of a user’s mental “calmness” or “relaxation”. Meditation is related to reduced activity by the active mental processes in the brain, and it has long been an observed effect that closing one’s eyes turns off the mental activities which process images from the eyes, so closing the eyes is often an effective method for increasing the Meditation meter level. Distractions, wandering thoughts, anxiety, agitation, and sensory stimuli may lower the Meditation meter levels.
Read More

serial eeg csv data form mind flex dual head set on arduino ide serial monitor

Posted by rinson
Here’s how the CSV breaks down: “signal strength, attention, meditation, delta, theta, low alpha, high alpha, low beta, high beta, low gamma, high gamma”
(More on what these values are supposed to mean later in the article. Also, note that if you are hacking a Force Trainer instead of a Mind Flex, you will only see the first three values — signal strength, attention, and meditation.)
If you put the unit on your head, you should see the “signal strength” value drop to 0 (confusingly, this means the connection is good), and the rest of the numbers start to fluctuate.
Read More

Load up the Arduino with mind flex code for serial data out

Posted by rinson
Download and install the Arduino Brain Library — it’s available here. Open the BrainSerialOutexample and upload it to your board. (You may need to disconnect the RX pin during the upload.) The example code looks like this:
  1. #include
  2. // Set up the brain parser, pass it the hardware serial object you want to listen on.
  3. Brain brain(Serial);
  4. void setup() {
  5.         // Start the hardware serial.
  6.         Serial.begin(9600);
  7. }
  8. void loop() {
  9.         // Expect packets about once per second.
  10.         // The .readCSV() function returns a string (well, char*) listing the most recent brain data, in the following format:
  11.         // "signal strength, attention, meditation, delta, theta, low alpha, high alpha, low beta, high beta, low gamma, high gamma"   
  12.         if (brain.update()) {
  13.                 Serial.println(brain.readCSV());
  14.         }
  15. }
Read More

software.for The data from the NeuroSky to computer

Posted by rinson
That’s the extent of the hardware hack. Now on to the software. The data from the NeuroSky is not in a particularly friendly format. It’s a stream of raw bytes that will need to be parsed before they’ll make any sense. Fate is on our side: the packets coming from the Mind Flex match the structure from NeuroSky’s official Mindset documentation. (See themindset_communications_protocol.pdf document in the Mindset developer kit if you’re interested.) You don’t need to worry about this, since I’ve written an Arduino library that makes the parsing process as painless as possible.
Essentially, the library takes the raw byte data from the NeuroSky chip, and turns it into a niceASCII string of comma-separated values.
Read More

Mind Flex’s connection with Arduino.

Posted by rinson
Hook up the Arduino.
The wire from the Mind Flex’s “T” pin goes into the Arduino’s RX pin. The ground goes… to ground. You may wish to secure the Arduino to the side of the Mind Flex as a matter of convenience. (We used zip ties.)

Read More

Strain relief and wire routing.to arduino

Posted by rinson
Strain relief and wire routing.
We used a dab of hot glue to act as strain relief for the new wires, and drilled a hole in the case for the two wires to poke through after the case was closed. This step is optional.

Read More

Arduino will want to share ground with the Mind Flex circuit

Posted by rinson
Common ground.
Your Arduino will want to share ground with the Mind Flex circuit. Solder another length of wire to ground — any grounding point will do, but using the large solder pad where the battery’s ground connection arrives at the board makes the job easier. A note on power: We’ve found the Mind Flex to be inordinately sensitive to power… our initial hope was to power the NeuroSky board from the Arduino’s 3.3v supply, but this proved unreliable. For now we’re sticking with the factory configuration and powering the Arduino and Mind Flex independently.
Read More

NeuroSky Board is the small daughterboard towards the bottom of the headset

Posted by rinson
 The T Pin.
The NeuroSky Board is the small daughterboard towards the bottom of the headset. If you look closely, you should see conveniently labeled T and R pins — these are the pins the EEG board uses to communicate serially to the microcontroller on the main board, and they’re the pins we’ll use to eavesdrop on the brain data. Solder a length of wire (carefully) to the “T” pin. Thin wire is fine, we used #24 gauge. Be careful not to short the neighboring pins.

Read More

opening or diassembly of mind flex dual head set Disassembly.

Posted by rinson
1. Disassembly.
Grab a screwdriver and
Read More

hacking mind flex dual

Posted by rinson
We decided to take a higher-level approach by grabbing serial data directly from the NeuroSkyEEG chip and cutting the rest of the game hardware out of the loop, leaving a schematic that
looks more like this:
The Hack
Parts list:
  • 1 x Mind Flex
  • 3 x AAA batteries for the headset
  • 1 x Arduino (any variety), with USB cable
  • 2 x 12” lengths of solid core hookup wire (around #22 or #24 gauge is best).
  • PC or Mac to monitor the serial data
Software list:
Read More

Sunday, February 2, 2014

hardware of mindflex dual head set

Posted by rinson
Here’s the basic layout of the Mind Flex hardware. Most of the action is in the headband, which holds the EEG hardware. A micro controller in the headband parses data from the EEG chip and sends updates wirelessly to a base station, where a fan levitates the ball and several LEDs illuminate to represent your current attention level.
This schematic immediately suggests several approaches to data extraction. The most common strategy we’ve seen is to use the LEDs on the base station to get a rough sense of the current attention level. This is nice and simple, but five levels of attention just doesn’t provide the granularity we were looking for.


We decided to take a higher-level approach by grabbing serial data directly from the NeuroSkyEEG chip and cutting the rest of the game hardware out of the loop, leaving a schematic that looks more like this:
Read More

what is inside mind flex dual head set to reed eeg signals

Posted by rinson
   NeuroSky supplies the EEG chip and hardware for the Force Trainer and Mind Flex toys, these options represent a cheaper (if less convenient) way to get the same data. The silicon may be the same between the three, but our tests show that each runs slightly different firmware which accounts for some variations in data output. The Force Trainer, for example, doesn’t output EEG power band values — the Mind Flex does. The MindSet, unlike the toys, also gives you access to raw wave data. However, since we’d probably end up running an FFT on the wave anyway (and that’s essentially what the EEG power bands represent), we didn’t particularly miss this data in our work with the Mind Flex.
Given all of this, I think the Mind Flex represents a sweet spot on the price / performance curve. It gives you almost all of the data the Mind Set for less than half the cost. The hack and accompanying software presented below works fine for the Force Trainer as well, but you’ll end up with less data since the EEG power values are disabled in the Force Trainer’s firmware from the factory.
Of course, the Mind Flex is supposed to be a black-box toy, not an officially supported development platform — so in order to access the actual sensor data for use in other contexts, we’ll need to make some hardware modifications and write some software to help things along. Here’s how.
But first, the inevitable caveat: Use extreme caution when working with any kind of voltage around your brain, particularly when wall power is involved. The risks are small, but to be on the safe side you should only plug the Arduino + Mind Flex combo into a laptop running on batteries alone. (My thanks to Viadd for pointing out this risk in the comments.) Also, performing the modifications outlined below means that you’ll void your warranty. If you make a mistake you could damage the unit beyond repair. The modifications aren’t easily reversible, and they may interfere with the toy’s original ball-levitating functionality.
However, I’ve confirmed that when the hack is executed properly, the toy will continue to function — and perhaps more interestingly, you can skim data from the NeuroSky chip without interfering with gameplay. In this way, we’ve confirmed that the status lights and ball-levitating fan in the Mind Flex are simply mapped to the “Attention” value coming out of the NeuroSky chip.
 data by eric micca
Read More

Mindflex Duel Arduino Hack

Posted by rinson
Howdy Folks,

I know there's a wealth of information on how to hack the Mindflex and Force Trainer game headset to access the EEG data they send out, so I am going to keep this brief, and try to make two points.  If you are familiar with Arduino and soldering, this is a very easy hack.

First, I had not seen anyone using the Mindflex duel headsets that came out last year, and I just want to let everyone know that while the Mindflex duel and original Mindflex headsets look different on the outside, they are the same on the inside.  I mention this because you can get the Mindflex duel game that comes with two headsets for less than the original Minflex game with one headset on Amazon these days.  I was able to get the Minflex duel game& the arduino for less than $50 on ebay

Read More