SmartPhoneBCI
A BCI under £20 that can be used with your phone
Team
The People behind the project.
See Them
Project Overview
Powered by NeuroTech
X
Motivation
The project was born with the idea of designing a workshop for participants to build their own 2 electrode EEG reader and connect it to a phone at EMF camp for around £20.
The first draft of what we aimed to have was:
What we have
We have managed to design a circuit that reads a bipolar EEG signal and sends it to a smartphone (Just an android at the moment) which reads signal and shows some info, not real BCI yet... but we're working on it!
EEG signals are very difficult to work with as they are very noisy and of low amplitude. Also, the interesting bits live in the range of around 4Hz to 32Hz (depending of what you want to do with them) and the smartphone sound card will ignore everything below 20Hz, which complicates the thing a bit more.
What our circuit does in a nutshell is:
- Amplifies the signal that comes from the electrodes so we work with it
- Modulates the acquired signal using amplitude modulation and sends it to a smartphone via the jack bypassing the frequency restriction of 20Hz
In order to have more details of the circuit visit the hardware repo. We have made publicly available the circuit design and the PCB for your enjoyment.
The circuit needs to be paired with an app or driver (or programme as it can ported to "perfectly" run in computer). This app needs to send the carrier signal that piggybacks the EEG signal and then perform a frequency analysis so we can extract the features of the original EEG signal. There is an example of an android app that does this whole process in the software repo .
The app is under heavy development and right now just offers:
- Has the SmartPhoneBCI driver functionality
- Shows the frequency analysis of the EEG signal
- Shows how the alpha band power fluctuates over time
- Shows a broader frequency analysis that can used as a sanity check for the hardware
The code needs to undergo some refactoring and implement some more cool functionality.
Ryan Lintott is working on a Unity-based SSVEP app that hopefully will work in all supported platforms (namely iOS, Android, Windows, OSX and Linux).
Kit v0.1
Each v0.1 kit should contain:
- 1x PCB
- 1x 9V battery
- 1x croc clip (for SHLD)
- 1x jumper wire (for SHLD)
- 1x 1m 3.5mm male-to-male audio cable (to attach phone to PCB)
- 3x electrodes (for A, B, COM)
- 2x alcohol swabs (to clean skin, electrodes following use)
- 1x resealable bag (to store Ten20 conductive gel)
- 1x bathing cap (separately)
- kitchen foil (separately; to SHLD electrodes)
Please check your kit before assembly/use. You'll need a knife to cut the electrodes and a small flat head screw driver to connect these cables ...
Assembly
- Check if your kit is complete :)
- Braid/twist the three electrodes to reduce independant interference. Leave 20cms at the electrode end to allow flexible placement.
- Cut the three electrodes at the connector (not at the electrode) to a length that allows you to hold your PCB and phone comfortably while having the electrodes connected to your head
- Strip the clipped ends
- Tightly wrap the braided part of the electrodes in tin foil to further reduce signal interference
- Attach the croc clip to the tin foil
- Attach the jumper wire to the croc clip and the SHLD terminal on the PCB
- Connect the electrodes to the screw terminal:
- A 1st electrode to scalp
- B 2nd electrode to scalp (order unimportant)
- COM ground to ear lobe or mastoid (if measuring from back) or middle of forehead (if from front)
- Ensure your phone is not connected to mains (aka charging)
- 3.5mm Audio Cable into the audio jack of both PCB and Phone
- NB. Audio Cable can be temperamental - you might have to check with a pair of speakers
- Connect the battery
- Your hardware is now assembled \o/
APK
Ok, so far this is for Android only.
There's an APK for download somewhere, I'm sure of it.
Propably a good idea to check the github repo
Sanity Check
After assembling the hardware, install the APK and connect the kit to do a sanity check:
- Install the app on the phone
- Connect the battery to the circuit
- Ensure that the phone is NOT connected to the mains
- Connect the jack from the circuit to the phone
- Open the app
- Press "Play"
- If needed (aka App crashes on pressing play, potentially Android 6), you need to grant permission the the app to access the microphone in settings/apps/smartphone-bci
- Slide until you get to a graph called 'sanity check'
- Do not hold the circuit with your hands, as your body acts as ground
- You should see two peaks in the graph; one around 0-1 Hz (carrier signal), one around 50Hz (mains)
Experiments
Placing the electrodes using the 10-20 system:
- Use alcohol to swab the area where the electrodes will be placed.
- Fill the electrode cup with conductive gel before placement and clean them after the experiments to prevent corrosion
- If measuring from o1 and o2, place COM electrode on ear or side of neck
- If measuring from fp1 and fp2, COM can be placed on the center of the forehead
Experiments with the completed kit:
- the Android app's "sanity check" to detect the 1kHz carrier signal and 50Hz mains
- the Frist plot titled "Spectrum" might show changes when winks, blinks, jaw movements are performed
- alpha waves (7.5 - 12.5 Hz) from o1 and o2 or (to a lesser extent) fp1 and fp2 when user's eyes are closed
- Swipe to the next graph: it displays the power of your alpha band over time.
This value corresponds to a moving average, so it may take some time to settle.
- mu waves (7.5-12.5 Hz, esp. 9-11Hz) from c3, c4 or even cz when user is completely immobile
In the near future !
- SSVEP: peaks at the frequency of an observed flashing stimulus from o1 and o2
- Experiment with placing the pcb on a table, holding it in your hand, etc. Where do you get the better signal?
The team is composed by an amazing and heavily heterogeneous group of people that have voluntarily contributed in many different ways. This project would not have been possible without input and help from all the fellow travellers on this journey so far. In no particular order, many thanks to:
- Graeme Hattan
- Jon Scott
- Nick Johnson
- Colin Rowat
- Tommy Drews
- Felix Drews
- Ryan Lintott
- Javier Asensio Cubero
- Jesus Manzanares Artolazabal
- Andrew Vladimirov
- Seb Wills
- Bob Kemp
- John Mitchell
- Marco Datola
- Bethel Osuagwu
- Frank Johnson
- Martin U.
Also, we've received more support anyone could hope for from NeuroTechX and their slack as well as the London Hackspace
This is a living project and we're still looking for people to contribute in whatever way they want to, join us in our NeurotechX slack channel #smartphone-bci or in our mailing list.