Software apps and online services
DYFAM (Don't you forget about me) is a low-cost solution to prevent unsupervised children casualties due to heatstroke.
From January, 1st 1998 to September, 1st 2017, 736 children have died in the USA alone after being left unsupervised in a car, 87% of them being 3 years old or younger (cfr. http://noheatstroke.org).
The reason for these casualties was heat exhaustion, and multiple fatalities or near misses are reported each summer all around the World due to tragically similar combinations of events. The most frequent cause appears to be the parents simply forgetting about a toddler in their car: psychologists tend to blame these episodes to bouts of a condition called Dissociative Amnesia. It is generally regarded as something that can happen to anyone.
Several automotive companies are working on new car models that implement functions to mitigate this issue; however, we believe that a reasonably low-cost solution is at hand for those parents who may not be able to afford the cutting-edge technology that comes with next generation vehicles.
Our goal is to save children, preventing deaths by heat exhaustion. Since we believe that children safety should not be a luxury nor a privilege, we want to reach this goal by designing and prototyping DYFAM, a reasonably priced (and open source) Arduino-based kit to turn any commercially available toddler car seat into an effective aid for the parents to prevent heatstroke, a tool to help children being left alone in a car for an excessive amount of time or under too harsh conditions.
DYFAM will detect and evaluate potentially hazardous scenarios based on multiple environmental measures. Whereas a situation is deemed dangerous (e.g., a toddler is left unsupervised for too long) an incremental warning system will come into play, alerting all the key actors in the safety process through SigFox messages: at first the supervisor will be warned, then if the hazardous situation is not resolved within a limited time a higher level alarm will be set off.
Our first version provides the following measures:
- Proximity of a selected Bluetooth device representing the designated driver and/or warden of the baby (provided through BLE coupling);
- Car movement (determined through properly filtered three-axis acceleration measures);
- Presence of a baby on top of the car seat (determined with a force sensor).
DYFAM is conceived as a plug-and-play device: no need to tinker with your car, no expensive or intricate installation procedures, and a configuration process that is almost as simple as coupling your smartphone with a Bluetooth speaker. Our list of future improvements comprehends a platform-independent app to enter details useful to provide aid to the baby in danger, as well as to bypass an inherent limit of our BLE dongle of choice, which doesn't allow to automatically connect to a coupled device after losing connection: since this is a critical feature to test our system (given the need to not only understand whether the driver has left an unsupervised child or not, but also to detect the return of the driver to the premises of the baby) we have for now delegated this task to a third party free application, nRF Connect.
Our entry for this contest represents a first prototype with basic functionalities. In particular, the incremental warning system is left unfinished: representing a critical step in the implementation, careful consideration are being made on how to achieve maximum reliability before considering live applications.
DYFAM relies at its core on a mixed Mealy-Moore state machine. Each state transition is triggered by quantized values obtained by an external data catcher. The machine itself is loosely based on the model described by Bruce Powel Douglass in his book “Design Patterns for Embedded Systems in C”.
The lack of specification for this kind of project lead us to a customizable design, in which the state machine implementation itself is provided as a library: those who wish to modify or improve the state transitions diagram, can simply import our library in their Arduino IDE and start from there. The implementation we have chosen is also suitable for a future integration in an RTOS system (such as freeRTOS, chibiOS, muTasker).
The core of this architecture is a timed macro loop: an event dispatcher posts in a queue the result of the acquisition and quantization of data gathered through the device sensors, then returns. Each state of our Machine consists of three sub-states: an enter state, an exit state and a nominal state. Enter and exit events are executed on each transition to a certain state and from a certain state: enter states are typically used to initialize local variables and start timers, whereas exit states stop timers and other underlying processes. A simple queue system allows for the synchronization between the main state machine and the measurement loop, and interrupts are disabled and enabled using the Arduino HAL. The main state machine engine manages the entering, exiting and looping conditions, and each state provides the transition to the next state.
The algorithms for movement detection, bluetooth presence and infant presence are stored in the DYFAM_main tab. These algorithms are the real core of our implementation: researching, implementing and extensively testing an effective algorithm is a time consuming and not trivial task. We provided a simple implementation to test the concept of the DYFAM system: more complex algorithms should (and will) be implemented for a production-proof version.
- Assemble your DYFAM prototype following the provided schematics;
- Download, unpack, compile and upload on your MKR FOX 1200 board the software zipped in the DYFAM_main_Release_1.17.0.zip archive;
- Register your MKR FOX 1200 board on www.sigfox.com, following the instructions provided by the vendor;
- Create on www.sigfox.com a callback to forward incoming messages to your email address of choice: this will be your warning that you might have left your baby unattended;
- Install on your smartphone the nRF Connect mobile app (or a similar bluetooth connection manager that allows for auto-connect features);
The DYFAM prototype should be installed in a car, and there is no need for complex installation procedures: the only strict requirement is for the device to be powered according to the MKR FOX 1200 specification, as well as for the FSR sensor to be positioned allowing a tiny passenger to sit on top of it while being on the car seat. After having placed the baby on the seat, power DYFAM on and couple your smartphone with the integrated BLE dongle, making sure to enable the auto-connect feature of your nRF Connect app. DYFAM will check that your passenger doesn't spend too long in the parked car while you are being away, and it will send a warning email to get your attention in case this happens.
That's it: now go for a ride, test how it works and help us improve!