Close

Processing the Data

A project log for CPAP Water Reservoir Monitor - Sleep Apnea

What happens when the humidifier for your CPAP runs dry in the night? It isn't pleasant. Let's fix this.

Scott ClandininScott Clandinin 04/29/2017 at 16:290 Comments

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.

Discussions