Embedded system ventilator

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 60 times
Contact:

Embedded system ventilator

Post by viktor_au »

The world in a very hard situation right now.
People try to protect, fight the coronavirus, organise some groups to help, etc.
As I understood there are a lot of cases with people in need of ventilators.
Some technical minded persons do try to create some projects and even managed to build the saving live machines and successfully used them.
The ventilator project is a very tricky one. There are many legal issues. The big problem is by using Arduino as a 100% reliable component in life saving equipment. Another big problem is the creation of the bug-free software. As well as many other issues.
The question is.
Is it a good idea to create an Arduino based ventilator as the last resort?
Say, when nobody can help you, when 'they' order you to stay at home 24/7 and you won't be able to leave your home without fear to be arrested, when your relative will be dying and nobody around can help you?
Should it be done?
Can Matrix forum users can combine efforts and create some Instructable to build a very cheap Arduino based ventilator by using a dc motor from ink-jet printer and 3d printed fan or use some dc air-blower (if you have one). To use the face-mask or 3d-printed mouth piece, tube from hardware shop, and hex file with Arduino program?
Sure, with a serious disclamer and note - do it on your own risk.
But the question remains.
Should we do it?

mnf
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Embedded system ventilator

Post by mnf »

Yes, difficult times.
I work as a pharmacist so have been extremely busy - panic 'buying' hasn't just applied to food.

I'd say a ventilator isn't a good idea - you need to be heavily sedated - not something to try at home. Or encourage others to try.

A team (Italian I think) has come up with an automatic control system for ventilators (the o2matic I think I heard it called on the radio) and this sort of feedback/regulation would certainly be possible using an Arduino or other MCU system (it monitors your blood o2 and other vital signs and adjusts the equipment automatically - freeing up staff)

Positive pressure oxygen support doesn't require the patient to be unconscious and has been the subject of much research in the UK (and probably elsewhere) and would be more feasible (sourcing an oxygen supply isn't particularly easy though) - and has been reported to be beneficial in helping seriously ill patients.

However, I'd want to be in a hospital if I was that ill.
Keep isolated and hand -washing and try and avoid it - until a vaccine appears. It might be a long haul, sadly.

Martin

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 60 times
Contact:

Re: Embedded system ventilator

Post by viktor_au »

Re: hospitals.
Let us imagine that we have no more hospitals or the hospitals are so full and the waiting list goes in weeks.

Re: Positive pressure (oxygen) support.
Can I ask you the possible parameters for that system?
Continuous Positive Airway Pressure (CPAP) based on Arduino can be looked into.

Thank you Martin.

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 60 times
Contact:

Re: Embedded system ventilator

Post by viktor_au »

Interesting video
New innovation could help solve ventilator shortage.
https://www.youtube.com/watch?v=xdZtMgpxnPI

User avatar
AbhijitR
Posts: 299
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 280 times
Been thanked: 79 times
Contact:

Re: Embedded system ventilator

Post by AbhijitR »

Hello! Viktor

Actually I came across the below video few days back since the CORONA crises and eventually ventilator, the video is from Feb 2019 and this person has used an ANDROID phone, I guess this is what you wanted to know?

https://www.youtube.com/watch?v=IgAR4yW ... ex=16&t=0s

Below is one more video for your knowledge (April 2020) unfortunately for you this video is in Hindi, I don't know if there is any way to translate in English.

https://www.youtube.com/watch?v=0DNg_5S ... 1g&index=2

I hope this help you.

Regards
Abhi

mnf
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Embedded system ventilator

Post by mnf »

For home use - cpap machines are used and available to treat sleep apnea and provide air at 3-20hPa (for example) - note that I suspect oxygen would be added in a hospital setting. Home oxygen usually is regulated to 2 (or occasionally 4) l/min - from a cylinder or concentrator.

Nebulized drugs would also be used (egg salbutamol)

See https://www.cpap.co.uk for example

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 60 times
Contact:

Re: Embedded system ventilator

Post by viktor_au »

Thank you Abhi
I have watched both videos.
The first one is not technical, but more like advertising the product video.
The second one (the non-English one) is better as it has showed the components of the system.
Looks like the resuscitator modification is the way to go (with or without the oxy supply).
I saw on Youtube some made in garage devices with or without electronics with one task in mind - to pump the air in a person lungs if that person is not able to do it or with so much pain in muscles that it is hard for him/she to do it.
Sure, it is not the pro or even semi-pro machine, but it can save some hours before that person can get some professional help.
I have attached photo.
There are a few projects on internet with some mechanical devices helping to free the medical officer from manual work of pumping the air into the person lungs.
Is it a way to do the project on this forum?
There are a lot of people here with some great knowledge to create some simple and cheap device.
Attachments
view_1s.jpg
view_1s.jpg (30.19 KiB) Viewed 8306 times
Last edited by viktor_au on Sun Apr 05, 2020 11:43 am, edited 1 time in total.

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 60 times
Contact:

Re: Embedded system ventilator

Post by viktor_au »

A very simplified diagram of device.
Attachments
diagram_1.jpg
diagram_1.jpg (40.76 KiB) Viewed 8306 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Embedded system ventilator

Post by medelec35 »

I have moved this topic from the "Tips and Tricks" section as that is meant for sharing your knowledge.
Not for starting off with asking questions.
Martin

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 60 times
Contact:

Re: Embedded system ventilator

Post by viktor_au »

The main goal of this 'question' is to ask people to share their knowledge.
Do you plan to do it or not?
And yes, thank you for not deleting this topic.

MIT Emergency Ventilator (E-Vent) Project
Attachments
automated_bag-1.jpg
automated_bag-1.jpg (40.85 KiB) Viewed 8267 times
Last edited by EtsDriver on Mon Apr 06, 2020 5:24 am, edited 1 time in total.
Reason: Remember, to avoid making topics too long, use "EDIT" button on your messages if you were the last poster.

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 60 times
Contact:

Re: Embedded system ventilator

Post by viktor_au »

Looks like the main parameters are:

Respiratory Rate (RR) - (breaths per minute): between 8 – 40
Adjusted by changing the speed of motor

Tidal Volume (TV) (air volume pushed into lung): between 200 – 800 mL based on patient weight
Adjusted by changing the 'arms' travel distance
Attachments
claws-1.jpg
claws-1.jpg (70.58 KiB) Viewed 8236 times

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 60 times
Contact:

Re: Embedded system ventilator

Post by viktor_au »

Would be great if FC8 community will help me with this project.

The main components of this system
(please correct):

1. The BMV or bag-mask-valve
2. Arduino MC with other components/sensors (Airway pressure must be monitored)
3. Mechanical two arms /claws/gripper system.
4. Filtration system. COVID-19 can get aerosolized (airborne), so HEPA filtration on the patient’s exhalation is required or between the ventilator unit and the patient.

BMV or bag-mask-valve - the main component
Is a standard resuscitation bag, self-inflating bag, created for ambulances (etc) to be used by using the hand-manual pumping of air or air/oxy mixture into the patient lungs as the ventilation on room air is better than no ventilation at all. In this project only air intake will be used. The BVM consists of a flexible air chamber (the "bag"), attached to a face mask. BMV has valves.

Robotic claw/gripper
This is a problematic component.
What is the simple and most reliable design of a robotic claw? Most of them use some gears.
Can it be done without using the machining process?
What can be used to create the gripper-claw in an average garage from the easy to buy in hardware shop materials?
Say - from the long bolt, few nuts, a few pieces of aluminium and some wood?

Info
Making a Robot Claw https://www.intorobotics.com/robot-claw/
Thingiverse: https://www.thingiverse.com/search?q=ro ... t=relevant

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 60 times
Contact:

Re: Embedded system ventilator

Post by viktor_au »

Using the interrupt

Can somebody please help me.
I have to control three states of the machine:
- Inhale
- Exhale
- Pause
As well as I have to check on human inter-action with some settings, (say: motor speed, motor distance travel and the pause time).

What is the best possible way to run the program?

A. Use Timer0 to constantly loop the macros Inhale, Exhale, Pause by leaving the main loop with/by checking the adc values (speed, distance, time). In case of human does change the settings the machine does not stop, but continue to run, however in the main loop human will be asked to confirm the changes by pressing the button and after it is done finally change the settings and run machine with the new values.

B. Use Timer0 to constantly check the adc values (speed, distance and time). The macros Inhale, Exhale and Pause run in the main loop constantly.

Ferla
Flowcode v5 User
Posts: 126
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 19 times
Contact:

Re: Embedded system ventilator

Post by Ferla »

Hi,
I want to share my experience because I live in Italy and especially in the most affected area.
Yes, as you said, Covid problem causes severe respiratory crisis and oxygen is one of the main things the person needs,
Let's go back to the goal, I also thought like many lovers of the open source world how to make myself useful.
Let's start with simplicity, because not everyone has the means to make some complex parts, of course we have to use what we find "under the home store".

Watch this video:
https://www.youtube.com/watch?time_cont ... e=emb_logo


As soon as I saw it I appreciated the simplicity they used to compress the self-inflating bags
Car wiper motor connected by means of some gears in order to make a wheel spin in an eccentric way, the rest is even simpler.
What do you think about it? They used those big gears because they had them in stock.

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 60 times
Contact:

Re: Embedded system ventilator

Post by viktor_au »

Thank you Ferla.

I think the biggest problem with this design is the gears.
Another problem is (I found it on internet):
Windshield wiper motors are NOT back-drivable, due to the worm drive, they lack integrated position sensing.
I couldn't see on video how did those guys solved the timing and positioning problem.
However I found on youtube another video with windshield wiper motor.
https://www.youtube.com/watch?v=vdLXp7uGFX4

In the first prototype, Galloway wrapped nylon webbing around an Ambu bag and attached it to the crank arm of a windshield wiper motor to apply the repetitive squeezing force. While the design worked, they still needed a cleaner design where the amount of squeeze (known as tidal volume) could be controlled more precisely.

As I understood the danger is in the over-pressurising the lungs. If timing is not correct the human will die.
Attachments
car_wiper_motor_1.jpg
car_wiper_motor_1.jpg (55.91 KiB) Viewed 8183 times
car_industry_version.jpg
car_industry_version.jpg (101.05 KiB) Viewed 8183 times

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 60 times
Contact:

Tidal volume calculations

Post by viktor_au »

Need some help with tidal volume calculations.
In what situation the sensitivity changes from 5 to 7 and up?

mnf
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Embedded system ventilator

Post by mnf »

https://www.bbc.co.uk/news/technology-52251286 This on the BBC news yesterday

Raspberry pi powered ventilator being tested in Colombia..

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 60 times
Contact:

Re: Embedded system ventilator

Post by viktor_au »

RPi is a good platform.
I am not sure what community is bigger, Arduino or Raspberry Pi.
I made a few projects on RPi and can say that it is a bit more complex than Arduino project.
But... Horses for courses.
What is good for one is not good for another one.
------------------------------
I have raised a discussion on Facebook group 'Open Source COVID19 Medical Supplies'.
My question is: what is the minimum needed settings for Arduino based controller?
Some people attacked me straight away by saying that I am creating a product for sale.
Thanks to moderator who deleted those posts.
-----------------------------
My goal is to create a simple mechanical 'pump' in garage from tools we all have and use Arduino free code
to set-up the controller for this pump.
Attachments
block-diagram-1.jpg
(59.09 KiB) Downloaded 601 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Embedded system ventilator

Post by Benj »

Hello,
I am not sure what community is bigger, Arduino or Raspberry Pi.
for my 2 pence worth on this I would use Arduino over a RPi, you don't have the boot up time and it's less likely to become corrupt and useless. Had lots of experience of the SD card on a Pi becoming corrupt due to it being switched off at the wrong time and having to be reflashed. An Arduino shouldn't have this problem.

Really depends on if you need the HDMI and Mouse/Keyboard interface which may swing things back in the favour of the Pi. Backup SD cards on standby :D

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 60 times
Contact:

Re: Embedded system ventilator

Post by viktor_au »

...become corrupt
Good point Ben. It is the weak point in RPi.
--------------------
The whole idea is create a cheap and easy assembled controller for 'any' (?) mechanical squeezer of Ambu bag.
I checked the ventilator projects on internet.
If we separate the non-smart from the smart (with some electronics) DIY ventilators we can see that even so called 'open-source' projects are mostly oriented on design without giving the ordinary person some guide how to set up that device.
I mean that even if I make in my garage the mechanical 'arm' and manage to control the motor revs and the arm moving distance how can I tailor that to the particular patient with particular lungs volume, age, sex, conscious/unconscious, etc.
It should be some kind of step-by-step guide with a lot of questions, some calculations and a lot of alarm settings.
There are some documents published by doctors for engineers with recommendations for simple and cheap ventilators design, but doctors always reference to a 'big' machine settings and use abbr. like TV, VT, BIPAP, etc.
For me it is a question mark - should we work on such project?
How dangerous it is?
Can we narrow the DIY ventilator setting to only some situations?
Like: the patient must be conscious, only mask is used (no tube), only Assist Control mode is used with a lot of alarm settings, etc.

Post Reply