MakAir: Covid-19 ventilator with a Raspberry Pi
blog.senx.io
blog.senx.io
(And as much as I hate the Pi's reliability, I'd still take that bet if it was indeed relying on a Pi).
Don't worry, the breathing system does not rely on the Rasberry at all.
We use an electronic board that was made on purpose by a Medical company and relies on STM32 hardware.
This board sends telemetry to the Rasberry PI and we have a Rust based interface that shows charts and some controls.
If the Raspberry fails, the Firmware still run fine, and you can still change the settings on the machine using physical buttons and a LCD screen that is directly connected to the firmware
I don't care that the hardware involved in your project was "made be a medical company", it's not hardened tech. Also, rust is by no means hardened - look into "provably complete" languages if you want to see what a true "hardened" lang is. There's a reason why medical devices and serious "hardened" tech (military or otherwise) is validated and cost tens if not hundreds of thousands of dollars. It's because teams of engineers spent weeks or years coming up with every possible problem or failure pattern.
To be frank, I'd rather pay a nurse $50k in cash to pump a vent bag next to me than rely on your "project".
> To be frank, I'd rather pay a nurse $50k in cash to pump a vent bag next to me than rely on your "project".
From what I've read (admittedly not much) -- this project isn't trying to disrupt the ventilator industry or make a bunch of sales. It isn't designed to give you a choice of a ventilator to remove a nurse. It's for situations when you don't have another choice... for when a hospital has run out of proper ventilators or there isn't a nurse available. This is not a first-choice device (even if it could be adapted to that in the future).
However, billions of people don't have the luxury of tested and verified medical devices. The price of a single machine might be close to the monthly budget of the entire hospital. In those cases, any small hacks are welcome if they can help save a patient's life. A crappy, half-decent ventilator is way better than no ventilator at all. Until rich countries start buying hospital devices for poor countries en masse, providing cheap alternatives to proper medical devices can save lives.
The company behind this seems to be French and if it ever gets used in France without certification then they've probably got a huge lawsuit and potential criminal liability on their hands.
According to the project's website, they are trying to comply with European medical regulation (if Google translate got that right) and their Github mentions they're working with regulators. This isn't a hobby project by a bunch of bored students, the project seems to be a proper attempt at making capable medical devices that can be extended upon without IP problems.
Problem with vent bag is that you cannot maintain a positive expiratory pressure (around 10mmHg of pressure during the expiration to prevent lung to collapse alveoli). For Covid-19, all the projects based on mechanized vent bag where useless because of the type of disease.
There are several companies behind the project. The company who makes the electronics is Tronico (https://www.tronico-alcen.com/en/markets/medical). It has all the medical certifications needed.
We are currently going on with ANSM certification (equivalent of US FDA). It is a long 2 years way, with lots of papers and tests... If it is approved, sure it can save life everywhere in the world. If it is not, it was a project where we learned a lot.
By the way, ambulance ventilators are harder to develop and to approve. Hardware must resist huge shocks and accelerations.
As said previously, the Rpi part and the software is not critical at all, it is here to fill a gap between the minimal UX and the expected UX. See https://news.ycombinator.com/item?id=25671617 and https://news.ycombinator.com/item?id=25671318.
It's worth noting that mostly regulatory approval is jurisdiction specific, so the device will need to be separately approved by a bunch of different bodies. ANSM is the french local body, but it is EU MDR you probably have to meet; this at least gets you the EU countries but for example will allow your device to be used in the USA, you would still need FDA there. Some jurisdictions, particularly smaller ones, will rubber stamp things if you have the right approvals but it's still finicky and of course with a physical device you have to deal with things like different power standards.
The approaches are similar but annoyingly different enough that this isn't easy. Luckily they are both reliant on ISO13485 at core, so there is overlap. It's not just paperwork either, you can definitely design something that will not pass in another jurisdiction if you aren't careful (e.g. due to materials used). Further, you need separate certification to a standard as both a manufacturer and developer, and these don't carry over automatically either.
People are working on making this easier to do worldwide, but it still isn't easy. For example you can use MDSAP to get a regulatory audit that meets multiple countries requirements at once.
Does anyone know if we managed to ramp up normal production or there was some other reason it stopped being an issue? Or maybe the issue didn't go away just the media coverage and they're still trying to use ad-hoc ventilators?
Also help your immune system before and after you get covid by taking Vitamin D, E, K, A, C and Magnesium (helps with D intake issues).
https://www.sciencedirect.com/science/article/pii/S096007602...
https://pmj.bmj.com/content/early/2020/11/12/postgradmedj-20...
Statins
https://health.ucsd.edu/news/releases/Pages/2020-09-23-stati...
Vitamin A
https://chrismasterjohnphd.com/covid-19/iga-antibodies-vitam...
More data is probably needed for A.
Aspirin
https://journals.lww.com/anesthesia-analgesia/Abstract/9000/...
Definitely need more data on the aspirin.
Vitamin D is pretty well backed up at this point.
The only plausible confounding factor is people behaving less responsibility in the belief that they are somehow safe. On a personal level, try not to do that.
Later on, it was requalified as a vascular disease, scientists looked at cytokines / interleukin (I AM A ELECTRONIC ENGINEER, please correct me doctors).
Now, there is some systematic treatments earlier (https://jamanetwork.com/journals/jama/fullarticle/2770275), so yes, far fewer patients needs an invasive ventilator.
And that is great.
There was a lot of bad advice coming from doctors in Europe, and also there was the idea if you had them on a vent, they were on a closed air system and couldn't spread COVID in the hospital. This was disastrous.
Doctors do not use them unless necessary today, but it's no doubt this is why many of the early death counts, especially among younger people, was so high in places with high vent use.
The majority conclusion I've seen in Europe about why earlier death rates were so high in some places was that the hospitals were overloaded and therefore didn't have enough capacity (staff, equipment, etc) and therefore some died due to there not being enough ventilators.
This isn't my field of expertise so I'm very open to finding out that my impression is wrong, but my gut feeling is that your comment is not accurate.
Coronavirus weakens the lung tissue, but the ability to breathe (inhale / exhale) is unaffected.
Basically the body was forcing people to have shallow breath to preserve the damaged lung tissue and allow it to recover. The ventilator essentially restored their breathing back to full force, which turned people's lungs into soup basically.
Makes sense as an explanation to me, but like I said, I don't have any official sources for that.
This explanation sounds very implausible and simplistic. When a person has extremely low oxygen level and you are giving them maximum oxygen possible, what can you do? Ventilator or ECMO (which is probably even more dangerous).
[1] https://elemental.medium.com/how-one-covid-19-doctor-became-...
The standard was to move people with terrible O2 sats at the start of the outbreak to ventilation immedatley, even if they did not seem to bad.
That seems to be replaced with providing high levels of O2/CPAP and only moving people to ventilation when that is not sufficient, even if O2 sats would normally indicate ventilation. This is why vent usage is a lot lower this second time round, even with more patients in hopsital.
I would be surprised if they put someone on a ventilator just because his O2 level was low without first putting him on O2 and maxing out the flow. Little experience that I do have is that people are first put on O2, then if their saturation remains low they increase the flow until they can increase no more. At that moment they are a candidate for a ventilator.
Maybe they "relaxed" the criteria after a while if ventilators showed bad outcomes but when people are maxed out on O2, there is little you can do.
https://pubmed.ncbi.nlm.nih.gov/33388794/
https://pubmed.ncbi.nlm.nih.gov/?term=ventilator+covid19&fil...
it will be so budget friendly, i am sure many hospitals in the world can use it...
If this is the case, then this would make the reliability much better and there is a chance it could be useful to many places. If the SD card on the Pi dies (which, if they are logging the data to SD and not RAM, is a likely event), then they can have spare SDs available as part of the standard operating procedure. It's not ideal, but so long as the main microcontroller is functioning, the display could be considered non-critical. Although, ICU staff might disagree...
We planned to develop a small gateway to gather all the devices alarms, linked to bed number. It was not developed, but hardware has the feature.
The LoRa fairness will allow very few data to come up, but high level alarms vital could be transmitted several times in a second if needed.
We know we cannot use it to transfer waveforms of course.
Long answer : In this project, Raspberry is used to display curves and set some parameters. The core (ventilator algorithm) is implemented on the STM32F411, there is just a serial link in-between.
The STM32 also monitor the Raspberry... If there is no heartbeat on the serial link, the STM32 shuts down the power supply of the raspberry, and ventilation goes on.
The fact is that it never happens yet during our tests (4 months uptime now for some devices). The ArchLinux is restricted to the bare minimum, and the Rust app do not overheat the CPU. Is it by chance, or not ? Before any MTBF conclusion, you need thousands of units running during months...
On another project of medical datalogger, I also put a little arduino as hardware watchdog. If no heartbeat of the main application, it just resets the Rpi.
I also use industrial SD card, which are far more reliable and provide SMART informations. See another article on this subject: https://blog.senx.io/a-10-year-warranty-thanks-to-iot/
The great thing about the Pi in this case is that it's non-critical, and if it ever does die, you spend $35 and put in a new SD card.
And to be honnest, I understand their point. How can you certify Linux ? So much code behind... It is not a car multimedia center, it is a ventilator, a class III vital device.
In this project, what was really impressive is the gap between the bare minimum (a 4 lines lcd screen + a few buttons + a pressure sensor, and you can make people breath), and the doctors expectations (curves, flow meters, statistics, O2 sensors...).
This is the same for lots of activity: experts cannot work with basic tools anymore. Only High level experts still can.
Conclusion: do not work with high level experts to build your specifications. Also listen to normal experts and doctors that needs more UX assistance.
Do you think relying on something like a hospital-provided tablet would have worked? Was this considered?
I mean, having that many screens may be a bit redundant, if you can have a single high-quality one. That said, I understand it introduces some complexity due to wireless protocols, paring with the right ventilator, etc.
In our initial requirement list, it was designed to be used in temporary hospitals (any public hall for example).
Screen convergence is not for now in hospitals. Behind one sensor, there is one company that sells its monitor with the sensor. Some old well known sensors now converge to one monitor (philips, edwards life science...), but there is a still one screen for every other functions.
Gathering data (when the constructor made it available) is a mess... look at HL7 specs! To build a medical datalogger, you sometimes must interface to an analog output (it is part of my job).
By the way, most monitors runs windows CE behind. Which is also a problem now: https://www.integrasources.com/blog/windows-ce-end-of-life-m...
I can see the convenience of using UART but as a very cautionary advice, hospital environments are electrically quite harsh in terms of EM noise. A serial line even a short one can absolutely suffer from interference.
You already made it relatively fail-safe with the heartbeat/watchdog but please consider upgrading your design to use comms with a differential signal, anything like CAN or even RS-485 in that Rpi/STM32 link would be a significant improvement.
A low speed 115200 baud link does the job, with applicative CRC on both side to be sure there is no corruption.
My method to test communication robustness: I inject pulses through a capacitor directly on the UART lines. I did it on this project, no problem. The four bytes CRC32 prevents random EM noise errors.
STM32 telemetry code is here:
https://github.com/makers-for-life/makair-firmware/blob/mast...
Pierre, author of the article.
Also there are CAN hats for rPi (SPI) or USB<->CAN bridges (using slcan protocol and Linux driver).
Sounds like a fun project!
I've seen 18 months before, but that was primarily software. I think the FDA clock on evaluation is 120 days now, that's after all the i's are dotted and t's crossed. EU MDD/MDR is similar, iirc.
Congrats on getting something together quickly!
Translation https://translate.google.com/translate?sl=fr&tl=en&u=https:/...
Pierre, the author of this article.