Improved Alarm Reliability

When Benjamin had his seizure a couple of weeks ago I was surprised that OpenSeizureDetector re-set for a while after alarming – I had expected it to stay in alarm continuously until the shaking movements stopped.   I think that this was because he fell backwards and the algorithm saw that as a lot of movement outside of the shaking frequency range, so said it was ok.   This is not what I want to happen……

I have adjusted the algorithm slightly so that the system is in an ‘ALARM’ state in one analysis period, but the alarm thresholds are not met in the next one, it goes back to ‘WARNING’ rather than ‘OK’.   This means that if the next analysis period satisfies the alarm thresholds again it will go back to full ALARM.

In practice this means that the system will make beeping noises throughout rather than going quiet for 10 seconds or so.

I have put a video on the Facebook page.

This change is not as well tested as things that I usually publish, so I have not released another version of the Android App, but have made the watch app available here: DOWNLOAD Watch App V2.6.

To install,

  • access this post from the device running OpenSeizureDetector.
  • Click on the Download Link above (accept any warnings about downloading files).
  • When Download completes, open the file.  If given the option, select the Pebble app to open it.
  • Say Yes to the question about installing an external file.
  • The OpenSeizureDetector watch app should

Tonic Clonic Seizure Detected

Benjamin had a tonic-clonic seizure this morning, so I thought it would be useful to describe how OpenSeizureDetector performed in detecting it.

What Happened

  • Benjamin sat up and contorted in an unusual way – head looking up and to the left.
  • Sandie saw this on his video monitor and recognised it as a fit and set off up the stairs to check him.
  • When she found him, Benjamin was lying on his back with arms shaking, but not out stiff (his elbows were bent).
  • It was not one of his worst tonic-clonic seizures – he was not paralysed after it, just needed to sleep it off for a few hours.
  • OpenSeizureDetector alarmed as expected.

OpenSeizureDetector Performance

    • Sandie spotted the seizure using the video monitor from Benjamin’s odd behaviour before OpenSeizureDetector did – this is because OpenSeizureDetector needs the shaking associated with a seizure to detect it, but Sandie spotted the odd movement before the shaking started.
    • The first OpenSeizureDetector warning sounded about the time Sandie reached his bedroom.
    • The warning re-set unepectedly.  I think this was Benjamin falling bakwards, resulting in  a lot of low frequency movement, which the detection algorithm assumes is not seizure-like movement..
    • About 30 seconds later the warning re-initiated followed by full alarm.
    • When the full alarm sounded, Benjamin was lying on his back with arms shaking, but not out stiff (elbows bent).
    • Two full alarm initiations occurred before the seizure detector re-set as the movement subsided.
  • The spectra of the alarm and warning conditions are shown below.
  • The initial warning occurred at a peak frequency of 7 Hz. The full alarm occurred with peak movement at around 4-6 Hz.
  • These spectra are consistent with the type of movement OpenSeizureDetector is set up to detect – an excess of movement in the 3 to 8 Hz range compared to the rest of the spectrum.

Issues

  • It is encouraging that OpenSeizureDetector detected a tonic-clonic seizure as expected – the spectrum is consistent with the movement the system is designed to detect.
  • The re-set when Benjamin fell backwards is not what I had expected to happen.   I think we need to add some hysteresis so we have to see a reset condition for a few analysis periods before resetting the alarm.   This will increase the false alarm rate though…..

New Release of OpenSeizureDetector

A new release of OpenSeizureDetector (V2.5.1) will be available on Google Play Store shortly.   I recommend all users upgrade to this version and enable the ‘Latch Alarms’ option in settings.

This release introduces better support for short duration seizures – enabling the ‘Latch Alarms’ option means that when the system goes into alarm the alarm will continue to sound for a given period before resetting, even if the alarm condition clears quickly.

We have been testing this with Benjamin for a few months following his last seizure that was on the limit of detectability so only raised an alarm briefly – with this feature it will sound for at least 10 seconds (or whatever the user specifies in the settings) irrespective of how quickly the alarm condition clears.

Custom Hardware Power Management

I have managed to get the ESP8266 board into MODEM_SLEEP mode if I use Espressif’s RTOS SDK instead of esp-open-rtos.  This is a shame because I liked the esp-open-rtos sdk build system, but I don’t have time to try to modify the SDK.

Using the Espressif SDK allows us to get the current consumption down to 25mA, which should give about 6 hours with the 150 mAh batteries I have in mind for the project – a bit too short still, so may need to use 2 bateries, or think of something else to make the board sleep more – but it is looking feasible which is promising.

See update here: http://www.openseizuredetector.org.uk/?p=975

Progress on Custom Hardware – 16 July 2017

We are making slow but steady progress with making a seizure detector that will run on low cost hardware.   We have all the software components for a workable seizure detector and just need to learn how to switch off the wifi radio to save power.   Then we need to re-commission the 3D printer so we can produce Laura’s case design to try it out.   Details at Custom Hardware Seizure Detector.

Initial model for 3d printed case

Beta Release of OpenSeizureDetector V2.5.1

I have just released a new Beta test release of OpenSeizureDetector on Google Play Store (V2.5.1).

The only change is an improvement to handling alarms from short duration seizures.   If a seizure is only detected for a short period, the previous version may only give a single set of Alarm beeps, which may be insufficient to alert a carer.

With the new version, if you enable “Latch Alarms” in the Alarms settings then when an alarm initiates, the alarm beeps will sound for the period specified in the “Latch Alarm Timer Duration” setting, even if the alarm resets quicker.

You can stop the alarm to silence the beeps earlier by pressing the Accept Alarm button.  This works both on the main OpenSeizureDetector app screen, and also if you are running it on another device using Network Datasource to provide alarm annunciation in a different part of the house.

This is as a result of the seizure Benjamin had last week, when we only got a single sent of alarm beeps.   This is fine if you are awake and alert, but if you are asleep it may not be enough to rouse you.   More details of this event on the Real Test of OpenSeizureDetector page.    A further update will follow fairly soon with an improved algorithm to detect seizures with lower frequency movement.

Update to Beta Version

I have just published an update to the Beta test version of OpenSeizureDetector (now V2.3.1).   This fixes two issues reported by testers:

  • The detection was much more sensitive than previous version, so the default Alarm Ratio Threshold setting has been increased to 50 (we use 56 for Benjamin because he is quite bouncy), so you may need a higher value, but I don’t want to make it too insensitive.
  • The auto-start on boot feature now works with the phone screen locked.

This release will be available to anyone who has registered as a beta tester here in the next couple of hours.

OpenSeizureDetector V2.0.8 Released

A quick bug-fix beta release (Thank you Damian for reporting it!) – if you have an incompatible version of the watch app installed it will now pop up a friendly-ish message asking you to upgrade the watch app, rather than crashing with an obscure error.

Available on for beta testing here:  https://play.google.com/apps/testing/uk.org.openseizuredetector

Sorry for the inconvenience again!

Problems with Pebble Classic

Please note that the OpenSeizureDetector set-up that I have for my son developed a problem today and the watch app stopped talking to the phone (so the phone just gives those annoying fault ‘pips’).   I do not know what has caused the problem, but I suspect that it is to do with an update to the Pebble software.
Therefore I would recommend that if you are given the option to upgrade the Pebble Software you do not upgrade it for the time being, until I work out what is wrong with mine and confirm that the upgrade will be ok for you.
Note that I have another system that is using a Pebble Time rather than the older Pebble Classic – the Pebble Time one is working ok, but my two Pebble Classics are not.