What happens when the humidifier for your CPAP runs dry in the night? It isn't pleasant. Let's fix this.
The calibration for this will be pretty easy. Simply placing the empty humidifier reservoir on the base and hitting the calibrate button will measure the lowest weight of the design. This will be stored in non-volatile memory. The same will be done with the reservoir full.
When the mask is off the hanger, data recording will begin. A measurement will be taken approximately every 30 seconds. Once the first 10 measurements have been taking. A moving average calculation will be make with every new measurement. If this moving average value represents only 10-20% of the water left, the alarm will trigger.
Hitting the alarm acknowledge button will cause the device to wait 5 minutes and being taking measurements again. Hanging up the mask on the hanger will put the device back into inactive mode. Either way, 10 measurements will always be taken before moving average calculation begins.
And here is a block diagram just for fun.
As a CPAP machine is a totally enclosed and airtight device, the best way to monitor the water level (I believe) is to monitor the weight of the entire machine over time. By knowing the weight of the machine with no water and with full water, I can have an alarm go off when the water level is say 10% of the difference between the max and min.
Components of the idea:
- a flat box housing all components including the load sensor
2. Calibration Buttons
- two small buttons would be on the back of the base. One is to be pressed to get a measurement of the CPAP machine with no water. The other would be pressed to get a measurement of the CPAP with full water. These values would be stored in non-volatile EEPROM.
- used for waking the user up when water is low
4. Alarm Acknowledge Button
- a larger button the user can press to reset the measurement routine and stop the alarm
5. Hanger (with Tactile Button)
- this is a custom made hanger with a tactile button that will be activated when the mask strap is hanging on it. This will tell the micro to not bother with any measurements. This ensures that while the mask is not being used, no measurements will be made (and therefore no false positives on the alarm).
Next project log will cover the logic behind how it will work.