Hacking a $35 ECG nRF52 Fitness Tracker into EEG

Back to overview

nRF52832 ECG fitness tracker hacked into EEG glasses using Arduino code + detect concentration/relaxation with neural network web app


Gabriel D'Espindula wrote 09/17/2018 at 06:35 point

Great work man! I'll just order this hardware today! I've done some custom PCB using the 8 channels ADS1298 but its a quite expansive IC. Want to do some experiments using this cheaper option. By the way, I was taking a look at the datasheet, and saw you have two differential channels, right?
You said it uses the RLD as your reference electrode. It means you could get up to 3 more channels, being two of them a reference and two as positive inputs, right?

Could you track the circuit of this electrodes configuration? I'm wondering to use more than a single channel, but not sure if will need to make major modifications in the hardware. If they designed on all negative inputs grounded you still could get two channels. But if they used one of the channels as reference instead of an actual RLD it would be bad for my design.

  Are you sure? yes | no

Curt White wrote 09/18/2018 at 23:21 point

No, RLD is used for reference so you won't have to worry about that. I did contemplate trying to break out the second channel on the ADS1292. My priority was to get frequency domain signal processing working on the device itself (on the nRF52 MCU). Just processing one channel required a lot of compromises, two channels would be a nonstarter as far as I can tell. If you are processing the data elsewhere (like most people) the computational overhead makes no difference and the more channels the merrier. You'll have to cut PCB traces and solder directly to the pins on the ADS1292. Tricky, but doable. Let me know if you take a crack at it, it sounds interesting. 

  Are you sure? yes | no

Gabriel D'Espindula wrote 09/19/2018 at 03:02 point

Great to know! I'm waiting for shipping right now. I'll definitely give a try and let you know. I believe I'll also try to migrate the firmware IDE to keil, my goal is to install a RTOS and use CMSIS libraries to do the filtering, I've never tried those libraries yet and seems to be pretty fast, considering they were designed by ARM itself. As soon as I have some progress let you know!

  Are you sure? yes | no

Curt White wrote 08/26/2018 at 22:30 point

Of course. Serial works the same on the nRF5x Arduino Core as it would on an actual Arduino. All the code example for this project (EEG/ECG) use serial debugging so you can use that as a guide.

ID107 (nRF51822) or ID107Plus (nRF52832)? I'll assume the first but it doesn't really make a difference. The key thing is the variant.h file. Here is a link to the ID107 variant file in the main project repo:

Look at these lines in the code:

// Serial

#define PIN_SERIAL_RX (17)

#define PIN_SERIAL_TX (18)

you need to make sure the Serial TX definition matches up with whatever GPIO on the nRF52822 you've decided to use for sending over serial.

  Are you sure? yes | no

Chinna wrote 08/26/2018 at 22:06 point

Hi Curt, great work. Do you have a an example code with Ble serial to run on ID107HR fitness tracker. 

  Are you sure? yes | no