One of the main functionalities of the CPAP machine will be to control a Brushless DC motor as they are able to generate high amounts of torque necessary to create the desired air pressures for the treatment. To address this I am making a motor driver board which will additionally be open source as well. I currently have the phase diagrams mapped out indicating the position of the shaft at a given position and a basic 3 Phase motor driver working as well. (Note this setup utilizes Hall effect sensors for indicating the shaft position and not back EMF, though in the future I plan on making one for that type of setup as well)
Now all that's left is to synchronize the two so the motor can know when to activate the proper coils at the proper times and additionally allow our control algorithm once its developed to control the machine's air pressure.
I'm currently utilizing the ESP32 for hardware control and utilizing the Project IO dev environment in visual studio code for doing all my software development. All the code is still completely usable in the Arduino IDE if that's your preference though the necessary libraries will need to be added.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.