[HN Gopher] MakAir: Covid-19 ventilator with a Raspberry Pi
       ___________________________________________________________________
        
       MakAir: Covid-19 ventilator with a Raspberry Pi
        
       Author : mtmail
       Score  : 90 points
       Date   : 2021-01-07 12:34 UTC (10 hours ago)
        
 (HTM) web link (blog.senx.io)
 (TXT) w3m dump (blog.senx.io)
        
       | sahin wrote:
       | Great work. I am a big fan of Raspberry pi. For hospital
       | environment does raspberry pi have the reliability, stability and
       | durability for health use case for real life environments?
       | 
       | it will be so budget friendly, i am sure many hospitals in the
       | world can use it...
        
         | tonymet wrote:
         | there's no guarantee in linux when or if your code will
         | execute. it works well for consumer apps but you can't use
         | linux eg to pilot an airplane or for life support
        
           | baptistejamin wrote:
           | It's why there is a second board to handle critical tasks:
           | https://news.ycombinator.com/item?id=25671318
        
         | mbreese wrote:
         | My initial reaction was to say that there is no way the RPi
         | would be reliable enough for clinical purposes. _However_ ,
         | from the schematics, it looks like the RPi is only used for
         | displaying the airflow curves and not used to control the
         | ventilating. A microcontroller is used for that critical
         | function.
         | 
         | 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...
        
           | baptistejamin wrote:
           | It's why there is a second board to handle critical tasks:
           | https://news.ycombinator.com/item?id=25671318
        
             | mbreese wrote:
             | If I could ask -- I saw a LoRA circuit mentioned in the
             | schematics... what is that used for?
        
         | pp-ir wrote:
         | Short answer is no, I don't trust Rpi for vital tasks.
         | 
         | 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/
        
           | craftinator wrote:
           | This is good systems design. I've made a system with a
           | similar design (RPI for display and UI, one STM32 for
           | hardware control, another as watchdog) for an industrial
           | marking system, and it's run almost daily for 3 years without
           | any issues.
           | 
           | 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.
        
             | pp-ir wrote:
             | As soon as ANSM (french equivalent of US FDA) hears
             | "linux", "wifi", "connected", they see a scary green
             | monster...
             | 
             | 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.
        
               | MayeulC wrote:
               | Thank you for this valuable insight.
               | 
               | 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.
        
               | pp-ir wrote:
               | You're welcome.
               | 
               | 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...
        
           | PoachedSausage wrote:
           | Why use the Rpi at all (Nothing against them, I have a few)?
           | If the Pi is just writing graphics to a screen, why not
           | handle that directly with the STM32? Running an RTOS, it
           | should be able to manage a low priority GUI task along with
           | the real-time ventilator tasks.
        
           | DoingIsLearning wrote:
           | I assume when you refer to 'serial link' you mean that you
           | are using Rpi UART interface to communicate with the STM32.
           | 
           | 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.
        
             | pp-ir wrote:
             | I'll be very happy for my industrial projects if BCM2711
             | come with CAN or RS485 built-in, but for the moment, there
             | is nothing planned by Raspberry...
             | 
             | 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.
        
               | ska wrote:
               | I think the problem OP is referring to is that if you
               | were proposing this design for a approved medical device
               | for use in say US & EU, you might have trouble passing
               | e.g. 60601 because of the communication channel. I
               | haven't looked over the design in detail but EMI etc. can
               | be quite tricky to manage in this sort of device.
        
               | pp-ir wrote:
               | You're right. We will see. EMC tests are part of our
               | program.
        
               | ska wrote:
               | Are you working with a test house? They can really help
               | pin down issues quickly.
               | 
               | Sounds like a fun project!
        
               | flowless wrote:
               | If your embedded stack supports USB you could use CDC ACM
               | for possibly more robust comms (checksummed by USB, no
               | need for RTS/CTS).
               | 
               | Also there are CAN hats for rPi (SPI) or USB<->CAN
               | bridges (using slcan protocol and Linux driver).
        
       | baptistejamin wrote:
       | You can also find the project on GitHub:
       | https://github.com/makers-for-life/makair
        
       | chrisseaton wrote:
       | I thought everyone decided we didn't need a vast number of
       | ventilators like we thought we would? There was a huge panic for
       | a week last March and a lot of random companies were going to be
       | making them, then it just seemed to go away.
       | 
       | 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?
        
         | coding123 wrote:
         | I've heard directly from doctors that the entire ventilator
         | thing was a huge mistake and ended up causing more death.
         | Treatment is now more focused on statins. The covid shell is
         | basically in your blood clotting everything up - it's a huge
         | ass fat cell that is killing people. Take aspirin.
         | 
         | 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).
        
           | SketchySeaBeast wrote:
           | I'd love some articles that back this up - I've seen low
           | Vitamin D be mentioned as a comorbidity, but I don't think
           | generic advice on vitamins and taking aspirin is that useful
           | without any sort of evidence.
        
             | VBprogrammer wrote:
             | While on the whole you are completely correct, it's worth
             | remembering that the risks associated with taking recommend
             | doses of vitamins are negligible.
             | 
             | 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.
        
               | coding123 wrote:
               | This is great advice. If you have a chance to get the
               | vaccine, that's the best option. But keep wearing masks,
               | and try to not get the virus in any ways you can.
               | Vitamins are basically boosting your immune system, and
               | as a bonus there are studies that back up that it
               | actually helps in some cases 77% better outcomes
               | (potentially more). That doesn't mean you can't die from
               | covid even if you're taking these vitamins (as well as
               | with the vaccine).
        
               | SketchySeaBeast wrote:
               | Yeah, vitamins I understand, but Aspirin has negative
               | effects with constant long term use. I'm just not
               | comfortable with those recommendations without any effort
               | to support.
        
             | coding123 wrote:
             | Vitamin D
             | 
             | https://www.sciencedirect.com/science/article/pii/S09600760
             | 2...
             | 
             | https://pmj.bmj.com/content/early/2020/11/12/postgradmedj-2
             | 0...
             | 
             | Statins
             | 
             | https://health.ucsd.edu/news/releases/Pages/2020-09-23-stat
             | i...
             | 
             | 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.
             | 
             | https://vitamindforall.org/letter.html
        
             | stolenmerch wrote:
             | https://vitamin-d-covid.shotwell.ca/
        
         | pp-ir wrote:
         | As far as I understood doctors, in march there was no
         | guidelines for the disease. It was considered as a respiratory
         | disease.
         | 
         | 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.
        
         | djsumdog wrote:
         | The ventilators were a death sentence. Many of the people who
         | died early on, died not due to COVID, but due to their lungs
         | getting damaged by high pressure vents. Some were kept on high
         | pressure for much longer than is normal.
         | 
         | 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.
        
           | adolph wrote:
           | _Conclusions: The incidence of [ventilator-associated lower
           | respiratory tract infections (VA-LRTI)] is significantly
           | higher in patients with SARS-CoV-2 infection, as compared to
           | patients with influenza pneumonia, or no viral infection
           | after statistical adjustment, but residual confounding may
           | still play a role in the effect estimates._
           | 
           | https://pubmed.ncbi.nlm.nih.gov/33388794/
           | 
           | https://pubmed.ncbi.nlm.nih.gov/?term=ventilator+covid19&fil.
           | ..
        
           | hkt wrote:
           | Can you cite anything on this? I've heard it claimed before
           | but haven't seen a primary source.
        
           | corin_ wrote:
           | Could you please share any sources? I know they're not used
           | as much now but haven't seen any evidence that they are
           | specifically to blame for deaths.
           | 
           | 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.
        
             | war1025 wrote:
             | I don't have any sources at hand, but the explanation I
             | heard is that ventilators are generally used for people who
             | have healthy lung tissue but are unable to breathe
             | properly.
             | 
             | 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.
        
               | saberdancer wrote:
               | People are not put on ventilators for no reason. They are
               | put because their oxygen level is so level that they will
               | die if it deteriorates. People ended up on ventilators
               | after they received maximum possible level of
               | supplementary oxygen.
               | 
               | 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).
        
               | war1025 wrote:
               | This [1] seems to be a fairly representative article of
               | the sort of thing I've seen. Not peer reviewed, but it
               | hardly seems like fringe lunacy.
               | 
               | [1] https://elemental.medium.com/how-one-covid-19-doctor-
               | became-...
        
               | tptacek wrote:
               | Can you provide a source that wasn't written by a (checks
               | notes) magician?
        
               | war1025 wrote:
               | I don't particularly care about the topic, so no.
        
         | jschwartzi wrote:
         | GM contracted with one or more actual medical device companies
         | to produce ventilators under the DPA. So yes we needed
         | ventilators, but we produced a ton of them to fulfill that
         | need.
        
           | sokoloff wrote:
           | To be even-handed, both Ford and GM produced ventilators.
        
       | [deleted]
        
       | pp-ir wrote:
       | => HN effect, the server is sloooow. Sorry.
       | 
       | Pierre, the author of this article.
        
       | mtmail wrote:
       | Homepage in French https://makair.life/
       | 
       | Translation
       | https://translate.google.com/translate?sl=fr&tl=en&u=https:/...
        
       | franky47 wrote:
       | Note: the project was started during the first lockdown by the
       | staff of Clever Cloud [1], a French PaaS based in Nantes.
       | 
       | [1] https://clever-cloud.com
        
       | koolk3ychain wrote:
       | This is interesting, however, if I had covid and knew I was going
       | to soon be on a ventilator. I'd much rather overdose on morphine
       | or kill myself than rely on a raspberry pi based ventilator.
        
         | selfhoster11 wrote:
         | If there was nothing else available, I'd surely pick a chance
         | of survival while connected to a Pi-based ventilator than zero
         | chance of survival.
        
         | exyi wrote:
         | You'd be fine, most patients on ventilators are AFAIK heavily
         | sedated anyway. So don't overdose yourself, please
        
           | koolk3ychain wrote:
           | When hospitals reach critical levels of occupancy or patients
           | that are "near death" the option of a terminal morphine drip
           | is more common than you'd think. However, I feel it's
           | important to mention that anyone who wants decent medical
           | care while alive should never arrange a DNR. There's actually
           | clinical evidence to suggest that a DNR can actually markedly
           | lower your level of care in a hospital or ICU [0]
           | 
           | 0 - https://pubmed.ncbi.nlm.nih.gov/10448716/
        
         | Aissen wrote:
         | Yeah, the title is misguided, it is not the whole story :
         | https://news.ycombinator.com/item?id=25671318
         | 
         | (And as much as I hate the Pi's reliability, I'd still take
         | that bet if it was indeed relying on a Pi).
        
         | baptistejamin wrote:
         | Hello! I work on this project.
         | 
         | 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
        
           | koolk3ychain wrote:
           | A good friend of mine had the experience of nearly dying
           | after a mobile ventilator in an ambulance failed after he was
           | involved in a serious car accident. It was later found that
           | the ambulance operator was using devices that hadn't been
           | cleared by the FDA yet. Although they came from a Turkish
           | "medical device" company, they were not cleared for use in
           | the US and left my friend with brain damage and PTSD.
           | 
           | 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".
        
             | mbreese wrote:
             | While I don't disagree with your overall sentiment (I can't
             | imagine relying on a RPi powered device -- even if it is
             | just a display -- for clinical use), I think you're
             | overthinking the motivation here...
             | 
             |  _> 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).
        
             | pp-ir wrote:
             | Sorry for your friend.
             | 
             | 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.
        
             | jeroenhd wrote:
             | I agree that this project can be incredibly dangerous if
             | people try to sell them in countries with well-developed,
             | well-tested systems of healthcare.
             | 
             | 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.
        
             | kbelder wrote:
             | To be frank, more people would be saved with fallible yet
             | cheap medical hardware than 'proven correct' hardware that
             | costs $100,000 plus.
        
         | bird_monster wrote:
         | That's fair for you individually. For a lot of people, "I'd
         | rather try to live than die" is a much more realistic
         | viewpoint.
        
       ___________________________________________________________________
       (page generated 2021-01-07 23:02 UTC)