Seizure monitor for smart watch?

Posted on
  • Many people suffer from Epilepsy and are at risk of sudden death. While there are a few commercial products available for smart watches to notify contact(s) if the wearer has a tonic clonic seizure, they are closed apps, limited to their hardware and usually are subscription services with most carers having to foot the ongoing expenses.

    Any developers who know anyone with epilepsy and or social empathy up to bringing forth a project please?

    At it's most basic I would think the sensors in the watch could sense repetitive unusual arm movements and heart rate change that trigger a connection to their mobile phone with an optional notification alarm sound and sends an SMS to their carer(s) with GPS location of the affected.

  • I have found an open source one for Pebble (seems like old hardware) and Garmin; perhaps the software could be ported over or at least used as a base to find required parameters and options:
    https://github.com/OpenSeizureDetector

  • This sounds like a great idea. I don't personally know of anyone but it's definitely something that could be done - you would probably likely need a phone app to ensure that the watch could actually contact the carers though.

  • Thanks @Gordon

    From looking at GitHub
    http://microco.sm/out/Hvvgi
    the Android phone app part is done, just the watch code requires porting as there are separate reps for the Android app, Pebble watch and Garmin device.

    Hopefully someone with the skills might pick this up as it would certainly help the community and families affected by epilepsy.

    Around 50 million people worldwide have epilepsy, making it one of the most common neurological diseases globally. Source: WHO website

    A cheaper phone app would probably also useful for those prone to non epileptic seizures, elderly that are prone to falls, fainting etc.

  • I'll contact the maintainer and see if there's any way to help out - looks like he has something for PineTime already.

  • This sounds like a great idea, thank you for getting in touch, Gordon.

    I think the documentation in the Github repository is a bit sparse - most description of OpenSeizureDetector is at http://openseizuredetector.org.uk - look at the Garmin Seizure Detector part to see what it does.

    If I modify the Android App to receive BLE data directly we should be able to make it work with other devices, which would be great - I'll look into how to do that now.
    If anyone is interested what we have looked at for seizure detection, the slides of a talk I gave today are now here: https://github.com/OpenSeizureDetector/P­resentations
    Thanks
    Graham.

  • Brilliant! Thank you @Gordon and @Graham_Jones

    Wishing this project all the success it deserves for an outcome that may bring some level of relief for so many families affected.

  • Wow, just browsing through your repositories on GitHub, what a great job!

    OpenSeizureDetector could get a great BangleJS App or Widget, easy to load via App Loader

  • I was thinking of some possible additional optional features:

    • some people (approx 20%) who have seizures have prewarning with signs such as aura, etc - not sure if heart rate is one of the prewarning signs but it might be:
      perhaps an option to capture heart beat data for some period of time in a rolling log, eg. last 5 minutes prior to seizure to compare to heart beat data immediately prior to seizure with aim to see if change of heart rhythm can be used to warn of oncoming seizure to allow sufferer to get themselves to a safe area, lay down and inform others in the area
    • can watch play a prerecorded audio message during seizure with words for example of 'seizure occuring, please protect my head, do not restrain me, lay me on my side, phone ambulance, reassure me when I regain consciousness'? Would be useful for bystanders who have never witnessed a seizure/think the person is on drugs/drunk
    • medical staff always ask how long did the seizure last; carers, at least for the first few seizures are unlikely to time a seizure, or there might be no-one to witness the seizure. App could time the convulsions.
    • Sudden Unexpected Death in Epilepsy (SUDEP). Most, but not all, cases of SUDEP occur during or immediately after a seizure. Possible factors are breathing and heart rhythm or combination of the two.
      Breathing: A seizure may cause a person to have pauses in breathing (apnea). If these pauses last too long, they can reduce the oxygen in the blood to a life-threatening level. Many sports/smart watches can monitor blood oxygen levels. Watch could send the phone data and phone then raises alarm/Recording to play message saying 'Possible airway blockage, please check when safe, perform CPR etc.' along with optional message to carers phone.
      Heart rhythm: A seizure may cause a dangerous heart rhythm or cardiac arrest.
      Watch could send phone data and alarm/Recording to play message saying 'Check pulse, possible heart problems etc.'
      along with optional message to carers phone.
      In the unfortunate cases where a life might not be saved even with the features implemented, the data, if available, could show medical staff, carers and family more certainty as to the cause of death.

    @Graham_Jones I realise you started the project due to the needs of your son. Some of the features requested may not fit his current needs, they may fit more for adolescents and older when they become more independent - which is another level of worry for family carers when they venture out more.

    Potentially this project could be the first 'citizen medicine' equivalent of citizen science projects, especially if anonymous data is shared to help drive accuracy in seizure detection and combined with other data, perhaps for some, warning of potential forthcoming seizure.

  • Nice - could be an interesting idea...

    can watch play a prerecorded audio message

    It can, but not loudly enough to be useful. However it'd be tethered to a phone to call for help, and that definitely could do something

  • Thank you! Remember a lot of the things in my Github were failures though, but I had an interesting time trying to make them work!

  • some people (approx 20%) who have seizures have prewarning with signs such as aura, etc >- not sure if heart rate is one of the prewarning signs but it might be:
    perhaps an option to capture heart beat data for some period of time in a rolling log, eg. last > 5 minutes prior to seizure to compare to heart beat data immediately prior to seizure with
    aim to see if change of heart rhythm can be used to warn of oncoming seizure to allow
    sufferer to get themselves to a safe area, lay down and inform others in the area

    Yes, one of the OpenSeizureDetector users is very interested in the heart rate monitoring side - she thinks there is an increase in heart rate above the normal resting one before a seizure. Your idea of a change in rhythm is an interesting one which I hadn't thought of - would maybe need to measure heart rate variability to see if it was becoming more eratic?

    medical staff always ask how long did the seizure last; carers, at least for the first few
    seizures are unlikely to time a seizure, or there might be no-one to witness the seizure. App
    could time the convulsions.

    It is possible to extract this from the logged data, but I don't have a nice easy display of it, so that would be a good idea - maybe have the phone (or watch) display the time since the seizure started - that would be useful for people offering first aid because they should call an ambulance at 5 minutes if the seizure hasn't stopped.

    Good ideas, thanks!

  • Have added requests to the features list post above.

  • A brief update. I have modified my OpenSeizureDetector Android App to receive acceleration data over bluetooth, which is sent using the widget that @Gordon has written (thank you for doing that, and getting a watch to me so quickly so I can try it out).
    I convert the acceleration figures back into mili-g which is what my existing analysis works on.

    First results are promising - a gentle shake of the arm with the BangleJS watch on it gives a
    sensible looking acceleration spectrum, and my app generates "seizure detected" alarms as we would expect (screenshot of phone app below).
    There are a few things to add to get this to a working seizure detector:

    1. Check reliability - we need to make sure it copes ok with disconnection and reconnects automatically.
    2. Send Watch battery level every now and then (to get rid of the red 0% in the screenshot below).
    3. Send heart rate every few seconds as well as acceleration data.
    4. Have the watch receive the seizure detector status (OK / Warning / ALARM) to alert the user in case it is a false alarm.
    5. Have the watch respond to button presses to mute the alarm system if the user is doing something that he/she knows will cause a false alarm (like brushing teeth).

    Connection reliability is the most important thing to test though - will let you know how that goes...

    Thanks!

    Graham.

  • Thanks @Graham_Jones and @Gordon

    Looks very promising. Great collaboration.

  • This looks great! I think for the low-bandwidth stuff (battery level, sending alarms, etc) just using the existing BLE UART connection would probably work pretty well.

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

Seizure monitor for smart watch?

Posted by Avatar for TassieTiger @TassieTiger

Actions