DIY Ventilator using Arduino with Blood Oxygen Sensing For Covid Pandemic

One important device for which demand has ramped up is ventilators for patients who need assistance with their breathing due to the respiratory effects of COVID-19. Basically, a ventilator is a machine that provides breathable air into and out of the lungs, to deliver breaths to a patient who is physically unable to breathe, or breathing insufficiently. A DIY ventilator may not be efficient as that of a medical grade ventilator but it can act as a good substitute if it has control over certain parameters.

Proposed system

All these needs are taken into account in the DIY ventilator we designed and created using an Arduino to help in pandemic situations.In this case, the ventilator bag is pushed using a silicon ventilator bag connected with DC motors and a two-side push mechanism. Toggle switches are used for switching, and a variable pot is used to modify the patient’s BPM value and breath duration.

Our device uses a sensitive pressure sensor and a blood oxygen sensor to track the patient’s vital signs and display them on a small screen. Additionally, the system is equipped with an emergency buzzer alert that will sound a warning once an abnormality is found.

To accomplish the intended outcomes and to help patients in COVID pandemic and other emergency scenarios, the complete system is controlled by an Arduino board.

Components Required

  • Atmega Controller
  • Blood Oxygen Sensor
  • Pressure Sensor
  • Servo Motor
  • Breather Mask
  • Valves & Joints
  • Air Breather Bag
  • Push Rods
  • Connector Rods
  • Gear Mechanism
  • Plastic Enclosure
  • LCD Display IC
  • Vtg Regulator IC
  • Resistors
  • Capacitors
  • Transistors
  • Cables and Connectors
  • Diodes
  • PCB and Breadboards
  • LED
  • Transformer/Adapter
  • Push Buttons
  • Buzzer
  • IC
  • IC Sockets

Circuit Diagram

diy arduino ventilator covid
  • Arduino Uno

A microcontroller with an ATmega328 platform is the Arduino Uno. It has 14 digital I/O pins, six of which can be used as PWM outputs. The remaining pins are a 16 MHz crystal oscillator pin, six analog inputs, a power jack point, a USB connection port, an ISCP header pin, and a reset button. It can be powered by a USB cable, an AC-to-DC adapter, a battery, or all three of these. 

  • Pressure Sensor 

A device for measuring the pressure of gases or liquids is called a pressure sensor. The force necessary to prevent fluid from expanding is expressed as pressure, which is typically expressed in terms of force per unit area. A pressure sensor typically performs the function of a transducer by producing a signal in response to the applied pressure. In countless common applications, pressure sensors are employed for monitoring and control.

  • 16×2 LCD Module

 Liquid Crystal Display is referred to as LCD. An electronic display with alphanumeric characters, the LCD screen has a wide range of uses. The most typical applications for this display, which is a fairly basic module, are in devices and circuits. 

  • Stepper Motor

An electromechanical device known as a stepper motor transforms electrical power into mechanical power. Additionally, it is a synchronous, brushless electric motor that has a large number of steps per entire rotation. As long as the motor is carefully sized for the application, the position of the motor can be regulated precisely without the use of a feedback device. Similar to switching reluctance motors are stepper motors.

  • Bag Ambu A bag valve mask (BVM)

It is also referred to as a “Ambu bag” or a “self-inflating bag” in general, is a hand-held device that is frequently used to deliver positive pressure ventilation to patients who are not breathing or are not breathing enough. The device is a necessary component of resuscitation kits for qualified personnel working outside of hospitals (such as ambulance crews), and it is frequently used in hospitals as a piece of standard equipment in emergency rooms and other critical care areas as well as on crash carts.

  • Blood OxygenSensor 

The amount of oxygen is measured using tiny light beams that go through the blood in the finger. It accomplishes this by tracking variations in light absorption in the blood that has received oxygen or not. This method is painless. Monitoring blood oxygen levels can be essential in medical circumstances. SpO2 is a crucial measurement for keeping track of individuals with respiratory conditions such as sleep apnea, emphysema, COPD, or Covid-19.

Actuation Mechanism

In order to make a linear actuator, I used a bipolar stepper motor integrated with a lead screw(or a Nema 17+coupling) and coupled it with a traveling nut. As the shaft of the motor rotates the traveling nut translates along the screw so that linear motion is achieved.

In the end, control over ventilation parameters can be achieved by varying;

  • No. of rotations (stroke) —-> Tidal volume
  • Speed of rotation—–>Flow rate
  • Steps in clockwise : steps in anti-clockwise direction—>IE Ratio
  • Frequency of direction change per minute—->BPM

Source Code

#define EN        8  
#define X_DIR     2 //Direction pin
#define X_STP     3 //Step pin

int delayTime=30; //Delay between each pause in uS
int stps=6400;// Steps to move

void step(boolean dir, byte dirPin, byte stepperPin, int steps)

 digitalWrite(dirPin, dir);
 for (int i = 0; i < steps; i++) {
   digitalWrite(stepperPin, HIGH);
   digitalWrite(stepperPin, LOW);

void setup(){
 pinMode(X_DIR, OUTPUT); pinMode(X_STP, OUTPUT);
 pinMode(EN, OUTPUT);
 digitalWrite(EN, LOW);

void loop(){

 step(false, X_DIR, X_STP, stps); //X, Clockwise
 step(true, X_DIR, X_STP, stps); //X, Counterclockwise


I hope all of you have understood How to Design DIY Ventilator using Arduino with Blood Oxygen Sensing For Covid Pandemic. We MATHA ELECTRONICS will be back soon with more informative blogs soon.

Leave a Reply

Your email address will not be published.