Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.

Home-brewed respirator study
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Home-brewed respirator study

by jps2000 on Tue Mar 24, 2020 3:09 pm

Dear community
I want to share some experiments with a cuirass based respirator based upon
This company produces a rarerly used respirator and issued a prophetic flyer already 6 years ago (attachment).
I used a standard vacuum cleaner , a solid state relay (SSR) and an Arduino Nano timer.
The control of the SSR is done by AC coupling to prevent continuous on in case of a hangup.
The cuirass used is made of a plastic storage box hold in place by velcros but needs heavy improvements to better fit the chest and belly.
Here is the link to a video
Below find the simple code for the timer including also more details
Code: Select all | TOGGLE FULL SIZE
/*Code for Home brewed EXPERIMENTAL!!!! Cuirass ventilator for Arduino Atmega 328P 16Mhz (Arduino Nano etc)
 by: github/jps2000 March 23, 2020
 The software controls a solid state relay (SSR) on / off in the rhythm of the respiratory rate. The relay switches the mains of a vacuum cleaner (VC)
 The relay  is AC coupled to avoid fatal error in case the controller hangs. This is achieved by  controlling the relay via a PWM and a coupling capacitor (Elcap 10uF + to controller) and a clamping diode (1N4148 parallel SSR input kathode to +). So static  H of the controller does not switch the relay off.
 I / E time is 25%
 Respiratory rate can be set within limits by UP / DOWN buttons
 The vacuum cleaner should allow control of vacuum strenght electrically or by bypass air.
 As cuirass a transparent plastic box having a size of about 40x30x15cm with rounded opening is recommended. (Like IKEA Samla 39x28x14)
 Connect the VC hose to it. Use a soft towel between the box and the chest. However fit should be improved!
 Fixation on the chest is done by 2 velcros  to achieve little pressure.
 When the VC is on, The chest and belly is sucked in the box and cause inspiration or at least increase functional residual capacity.

 Details of this kind ov ventilation is outlined here:

 Freeware:  The code is provided "AS IS",without warranty of any kind.
 The author can not be made legible for any harm caused by this device and its application.
 !!!!!!!!!!!! Do not use without supervision and medical advise.!!!!!!!!!!!!!!
 Working with Mains voltage without experience may cause fatal outcome.
 The author declares no relation or any other contacts to hayekmedical.
 The VC should have an air bypass to adjust suction strength.
#define btn_UP              (9)         // tact switch to GND
#define btn_DOWN            (12)        // tact switch to GND
#define PWM_OUT             (6)         // connect to solid state relay via 10uF elcap. + to controller; 1N4148 Diode antiparallel to  relay input
                                        // valid pins Nano: 5,6 (960Hz)
#define LED                 (13)        // control led for relay (Arduino Nano onboard LED)
#define lower_limit         4500        // time in ms
#define upper_limit         10500       // time in ms
#define STEP                500         // step width to increment or decrement time per button press

float   I_E                 = 1.0/4.0;  // I/E ratio = 1:3 = 1 / 1+3 depends on behavior of VC
unsigned long timer         = millis();
int RP                      = 7500;                        // respiratory period 8/min

void setup()
 // pin definitions
  pinMode(LED, OUTPUT);
  pinMode(PWM_OUT, OUTPUT);
  pinMode(btn_DOWN, INPUT_PULLUP);
  pinMode(btn_UP, INPUT_PULLUP);

void loop()
  if(millis() - timer > RP) timer = millis();
  if(millis() - timer  <  RP * (1 - I_E))                       //on
  digitalWrite(LED, LOW);
  analogWrite(PWM_OUT,200);                                 //off
  digitalWrite(LED, HIGH);

  //tact switch handling
  if(digitalRead(btn_DOWN) == LOW ){                       
    while(digitalRead(btn_DOWN) == LOW);                  // wait for button release
    if (RP > lower_limit) RP -= STEP;
  if(digitalRead(btn_UP) == LOW ){                        // button pressed  stores actual phi as mean value and saves actual calibration to flash
    while(digitalRead(btn_UP) == LOW);                    // wait for button release
    if (RP < upper_limit) RP += STEP;
flyer hayekmedical 2014-2015
(398.89 KiB) Downloaded 3 times

Posts: 562
Joined: Fri Jun 02, 2017 4:12 pm

Please be positive and constructive with your questions and comments.