Disclaimer :
This design is not a medical device and should never be used as such.
Medical ventilator are really complex devices, they follow strict process of certification and can be lethal if used improperly.
So, NEVER use this device to care a CODIV19 people… nor for anything else other than an illustration of complexity of these systems…
Please also note that, as mentioned here : https://github.com/jcl5m1/ventilator , There are significant risks associated with using a high pressure BiPAP as a DIY ventilator without medical supervision.
Although very similar to a BiPAP device, This device could only be considered as very low-cost Powered Air Purifying Respirator (PAPR) with filter adapter and mask.
I took most of my inspiration from this project : https://github.com/jcl5m1/ventilator, but went one step further in terms of automation and pressure monitoring.
If you want to know more about CPAP machines, read this set of minimal specifications : https://assets.publishing.service.g…ds/attachment_data/file/876593/RMCPAPS001.pdf
A decent CPAP machine should be able to control these parameters :
- CPAP: Continuous Positive Airway Pressure a non-invasive ventilation mode which provides a constant steady pressure to keep the lungs expanded
- PEEP: The pressure maintained in the breathing system during expiration
- cmH2O: centimeters of water pressure
- HMEF: Heat and Moisture Exchange Filter: device fitted to the patient end of the breathing system, contains hydrophobic medium that absorbs heat and moisture from the patients exhaled breath and uses absorbed moisture to humidify inhaled gases. Can also filter bacteria and viruses, this will be used on all patients. WARNING can affect delivered pressure.
- FiO2: Fraction of inspired oxygen: concentration of oxygen in the gas mixture the patient inhales.
Invasive CPAP machines are controlled in “volume” of air pushed into the lungs, here is the subset of the main specifications of these machines :
- Must maintain a nearly constant airway pressure of between 5–15 cmH2O, with the ability to adjust the pressure. This will require the RMCPAP to deliver gas flows which equal or exceed peak inspiratory flow rates in tachypnoeic patients.
- Must either alarm or be provided with an alternative suitable air system if the fresh gas supply fails which prevents significant rebreathing.
- If the RMCPAP entrains room air this must pass through a suitable filter
- Must have as low a resistance to expiration as possible and should have a flow rate through the PEEP valve which is largely independent of the PEEP level set.
- Must have a pressure safety release valve to protect the patient from high pressures, having a release pressure of no greater than 25 cmH2O. An over-pressure alarm should be provided where possible and should not necessarily be confined to an electrically powered RMCPAP.
What is my system doing :
- Control the volume of air pushed into the mask in a NON INVASIVE WAY…
- Use a professional dust mask equipped with an exhaust valve (needed to insure security of the system)
- Filter the air pushed into the mask
- Be able to follow the breathing rhythm and to “help” the user to breathe through the FFP2 or FFP3 filter cartridge. This means that air will be pushed when breathing and stopped during exhalation
- Automatically adapt to the wish of the user (plus or minus air volume)
- Is a safe system provided it is used with the indicated turbine and the indicated mask
What is my system not doing :
- Control the PEEP (no controllable exhaust valve on my mask)
- Control FiO2, temperature and humidity of gas
- No calibration provided
- Only 11cm of static pressure delivered by the turbine… so a very safe system but absolutely not useful as a medical device
- So all in all it is far away from a CPAP machine !
The design :
The system can be explained by the following functional breakdown
Air pressure is controlled by the speed of a blower. A differential pressure sensor measures in real time the volume and pressure of airflow and provides feedback to the controller to “close the loop”.
blower :
The blower is this one : Sannyo 9BMB12P2K01 .
It only has a static pressure of 12.8cm H2O (not enough for a CPAP NIV device, but enough for a good assistance for breathing through a mask).
The turbine is controlled by an “in runner brush-less motor” via a PWM signal at 25kHz
The mask :
I used a dust mask designed by Delta Plus : modèle M6400
One of the FFP3 cartridge was removed and placed on top of the turbine allowing to filter the air intake.
3D printed adapters were designed to allow the mask to be plugged on standard CPAP pipes (22mm diameter)
adapters on thingiverse and also here
All this insures a “no leakage” tubing between the turbine and the mask
As mentionned the mask is equiped with an exhaust valve (in orange on the picture). There is no way to tune the exhaust pressure !
Pressure sensors :
Sensor has a triple function :
- Measure air flow to allow control of the turbine speed
- Detect breathing rythm and follow it to pulse air into the mask
- Measure pressures in real time (PIP, Plateau and PEEP) and trace real time curves
Airflow measure is based on venturi‘s principle and follows Bernouilli‘s equations
A simple venturi has been 3D printed . Pressure beeing captured by two BME280 sensors.
BME280 are not differential sensors. They have a 1cm H2O absolute accuracy but have a better relative accuracy of 0.1cm.
So atmospheric pressure is measured on both sensors at startup and subtracted to real time measures. The difference between the two sensors is performed to reach the “differential mode”
Blower control
The venturi signal is proportional to the airflow and thus, after discrete integration, to the air volume.
This signal is fed into a PID which generates the PWM signal to control the blower.
Command (cosign) is a parameter selected by the user.
Software :
PID loop is embedded into the ESP32 micro controller firmware.
The board is powered by a simple smartphone charger. BME280 sensors are soldered to the board via 4 wires (I2C bus)
The blower needs a 12V power supply and drives 2 to 3A max.
The board is interfaced to a “quick and dirty” Android App written with the excellent opensource language / compiler B4A:
The App allows to activate the following modes :
- CPAP : a constant pressure is fed into the mask (the PID tries to keep this pressure constant)
- BiPAP : an air volume is pushed into the mask during inspiration, then the motor stops during expiration. The system is following the user’s breath
- Spirometer (experimental measure of tidal volume during inspiration and expiration) : goodies of application !
monitoring is done both on the app and on the serial port of the ESP32 via the USB port
The board works without the PC or the phone
Automatic reconnection to the Bluetooth is done as soon as the App is launched (Bluetooth Low Energy stack)
First results :
System has been tested on my own lungs without damage !
I insist that this blower gives a max static pressure of 11.5 cm H2O (measured) so together with the exhaust valve of the mask everything is safe !
Here is the curve captured into the BIPAP mode. We can recognize the various parameters of a normal respiration (in blue) and see (in red) the pulses on the motor (the height being proportional to the command magnitude)
And finally if you read all this long explanation then you can have a look at this video which is only a screen capture with sound of the app.
I put the microphone close to the blower, the mask on my head and took several breaths at various frequencies to demonstrate the breathing control on the machine !
video here switch sound ON to listen the machine:
Finally I must say that this system provides a really effortless way to wear a mask.
There is no effort to breathe, no moisture accumulated into the mask. And the positive pressure applied into the mask gives to the user a perfect clean fresh and filtered tidal volume of air !
Originally posted in the forum: https://www.b4x.com/android/forum/threads/experimental-powered-air-purifying-respirator.116659/