Share My Creation experimental Powered air purifying respirator

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 unproperly.
So, NEVER use this device to care a CODIV19 people… nor for anything else than an illustration of complexity of these systems…


Please also note that, as mentionned 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: centimetres 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 controled 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 a suitable air entrainment 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 professionnal dust mask equiped with an exhaust valve (needed to insure security of the system)
  • Filter the air pushed into the mask
  • Be able to follow the breathing rythm 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 controlable 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 controled 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 controler 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 controled by an "inrunner brushless 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 substracted to real time measures. The difference between the two sensors is performed to reach the "differential mode"



Blower control

The venturi signal is proportionnal 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 (consigne) is a parameter selected by the user.



software :

PID loop is embeded into the ESP32 micro controler 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 Basic4Android





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 proportionnal to the command magnitude)





And finally if you read all this long explaination 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 !
 
Last edited:

Cableguy

Expert
Licensed User
Longtime User
AWSOME!
 

freedom2000

Well-Known Member
Licensed User
Longtime User
Well I posted on the wrong thread... it's not a B4R app... Only a B4A

My mistake !
 

Cableguy

Expert
Licensed User
Longtime User
What's that lithe board you are using? (look something using an ESP12F?)
I'm asking because, I think you could achieve the same using either an ESP2866 or a mix of Arduino + ESP12F
 

freedom2000

Well-Known Member
Licensed User
Longtime User
What's that lithe board you are using? (look something using an ESP12F?)
I'm asking because, I think you could achieve the same using either an ESP2866 or a mix of Arduino + ESP12F

It's an ESP32 lolin 32 lite . I need it mainly to get the BLE interface with the phone, but also the dual cores to have a consistant real time loop @ 10ms
 

Cableguy

Expert
Licensed User
Longtime User
So coded in Arduino IDE or B4R?
 

freedom2000

Well-Known Member
Licensed User
Longtime User
Coded in Arduino IDE... I posted on the wrong thread.... If @Erel could move it into B4A it would be great !
thanks
 

Cableguy

Expert
Licensed User
Longtime User
I don't think that Absolutely necessary. But you could try to convert the Arduino code to B4R, then it would be a true B4X respirator!
 

imbault

Well-Known Member
Licensed User
Longtime User
Always impressive work, as usual with JP, always innovative...

JP, you are really a very smart guy!!

Bravo and Cheers

Your friend, Patrick
 

freedom2000

Well-Known Member
Licensed User
Longtime User
Amazing work! I will add it to the showcase page.
To be in the showcase is always an honor. ?

Thanks Erel and thanks before all for all the job you made with this great B4X Tools suite
JP
 
Last edited:

freedom2000

Well-Known Member
Licensed User
Longtime User
There are several ways to make your own mask...

Here is an exemple of 3D printed one that I modified to adapt air intakes from another great design. And an exhaust valve from my own...

Currently this mask has no "certification", it has been thermo formed on my face and so does not really need additionnal gasket (although it would be a plus)
As it is quite modular, I do believe that it could be simple to adapt a CPAP hose instead of one of the intakes...
However, be aware that it is 3D printed in PLA. I am not completly sure that this material doesn't leak at the microscopic level. So proper coating should be done as adviced in the original video (see description on the thingiverse page).



I also tested my system on this cheap medical face mask. It works !


But this one has its own drawbacks... some leakage at the exhaust valve level (green tabs on the picture)...

We all have to re invent something to hack this pandemy ...
 
Last edited:

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
Great work
This is a CPAP device; which is used primarily for patients with Obstructive Sleep Apnea "OSA", in which obese people suffering of narrowed airway inlet "Neck structures", especially when these patients sleep, these structures nearly close airway entrance, so they complaining of asleep state because they can't sleep smoothly, and suffering from suffocation.
This project is excellent, you can develop it in a commerical way "or charitable way as you like" & make your own CPAP device for a cheap price, The current CPAP devices are expensive.
And as you said @freedom2000 it is NOT medical ventilator.
I'm a doctor, also I'm suffering from OSA, unfortunately there is no CPAP device available here in my area.
Can I inspire your work for cloning it for my personal use ..
 

freedom2000

Well-Known Member
Licensed User
Longtime User

Yes it's in between a CPAP and an BiPAP machine (so far I understood... as I am not a doctor !)
BTW, I am glad to see that this system could be useful and furthermore when said by a real doctor.

For sure you can use it freely to clone it for your personal use. Breathing with it is really natural and easy
However to be totally honnest the sensors calibration is slightly drifting with time. It may occur that you need to push the "calibration" button while the turbine is stopped to reset the atmospheric pressure ! A real differential pressure sensor could be a better alternative.

I do like the idea of a DIY OSA CPAP system.
 

freedom2000

Well-Known Member
Licensed User
Longtime User
Well I modified the 3D printed mask to allow a CPAP hose adaptation. Here is the stl file :

And I tested it on my CPAP machine. Works like a charm, the exhaust valve does its job, you can breathe as safely as with the DeltaPlus Pro mask



So the mask is not a problem

For the hose ? A garden hose water pipe ?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…