Close

CPAP Control Algorithm

A project log for Open Source CPAP Machine

A Open Source Approach to a CPAP machine to address the current issues of affordability and access

cdankocsikcdankocsik 01/07/2023 at 17:590 Comments

While I'm developing my own Brush-less DC motor driver board, I decided to additionally go out and purchase an existing motor and driver board so I can begin working on a control algorithm for things like ramp time for pressure setting and auto-pressure adjusting when a blockage has been detected.

I went and designed my own enclosed casing for the existing motor that I purchased from Ali express. This is by no means a final design, this is purely a test setup for developing the control algorithm while I'm developing my own driver board.

I currently Have a 12V and 24V versions of the motors and driver boards, I plan on making 2 versions for (one for each) for the final design just to be flexible and give people options. These boards utilize a 0 to 5V signal for setting the speed of the motor, which it currently uses a potentiometer for at the moment. I plan on using an Analog pin from my esp32 ( Using a level shifter to get to 5v) for controlling the speed. Once I get my sensor working I want to make a basic PID algorithm to allow from ramp times for pressure setting then from there start working on the software for detecting blockages and such.


Im currently running into some difficulties with the pressure sensor, I was trying out analog gauge pressure transducers at first though there so finicky and im not getting good results so I'm going to switch to a differential once in the next upcoming week so stay tuned for updates on that.

24V Motor Driver Board
Test setup for Control Algrothim testing
CPAP motor bottom enclosure
CPAP 12V Motor controller Board
Custom Made 12 and 24V Lithium ION packs made from recycled 18650 cells
CPAP Full Motor Enclosure

Discussions