Epilepsy Seizure Detection System

Posted on
  • Hi all,

    I'm new to the world of hacking with electronics and I am looking for some guidance.

    My sister suffers from epilepsia and I'm looking for ways of monitoring for seizures. The symptoms can range from strong muscle contraction to uncontrolled movement of limbs. I'm keen to try Muscle Electromyography to detect seizures. Basically it means I'll be continuously monitoring for spikes in the electric signal. I'm not sure yet if there is a need for something more sophisticated like a fast fourier transform but I'll deal with that later if the need arises.

    I was planning to hookup the EMG detector as described by James Cannan in his hackaday article to an Espruino Wifi and send the signal to a RapberryPi for analysis and raising the alarm is necessary. Three questions:

    1. Will the battery of the Espruino WiFi last a full night (~12 hr) when it is sampling at 1000 Hz and send data to the RaspberyyPi in real time? Let's assume we using a 16 bit integer, which means 16 * 1,000 = 16kb/sec transfer rate
    2. The alternative is to do the analysis on the Espruino and only send a WiFi signal to the RP when an alarm needs to be raised. Is there sufficient memory and CPU power on the Espruino to do this?
    3. If you don't think the Esperuino WiFi is up to the task is there anything else you can recommend. It has to be small enough to wear on the writs or upper arm.

    Many thanks for any suggestions!!

    Al

  • Hi, There are actually some quite polished EMG sensors if you need them, like this one: https://www.adafruit.com/product/2699

    But to answer your questions:

    1. It totally depends on the size of the battery. A reasonably sized cell phone battery might be 2500mAh I think, and with Espruino itself running a lot of the time grabbing 1kHz data you'd be looking at maximum 30mA. So from that point of view it's 30 hours - however I'm not really sure on the power usage when sending over WiFi.

    I think it's save to say that with a 3 x 3 x 1 inch battery pack you'd be totally safe though, and you could probably get away with a lot less.

    1. Yes, you could definitely do some analysis. The JS code isn't very fast for ploughing though data, but there are things like built-in FFT, so you could run the data through that and pick out potential frequencies of interest very easily. There's also compiled JS code or the ability to just write some C code if you had to do some very heavy analysis.

    2. I think the WiFi would be fine - the other option is something like Puck.js. If you could cut down on the amount of data sent (for example doing an FFT and sending only some parts of it) then it could be a definitely option and is much smaller. It's very likely that one battery would last you well over a night - although it depends on how much power the EMG draws

  • Thanks Gordon!

    I read on this site that Espruino Wifi can not access the WiFi module directly.

    Espruino WiFi's module is designed to work similarly to the ESP8266 native WiFi module, however you can't use the WiFi module directly. Eventually you will, however this is still in development.

    Does this mean I can't hook it up directly to a Raspberry Pi yet? Sorry I'm completely new developing hardware.

    Thanks for the suggestion of the EMG sensors. I have seen those before but they look a bit bulky. If I don't have much success I might have to go that way. I'm more looking for something like this https://www.coolcomponents.co.uk/en/emg-­detector.html where the cables give more freedom where to place the board.

  • I need to reword that, it's a bit confusing. Basically, on some devices there's a code library called WiFi that you use to initialise WiFi. On Espruino WiFi the library is called EspruinoWiFi. It's used in a very similar way, but isn't 100% identical (but the plan is to eventually make it the same).

    For what you're doing you'll never notice any issues. It'll communicate with a Pi just fine over WiFi.

  • That is great - thanks!

  • Hey, @al! I've been following, and love this thoughtful project.

    True that the cables give more freedom on where to place the board, in the Seeed Studio / CoolComponents EMG sensor. However, I'd also read the excellent tech notes/datasheets on both:

    Note that the MyoWare device has some good recommendations on placement of electrodes that should also apply to the Seeed Studio device. Additionally, the MyoWare device has an on-board gain potentiometer – Seeed Studio's does not.

  • @al I realise this topic is quite old and your circumstances may have changed over that time, however you may be interested in this related topic:

    http://forum.espruino.com/conversations/­351912/

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Epilepsy Seizure Detection System

Posted by Avatar for al @al

Actions