Hi there,
I am presently working on a simplistic ventilator project.
From reading the government specification I believe as do many others that a simple Arduino based ventilator (Ignoring the chip not technically allowed to be used) would make a very cost effective list suport system when combined with an Ambi bag and with some help I believe that it could meet almost all of the governments requirements. Better than the CPAP adaptations being shown at the moment in the UK.
My design uses a servo motor and bell crank to provide compression to an ambi bag with variable compression and velocity to control breath rate. At present rate being fixed at 1:2 Inhalation and Exhalation cycle.
I am now at a loss with my code and wondered if any of the more experience programmers would be able to end a hand?
The premise is that the servo sweeps between 150Deg starting point to a specific angle defined by a potentiometer, 150=> 140,130,120,110 etc. and back again.
This sweep is controlled via another potentiometer defining the breath cyce between 2 and 6 seconds.
The arm then returns to the 150 degree mark to await the elapsed time before starting another cycle.
The problem for all my trials I cannot get the arm to sweep correctly.
At the moment it is sweeping from 100 >150 slowly
then 150 > 100 quickly and undertaking the wait at 100 Deg
I need it to sweep from 150 > 100 Slowly Return to 150 then wait/delay at 150.
Any help would be much apreciated.
Other items in project are;
- Pressure overide - If Pressure on A2 >= 40cmH20 then only run to that pressure not full sweep angle
- Soft stop at end of compression so run al of compression stroke at fixed speed untill last 5 degrees then slow down to stop allows pressure transducer t not become overtaken and softens impact on lungs.
- Screen - Awaiting to go back into work to grab some resistors from my cabinet
- Pressure or volume control
Big project that seems simple, I am trying to hit as much of the governmet specs as possible for a project under about £250, if it doesnt help this time is an interesting project and will publish the plans. I also might need a baby home built ventilator to test a possible ventilator test rig I might be involved in making. Coded in LV which I am better at!
Any help is much appreciated!!
Trial_from_backup_2.ino (3.33 KB)