In the past 9 years (2008-2016) in Israel only there were 381 cases of children who were forgotten in a car, from which 19 cases ended in death (
This can be easily prevented by alerting the driver of a forgotten child in the rear seat, exactly here Child Reminder enters the game.
Detecting sitting child:
Decided by reading the voltage of the pin connected to the sensor (DIO23) - child is sitting if above 0.5V.
The reading is executed by using the ADC of the CC2650 (every 2 seconds):
AUXWUCClockEnable - Enable clock for ADC digital and analog interface.
AUXADCSelectInput - Connect AUX IO7 (DIO23) as analog input.
AUXADCEnableSync - Set up the ADC (AUXADCDisable - to disable).
Power_setConstraint - Disallow STANDBY mode while using the ADC (Power_releaseConstraint to allow again).
AUXADCGenManualTrigger - Trigger ADC sampling.
AUXADCReadFifo - Pop sample from FIFO.
HWREGBITW(AUX_EVCTL_BASE + AUX_EVCTL_O_EVTOMCUFLAGSCLR, AUX_EVCTL_EVTOMCUFLAGSCLR_ADC_IRQ_BITN) = 1 - Clear ADC_IRQ flag.
Sending the information:
Using bluetooth - only through advertisment (without full connection) (GAPRole_SetParameter(GAPROLE_ADVERT_DATA, sizeof(advertData), advertData)).
Advertisment interval is 2 seconds - 1 second of advertismenting and 1 second of waiting.
Starts at boot time (BroadcastReceiver listens to android.intent.action.BOOT_COMPLETED).
Operates as background service (extends IntentService).
Scan near bluetooth devices (BluetoothLeScanner) every 20 seconds (AlarmManager which calls the service) to detect the device and get the information.
Alerts the user with notification and sound when child was forgotten in two cases:
Lost connection with the device after detecting a child in the seat.
Rssi becomes lower then -90 after detecting a child in the seat.
Simple UI with updated information from the ChildRemider device: