Blog Home

Designing a low-cost, open source ventilator with Arduino

Arduino TeamMarch 17th, 2020

Desperate times call for desperate measures, and while making your own medical equipment isn’t normally advisable, Johnny Lee’e project explores how to turn a CPAP machine into a ventilator.

The idea is that since these machines are basically just blowers controlled by a brushless DC motor, an Arduino Nano equipped with an electonic speed controller could allow it to act as a one.

Such a setup has been shown to provide more than enough pressure for a ventilator used on COVID-19 patients. This device has in no way been evaluated or approved for medical use, but it does provide a starting point for experimentation.

You can find additional details, including an air filtration system, on Lee’s GitHub page.

Boards:Nano

16 Responses to “Designing a low-cost, open source ventilator with Arduino”

  1. JoshuaPK Says:

    This is an absolutely admirable effort! Having said that: as someone who considers himself very well versed in electronics, and who has had far more experience with medical devices (and ventilators!) than any 40-something should, I say the following.

    There’s exactly one outcome in which this would be useful. If the situation in the US gets to be as bad as Italy where there are 10 patients for every 1 ventilator, and a patient is willing to go home against medical advice, and the patient or a family member can build this- they are golden, provided the patient isn’t killed by the device. (There are several different kinds of hacked-together medical devices where the situation is basically, “Doctor says I need this $5,000 device or I will die, and insurance won’t pay for it, but I can build it, so I do, and I surprise the doctor by going to the next visit alive”. Insulin pumps come to mind. People hack together their own insulin pumps all the time.)

    It will be interesting, if we really do get to the point where there’s 10 patients for every 1 ventilator, if hospitals are willing to use devices that are hacked together by people of questionable backgrounds, that the FDA would never approve in a million years.

    Several years ago I actually did have a family member on a home ventilator. Those ventilators have a ton of safeguards and feedback loops that are tightly calibrated. The settings must be prescribed by a pulmonologist and locked in by a certified respiratory technician. These settings include the amount of pressure applied during inhalation (and that pressure curve), the amount of negative pressure applied during exhalation, the amount of time that is held between inhalation and exhalation, etc, etc, etc. Patients that need ventilators are generally much more sensitive to these kinds of things, and a wrong setting absolutely WILL kill the patient.

  2. BlinksTale Says:

    JoshuaPK, can you give some advice on better actions than hacked together devices that risk life or death with the wrong pressure? I’m sure there are a lot of talented engineers out there looking for ways to help fight back, and it sounds like access to ventilators is the biggest risk right now. If there was a guide that took a decent Arduino hobbyist 80hrs to make a ventilator with, I imagine healthy people quarantined at home would actually step up to help production. I don’t doubt there’s a long list of reasons that’s not feasible, but I know a lot of people want to help.

  3. JoshuaPK Says:

    BlinksTale, here’s something to think about. There are folks who are working on designing this thing. They should continue this work, and it would be GREAT if somebody could come up with a step-by-step document that hobbyists could use to build one.

    At the same time, we HAVE to figure out how to get doctors on board. When someone is put on a ventilator, it usually works like this:

    1. A pulmonologist consults X-Rays, breathing tests, the patient’s anatomy, and comes up with a set of specifications. These are the things I noted above (Pressure curve for inhale/exhale, volume, speed, etc.)

    2. A licensed respiratory technician takes these specifications and configures the ventilator appropriately. The RT then monitors the patient closely to ensure that the ventilator is having the desired effect.

    Step 1 is the sticking point. As I noted above, people have hacked together all sorts of medical devices like insulin pumps, EKG machines, etc. and figured out the right settings for those devices for their case. But for a ventilator setup, there are so many parameters to figure out for an individual patient- parameters that, if done incorrectly, can kill the patient. This determination of parameters absolutely, positively, CANNOT be done by someone who is not a pulmonologist.

    If your grandma is one of 100 patients in a particular hospital, and they only have 10 ventilators… and you build this thing, and you go to her doctor and say, hey, can you help me figure this out? If you have an “understanding” doctor, he MIGHT say something like, “Well, I’ll figure this out, and I’ll print it out… and you know, my pockets are so full that sometimes printouts fall onto the floor, if you catch my drift.” Then he’ll toss some notes onto the floor and walk away. The liability is yours if you pick those notes up and decide what to do because, according to the official record, he did not give you anything.

    You will be very hard pressed to find any doctor who will go on-record and give you the information you need to not kill your grandma. If they gave you that information, then they could be sued for malpractice, or worse, lose their license.

    Having said that… suppose you did pick up that doctor’s discarded note, you dialed in your hack-a-ventilator, you put it on grandma, and she’s showing signs of improvement. In that case the hospital is unlikely to remove that life support, if it’s working.

    Keep in mind, however, that a ventilator does TWO things: a) It ensures that your lungs get enough oxygen to oygenate your blood, and b) It ensures that a sufficient amount of CO2 is removed from your blood and exhaled. You can have a SPO2 of 98% and still be very close to death because you’re not blowing off enough CO2. SPO2 is very easy to determine, they have little devices (that you can buy at any drugstore!) that clip on your finger. CO2, however, is very difficult to determine. They need to do a blood test called “blood gas test”. This is a very painful and invasive test involving digging around in your arm with a big needle to find an appropriate vein. So if you have grandma on this hack-a-ventilator and her O2 stats are greatly improving… are you going to be able to get the hospital to do a blood gas test?

    There are millions of things that can happen to doctors and hospitals that don’t “go by the book”. They could get sued (and probably lose); they could lose their licenses; they could have the federal government withhold Medicare and Medicaid funding; they could be fined by any one of a number of organizations. The question is- can we address these penalties in cases where “not going by the book” will result in a massive increase of lives saved?

  4. JoshuaPK Says:

    After some additional research I’m finding that neither a CPAP nor a BIPAP is sufficient to blow off CO2 (pCO2)- in fact, in some cases these devices will do more harm than good. So the question remains: in Covid-19 patients with severe respiratory distress, what is the failure mode- low SPO2 or high pCO2? For cases where it’s high pCO2, then these hack-a-ventilators will be useless. They will also be causing an artificial shortage of CPAP machines, so those who need CPAP might not be able to get them on time.

  5. mohamedalimani Says:

    good job

  6. ggbce Says:

    First,

    Thank you to share this beautiful project… Where basically Arduino is Open-Source goal to help everyone to make own things and create better and better world !

    In hope, this “demo” could be a inspiration for all people that will have the chance to work on fast path solutions requested by many countries. We can see in USA and Canada, the government search many “brains” to work on these kinds of solution to create artificals respirators. We can see many companies like GM, Ford and Chrysler that have infrastruture actually idle and can be converted to create some imoprtant parts for these “ventilators”. In combination of “open-source” like Arduino (including hardware and community), it just could be a very good helper to find a concrete solution !

    Personnaly, this project it’s a very good basic, very near of a real solution. But, Like some people wrote previously, an approbation from medical specialists and some tests should be necessary for using this ventilator. I don’t think this can cause damage to people in test environment.

    Please continue to share !

  7. fredjfrigo Says:

    I was just asked how to rapidly build a low cost emergency ventilator by someone from the research community. We’re looking for ideas like this… not necessarily something ready to submit for 510k approval. Thank you Johnny Lee for posting this.

  8. Juliano_Gatto Says:

    Thank you Jhonny Lee for trying to save lives. I will follow your work.

  9. Plucx Says:

    It have great promise and should be investigated more.

    Issues:

    Lack of machine for patient :Since a sick person has reduced flow capacity, and is near collapse, the effort of breathing must be taken over by the machine.

    Solution:

    Keep the regular machines for patients that require intubation and use lower capacity machines (ie: DIY ventilators) for patients that do not require intubator. Usually, a lot of patient are waiting for a ventilator while their condition degrade. We might be able to stabilize a lot of them by helping them stay with enough 0² reserve longer.

    Issue:

    As such, an ordinary Cpap will not suffice for the job and needs modification, to the point where the only component that will be kept is the air circulator, hose and mask, wich are not used in the case of intubation.

    Solution:

    By keeping the high ends machine for those who are still counscious and with a “viable” V0²max, we might be able to use lower pressure and ensure we compensate for their needs. Also, with lower pressure, mask can be used and they are easier to use and install in a makeshift environment than a regular breathing machine. Lower qualification personnel can be used to install and operate these.

    The air flow can be made stronger by changing the motor for a biger one or by using gears.
    The advantage of using gears is that the air flow can be reversed by default in the motion of the gear setup. A potentiometer can also be used to manage the frequency of rotation and then manage the breathing cycle time, making the whole thing a college grade project that is easy to manufacture.
    Gears can be printed readily or machined out of HDPE plastic quickly at low cost since the tool won’t see much wear.

    Issue:

    There is a risk of overpressure and “popping” the patient lung.

    Solution:

    The air pressure can be managed by a mechanical relief valve that will ensure that overpressure cannot go beyond the normal safety range. These exist readily as off the self and can be manufactured locally.
    In the worst case scenario or as a last resort if supply line cannot provide for the need in safety pressure valves, the pressure can be manage by unscrewing a bolt set into a plastic tube linked to the system, wich will let a variable amount of air escape and thus lower the pressure.

    Issues:
    Humidity is paramount in the treament of the air coming in and out of the lung. While a CPAP is used only for around 8hrs, a breathing machine is on constantly for weeks. A dry lung is not desirable and the replacement of water and the salubrity of the system must be garanted.

    Solution:
    A simple ultrasound or heat Humidifier could be used near the air intake of the system to ensure the control of the air in the circuit. A closed box could contain the humidifier and two or more breathing machine intake could feed from that box wich would also filter the air intake. Is no air humidifier are available, a plate warmer under a metal bowl could be used to ensure there is some humidity coming in the system. An enclosed box could provide a way to control air intake and thusm filtration.

  10. Daniel_Pool Says:

    Greetings to the community, first of all I would like to congratulate jhonny lee for his pragmatic and innovative approach to the issue, which turns out to be very complex.
    First of all I am a simple designer, therefore I do not have the necessary skills to contribute to the refinement of the product in the medical field, however I believe that the use of lateral thinking and the approach from different perspectives can only broaden the range of possible solutions to solve this problematic.
    I assume that this type of device could be used in less serious cases, where a non-perfect calibration does not have harmful consequences for the patient, moreover I believe that it could be applied transversely in other sectors, not necessarily connected to the covid-19 emergency; we have to keep in mind that the first health emergency in the world is linked to air pollution,therefore, a correct application of this system could buffer this problem in the most exposed sections of the world population, as well as help in carrying out tasks that expose to polluting agents, in the industrial, agricultural and other sectors. I will try to spread this idea as much as possible, to look for qualified people who can contribute to the creation of a device suitable for the required needs. Personally, this emergency made me think a lot about how many other issues we could face and try to solve thanks to multidisciplinarity and the common goal, social innovation. Thanks again to the community

    Daniele

  11. vasanth67 Says:

    hi, Good job Johnny lee this idea is very inspiration to me. but it’s very basic model and not seems to be fulfill the artificial respiration. i have been the experience to work with the ICU ventilators for the past three years. i saw the video. the arduino nano, yes it gives the positive pressure to the lungs for expanding the alveoli. it’s achieved at only the inspiration phase but lack of expiration phase and cycling for breath. Now a days Most of the ventilators are designed like feedback system which gets input from the patient and works according to the condition of the patient lungs. so that we can achieve to recover fastly the patient. if you expand your project little bit. you can achieve to design the low cost ventilator. only the four parameters are significant which are the control variables for any ventilators like pressure, Volume, flow and time. if possible program the arduino with those parameter. Mainly there are only sensors like pressure sensor and Flow sensor. if you required further details, let me know

  12. andresnv Says:

    If we had the opportunity to being present at Kitty Hawk, NC, on December 17, 1903, what would we say to Wilbur and Orville? You are crazy, a lot of people are going to die using this machine? Or would we we tell them to get some friends to work on metallurgy, chemistry, study silica… The difference is that we have seen ventilators, we know where we are going. We do not need a Formula One vehicle, we need something that can make the load more manageable.

    Johnny Lee, thank you. Keep it coming, we will share in kind.
    Now back to work. People are dying.

  13. dafyddclaud Says:

    Good afternoon,
    First of all well done Mr Lee for all of your gallant attempts in trying to design a simple low cost respirator..
    I am an electrical & a mechanical engineer, so I only understand the very basics of the functions of a hospital respirator.
    From what I have read of your work these are my concerns.
    1. Accurate air flow & pressure monitoring. Although you are setting the motor speed based on a certain air flow this does not really mimic the overall function of how humans & animals naturally breathe. I feel that you need to set & program the Arduino so that it monitors air intake flow & pressure. This could be done by just monitoring air pressure only!
    So – if the patient suddenly starts to inhale naturally, the motor must slows down, or if the patient stops breathing by a certain amount or percentage then the motor needs to speed up a little. But if the pressure increases by a certain amount over a certain threshold then alarm bells need to be sounded so that a doctor or a nurse comes running over very quickly.

    2. Your device seems to me to only function in one direction, it produces pressure only!
    So although you are supplying air under a certain pressure that is only half of the cycle of a human breath.
    You now need to exhale the lungs. So the way I feel this could be achieved is by fitting a valve so the valve shifts over to exhaust cycle, the motor still turns in the same direction, but it pulls air outwards from the lungs into a filter system.
    The motors ability to remove air from the patients lungs could be controlled through motor speed using a venturi or pitot effect.
    Therefore motor speed can be governed by air pressure only, this ought to control air flow too because the diameter of the pipe is a known size & is not a variable.
    This action ought to pull air out of the patients lungs in a controlled manner. But this time if the pressure between the patient & venturi or pitot tube increases by ” measuring vacuum” then the motor needs to slow down, but if the vacuum pressure drops under a certain threshold then the alarm must sound to warn the staff of an issue.

    I do hope that my humble notes are of benefit to you.
    keep safe
    Dafydd Claud Miggiano

  14. dafyddclaud Says:

    Good afternoon,
    I have been in deep thought with regards of your design & what seems to be happening world wide in relation to this horrible virus.

    After studying various breathing apparatus & medical journals it seems to me that we all need to be aware of various terminology.

    The system described by Mr Lee is not a ventilator!
    What the device built by Mr Lee is – is a pressurised mask!

    It seems that from what I have learned that people are put on a pressurised mask system if their situation is not earmarked as red alert.

    Medical staff can move patients on to a ventilator machine if the patient can no longer breath normally on their own.
    A ventilator will assist in simulating the human breathing action when the patient can no longer do so on their own.

    I do feel that this point needs to be clarified that there is a huge difference between a ventilator & a pressurised mask system.

    Yours truly
    Dafydd Claud Miggiano.

  15. ANP Says:

    Please give me code.
    Thanks

  16. clujan Says:

    jhonny lee,
    I admire your great effort and work to develop this prototype, I am studying your project and I would like to know if it is possible to manage the respiratory rate and the PEEP value with two potentiometers, how can I know the inspiration and expiration time in your code? I hope you can answer me and be able to help in my home. Greetings and keep going.

Leave a Reply

You must be logged in with your Arduino account to post a comment.