0% found this document useful (0 votes)
209 views

Low Cost Ventilator: Diploma in Electronics Engineering

This document is a project report on developing a low cost portable ventilator. It was submitted by 5 students to partially fulfill their diploma in electronics engineering. There is a shortage of ventilators in the state to treat COVID-19 patients, with only 1 ventilator available per 93,273 people. The document proposes designing an inexpensive portable ventilator that can be mass produced to help treat pneumonia in COVID-19 patients and address respiratory issues. It will include the circuit diagram, working, components used, programming, and advantages/disadvantages of the design.

Uploaded by

ayyappadas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
209 views

Low Cost Ventilator: Diploma in Electronics Engineering

This document is a project report on developing a low cost portable ventilator. It was submitted by 5 students to partially fulfill their diploma in electronics engineering. There is a shortage of ventilators in the state to treat COVID-19 patients, with only 1 ventilator available per 93,273 people. The document proposes designing an inexpensive portable ventilator that can be mass produced to help treat pneumonia in COVID-19 patients and address respiratory issues. It will include the circuit diagram, working, components used, programming, and advantages/disadvantages of the design.

Uploaded by

ayyappadas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

A project Report on

LOW COST VENTILATOR

Submitted by

AYYAPPADAS K-20042021
AKHIL CK-20042006
ARUN KP-20042013
RAGESH K-20042049
ASWINRAJ O-20042019

For the partial fulfillment of the degree of

DIPLOMA IN ELECTRONICS ENGINEERING

DEPARTMENT OF ELECTRONICS ENGINEERING


AKNM GOVERNMENT POLYTECHNIC COLLEGE, THIRURANGADI
VELIMUKKU P.O., MALAPPURAM
KERALA, INDIA 673635

2022-23
1
CERTIFICATE

This is to certify that the project report entitled“LOW COST


VENTILATOR” submitted by AYYAPPADAS K , AKHIL CK , ARUN
KP,RAGESH K , ASWINRAJ O is a bonafide record of the project done
by him/her under our supervision and guidance for the partial fulfillment of
the award of Diploma in Electronics engineering under the State board of
Technical Education(SBTE), Government of Kerala during the year2022-
2023.

Reg. No:20042021
Place:Chelari Reg. No:20042006
Reg. No:20042013
Date: Reg. No:20042049
Reg. No:20042019

HEAD OF DEPARTMENT LECTURER INCHARGE

AKNM GPTC THIRURANGADI AKNM GPTCTHIRURANGADI

EXTERNALEXAMINER INTERNAL EXAMINER


AKNM GOVT.POLYTECHNIC COLLEGE,

THIRURANGADI

VISION & MISSION OF OUR INSTITUTION

VISION

To empower youth by imparting quality technical education


and ethical values for the development of society.

MISSION

 Construct technicaly competent manpower through


outcome based education.

 Inculcate values and ethics through curricular,co-


curricular and etra-curricular activities.

 Develop humen potential for entrepreneurship..

 Conducting job oriented courses in appropriate


technology for societal benefit.
ACKNOWLEDGMENT

I would like to express my deep sense of gratitude to Mrs.Parvathy.A K Principal in


charge of of A.K.N.M Government Polytechnic CollegeThirurangadi,without whose
help I would have been far from completion of this report. I would like to extend my
sincere thanks to Mrs.Sindhu P lecturer in electronics engineering for providing me with
all the facilities for making my project successful one I would like to use of this
opportunity to express my heart felt gratitude to our honorable head of the department
Mrs.Stella Maria for assisting me in times of needs. I am highly indebted to all of them
for constantly encouraging me by giving their valuable suggestion on my work. I am
grateful to them for giving me support and confidence

AYYAPPADAS K-20042021
AKHIL CK-20042006
ARUN KP-20042013
RAGESH K-20042049
ASWINRAJ O -20042019
ABSTRACT

So many peoples are quarantined at their home due to covid 19 diseases widespread. in
kerala there are so many issues rising due to deficiency of oxygen And lack of medical
equipments.we are introducing low cost portable home ventilator mainly usefull for the home
quarantined patients to maintain their blood oxygen level in body and also usefull for the
patients who suffered by lungs Problems. the main advantage of this ventilator is it is low
powerd, compact, portable and handy. Total 1,769 ventilators in Our State, which means an
average of one ventilator available for every 93,273 persons. The most pressing shortages
facing hospitals during the COVID-19 emergency is a lack of ventilators. These machines can
keep patients breathing when they no longer can on their own and they can cost around
$30,000 each. Design and development of a low-cost portable ventilator could be a possible
way, that can help pneumonia cases of COVID-19 patient in Our State. Respiratory diseases
and injury-induced respiratory failure constitute a major public health problem in both
developed and less developed countries. Asthma, chronic obstructive pulmonary disease and
other chronic respiratory conditions are widespread. These conditions are exacerbated by air
pollution, smoking, and burning Of biomass for fuel, all of which are on the rise in developing
countries1,2 Patients with underlying lung disease May develop respiratory failure under a
variety of challenges and can be supported mechanical ventilation. Additionally, these
ventilators are often fragile and vulnerable during continued use, requiring costly service
contracts from the manufacturer. One example of this shortage occurred during Hurricane
Katrina, when there were insufficient numbers of ventilators and personnel were forced to
resort to manual BVM ventilation Measures to improve preparedness of ventilators and
personnel were forced to resort to manual BVM ventilation Measures to improve
preparedness of ventilators and personnel were forced to resort to manual BVM ventilation
Measures to improve preparedness 4,500 portable emergency ventilators for the strategic
national stockpile. However, considering the low number of stocked ventilators and their
currently high cost, there is a need for an inexpensive portable ventilator for which production
can be scaled up on demand
CONTENTS

1. INTRODUCTION ..................................................................... 1

.
2. LITERATURE REVIEW.............................................................. 2

3. CIRCUIT DIAGRAM................................................................. 3

4. DESIGNING OF PCB................................................................ 4

5. WORKING............................................................................. 5

6. COMPONENTS USED............................................................. 7

1. CUSTOM MADE ARDUINO

1. Atmega 328p............................................................ 7

2. 12mhz crystal ost....................................................... 14

3. Header pin.................................................................. 19

4. 28 pin ic base.............................................................. 21

5. 22pf capacitor............................................................. .22

2. NODE MCU(ESP8228)................................................... 24

3. DH 11 HUMIDITY&TEMP SENSOR................................. 29

4. AMBHU BAG(ADULT).................................................... 31

5. POTENTIO METER........................................................ 35

6. PUSH BUTTON SWITCH................................................ 36


7. MAX 30100 SENSOR..................................................... 37

8. SERVO MOTOR............................................................. 40

9. 20*4 LCD DISPLAY........................................................ 44

10. I2C MODULE................................................................ .47

7 DESIGNING

1. 3D printed mechanism.................................................... 48

2. Acrylic outer body............................................................ 49

3. Blynk open source applicaton........................................... 50

8 PROGRAM.................................................................... 52

9 PROJECT VIEW.............................................................. 61

10 ADVANTAGES & DISADVANTAGES................................ 63

11 COST ANALYSIS............................................................. 64

12 CONCLUTION................................................................ 65

13 REFERENCE.................................................................... 66
Chapter 1

INTRODUCTION

Total 1,769 ventilators in Our State, which means an average of one


ventilator available for every 93,273 persons. The most pressing shortages
facing hospitals during the COVID-19 emergency is a lack of ventilators.
These machines can keep patients breathing when they no longer can on
their own and they can cost around $30,000 each. Design and
development of a low-cost portable ventilator could be a possible way,
that can help pneumonia cases of COVID-19 patient in Our State.
Respiratory diseases and injury-induced respiratory failure constitute a
major public health problem in both developed and less developed
countries. Asthma, chronic obstructive pulmonary disease and other
chronic respiratory conditions are widespread. These conditions are
exacerbated by air pollution, smoking, and burning of biomass for fuel, all
of which are on the rise in developing countries1,2 Patients with
underlying lung disease may develop respiratory failure under a variety of
challenges and can be supported mechanical ventilation. Additionally,
these ventilators are often fragile and vulnerable during continued use,
requiring costly service contracts from the manufacturer. One example of
this shortage occurred during Hurricane Katrina, when there were
insufficient numbers of ventilators and personnel were forced to resort to
manual BVM ventilation Measures to improve preparedness have since
been enacted; most notably the Center for Disease Control and
Prevention (CDC) recently purchased 4,500 portable emergency
ventilators for the strategic national stockpile. However, considering the
low number of stocked ventilators and their currently high cost, there is a
need for an inexpensive portable ventilator for which production can be
scaled up on demand.

1
Chapter 2

LITERATURE REVIEW

In the following literature review, here discuss pertinent information about the topics
involved in our research, as well as recent, pertinent studies. Leonardo Acho, Alessandro N.
Vargas and Gisela Pujol-Vázquez., [1] Designed and construct a low-cost, open-source
mechanical ventilator. The ventilator compresses ambu bag with actuator and its shaft to deliver
breaths. They also shows a numerical method for monitoring the patients’ pulmonary condition.
The method considers pressure measurements from the inspiratory limb and alerts clinicians in
real-time whether the patient is under a healthy or unhealthy situation. Experiments carried out in
the laboratory that had emulated healthy and unhealthy patients illustrate the potential benefits of
the derived mechanical ventilator. Sazzad Hossain Sazal, B. Tech. in ME (JNTU-A, India) M.Sc.
Engg student & TA Dept. of Mechanical Engineering, KUET, Khulna -9300. [2] Desigend and
developed a low-cost portable ventilator that can help pneumonia cases of COVID-19 patient in
Bangladesh. This low-cost ventilator delivers breaths by compressing a conventional Bag Valve
Mask (BVM) or Ambu bag with a pivoting motor drive mechanism, eliminating the need for a
human operator. Among other features, the machine had invasive and non-invasive feature, and
supports 500- 600 mL tidal volume, with a continuous working capability for several days. Based
on calculation, 12 Respiratory rate (RR)/min can provide required amount of tidal volume to the
pneumonia patient. Rajeev Chauhan, Raman Sharma, Nidhi Chauhan. [3] Designed a prototype of
device was work on the principle of an electric linear actuator which converts the rotary motion
into a linear motion. The designed device was connected to a regular adult AMBU. It has
mechanism to rhythmically compress the AMBU. A direct current (DC) motor (12–24 V) was
given the linear motion through electric linear actuator arrangement. In addition, this DC motor
has speed regulator which is used to modulate the frequency of respiratory rate (varying from 12
to 20 squeezes per min) for supplying the air oxygen mixture into the lungs of the patient. There is
a provision of the common platform so that the AMBU bag can squeeze automatically as per the
regulated speed setting in the speed regulator of the DC motor. Adamos Christou, Markellos
Ntagios, Andrew Hart, and Ravinder Dahiya. [4] Design and implementation of one such
emergency ventilator called GlasVent is presented, which an automated version of manual
resuscitator device, commonly known as big valve mask or artificial manual breathing unit bag
and widely used prior to initiating the mechanical ventilation. GlasVent uses 3D printed
mechanical parts, widely available materials and off-the-shelf electronic and sensing devices
which can be fast assembled. Furthermore, it requires minimal training and can be operated
manually by hands or legs, thus meeting the emergency requirement.

2
Chapter 3

CIRCUIT DAIGRAM

Figure 5.1

Figure 5.2

3
Chapter 4

DESIGNING OF PCB

Figure 5.3

.
Figure 5.4

4
Chapter 5

WORKING

An IoT based motor drive of clockwise and counter clockwise will provide the
required motion for the arm movement to maintain an automatic air flow with a
controlled pressure rate. The figure shows the working process of this proposed
automatic ventilation machine. Figure 8: Working Process of Setup An actuator
requires a control signal and a source of energy. The control signal is relatively low
energy and may be electric voltage or current, pneumatic, or hydraulic fluid pressure,
or even human power. Its main energy source may be an electric current, hydraulic
pressure, or pneumatic pressure. When it receives a control

Figure 5.5

An actuator requires a control signal and a source of energy. The control signal
is relatively low energy and may be electric voltage or current, pneumatic, or hydraulic
fluid pressure, or even human power. Its main energy source may be an electric current,

5
hydraulic pressure, or pneumatic pressure. When it receives a control

Control over ventilation parameters can be


achieved by varying;
No. of rotations (stroke) > Tidal volume
● Speed of rotation -------- >Flow rate
● Frequency of direction change per minute -->BPM

6
Chapter 6

COMPONENTS USED

1.ATMEGA 328P

Figure 5.6

7
ATMEGA328P is a 28 pin chip as shown in pin diagram above. Many pins of the chip here
have more than one function. We will describe functions of each pin in below table.

Pin Pin name Description Secondary Function


No.

1 PC6 (RESET) Pin6 of Pin by default is used as


PORTC RESET pin. PC6 can only be
used as I/O pin when
RSTDISBL Fuse is
programmed.

2 PD0 (RXD) Pin0 of RXD (Data Input Pin for


PORTD USART)

USART Serial
Communication Interface

[Can be used for


programming]

3 PD1 (TXD) Pin1 of TXD (Data Output Pin for


PORTD USART)

USART Serial
Communication Interface

[Can be used for


programming]

INT2( External Interrupt 2

8
Input)

4 PD2 (INT0) Pin2 of External Interrupt source 0


PORTD

5 PD3 Pin3 of External Interrupt source1


(INT1/OC2B) PORTD

OC2B(PWM -
Timer/Counter2 Output
Compare Match B Output)

6 PD4 (XCK/T0) Pin4 of T0( Timer0 External Counter


PORTD Input)

XCK ( USART External Clock


I/O)

7 VCC Connected to positive


voltage

8 GND Connected to ground

9 PB6 Pin6 of XTAL1 (Chip Clock


Oscillator pin 1 or External

9
(XTAL1/TOSC1) PORTB clock input)

TOSC1 (Timer Oscillator pin


1)

10 PB7 Pin7 of XTAL2 (Chip Clock


(XTAL2/TOSC2) PORTB Oscillator pin 2)

TOSC2 (Timer Oscillator pin


2)

11 PD5 Pin5 of T1(Timer1 External Counter


PORTD Input)
(T1/OC0B)

OC0B(PWM -
Timer/Counter0 Output
Compare Match B Output)

12 PD6 Pin6 of AIN0(Analog Comparator


(AIN0/OC0A) PORTD Positive I/P)

OC0A(PWM -
Timer/Counter0 Output
Compare Match A Output)

13 PD7 (AIN1) Pin7 of AIN1(Analog Comparator


PORTD Negative I/P)

10
14 PB0 Pin0 of ICP1(Timer/Counter1 Input
(ICP1/CLKO) PORTB Capture Pin)

CLKO (Divided System


Clock. The divided system
clock can be output on the
PB0 pin)

15 PB1 (OC1A) Pin1 of OC1A (Timer/Counter1


PORTB Output Compare Match A
Output)

16 PB2 (SS/OC1B) Pin2 of SS (SPI Slave Select Input).


PORTB This pin is low when
controller acts as slave.

[Serial Peripheral Interface


(SPI) for programming]

OC1B (Timer/Counter1
Output Compare Match B
Output)

17 PB3 Pin3 of MOSI (Master Output Slave


(MOSI/OC2A) PORTB Input). When controller acts
as slave, the data is
received by this pin. [Serial
Peripheral Interface (SPI) for
programming]

OC2 (Timer/Counter2

11
Output Compare Match
Output)

18 PB4 (MISO) Pin4 of MISO (Master Input Slave


PORTB Output). When controller
acts as slave, the data is
sent to master by this
controller through this pin.

[Serial Peripheral Interface


(SPI) for programming]

19 PB5 (SCK) Pin5 of SCK (SPI Bus Serial Clock).


PORTB This is the clock shared
between this controller and
other system for accurate
data transfer.

[Serial Peripheral Interface


(SPI) for programming]

20 AVCC Power for Internal ADC


Converter

21 AREF Analog Reference Pin for


ADC

22 GND GROUND

12
23 PC0 (ADC0) Pin0 of ADC0 (ADC Input Channel
PORTC 0)

24 PC1 (ADC1) Pin1 of ADC1 (ADC Input Channel


PORTC 1)

25 PC2 (ADC2) Pin2 of ADC2 (ADC Input Channel


PORTC 2)

26 PC3 (ADC3) Pin3 of ADC3 (ADC Input Channel


PORTC 3)

27 PC4 Pin4 of ADC4 (ADC Input Channel


(ADC4/SDA) PORTC 4)

SDA (Two-wire Serial Bus


Data Input/output Line)

28 PC5 Pin5 of ADC5 (ADC Input Channel


(ADC5/SCL) PORTC 5)

SCL (Two-wire Serial Bus


Clock Line)

13
ATMEGA328P –Features

CPU 8-bit AVR

Number of Pins 28

Operating Voltage +1.8 V TO +5.5V


(V)

Number of 23
programmable I/O
lines

Communication Master/Slave SPI Serial Interface(17,18,19


Interface PINS) [Can be used for programming this
controller]

Programmable Serial USART(2,3 PINS) [Can


be used for programming this controller]

Two-wire Serial Interface(27,28 PINS)[Can


be used to connect peripheral devices like
Servos, sensors and memory devices]

JTAG Interface Not available

14
ADC Module 6channels, 10-bit resolution ADC

Timer Module Two 8-bit counters with Separate Prescaler


and compare mode, One 16-bit counter
with Separate Prescaler,compare mode
and capture mode.

Analog 1(12,13 PINS)


Comparators

DAC Module Nil

PWM channels 6

External Oscillator 0-4MHz @ 1.8V to 5.5V

0-10MHz @ 2.7V to 5.5V

0-20MHz @ 4.5V to 5.5V

Internal Oscillator 8MHz Calibrated Internal Oscillator

Program Memory Flash


Type

15
Program Memory 32Kbytes[10000 write/erase cycles]
or Flash memory

CPU Speed 1MIPS for 1MHz

RAM 2Kbytes Internal SRAM

EEPROM 1Kbytes EEPROM

Watchdog Timer Programmable Watchdog Timer with


Separate On-chipOscillator

Program Lock Yes

Power Save Modes Six Modes[Idle, ADC Noise Reduction,


Power-save, Power-down, Standby and
Extended Standby]

Operating -40°C to +105°C(+105 being absolute


Temperature maximum, -40 being absolute minimum)

16
2.CRYSTAL OSCILLATOR

Figure 5.7

A crystal oscillator is an electronic oscillator circuit that uses a piezoelectric crystal as


a frequency-selective element.[1][2][3] The oscillator frequency is often used to keep
track of time, as in quartz wristwatches, to provide a stable clock
signal for digital integrated circuits, and to stabilize frequencies for radio
transmitters and receivers. The most common type of piezoelectric resonator used is
a quartz crystal, so oscillator circuits incorporating them became known as crystal
oscillators.[1] However, other piezoelectricity materials
including polycrystalline ceramics are used in similar circuits.

A crystal oscillator relies on the slight change in shape of a quartz crystal under
an electric field, a property known as inverse piezoelectricity. A voltage applied to
the electrodes on the crystal causes it to change shape; when the voltage is removed,
the crystal generates a small voltage as it elastically returns to its original shape. The

17
quartz oscillates at a stable resonant frequency, behaving like an RLC circuit, but with a
much higher Q factor (less energy loss on each cycle of oscillation). Once a quartz
crystal is adjusted to a particular frequency (which is affected by the mass of
electrodes attached to the crystal, the orientation of the crystal, temperature and
other factors), it maintains that frequency with high stability.[4]

Quartz crystals are manufactured for frequencies from a few tens of kilohertz to
hundreds of megahertz. As of 2003, around two billion crystals are manufactured
annually.[5] Most are used for consumer devices such
as wristwatches, clocks, radios, computers, and cellphones. However in applications
where small size and weight is needed crystals can be replaced by thin-film bulk
acoustic resonators, specifically if ultra-high frequency (more than roughly 1.5 GHz)
resonance is needed. Quartz crystals are also found inside test and measurement
equipment, such as counters, signal generators, and oscilloscopes.

Terminology

.
Figure 5.8

Quartz crystal resonator (left) and quartz crystal oscillator (right)

A crystal oscillator is an electric oscillator type circuit that uses a piezoelectric


resonator, a crystal, as its frequency-determining element. Crystal is the common term
used in electronics for the frequency-determining component, a wafer of quartz
crystal or ceramic with electrodes connected to it. A more accurate term for it
is piezoelectric resonator. Crystals are also used in other types of electronic circuits,
such as crystal filters.

Piezoelectric resonators are sold as separate components for use in crystal oscillator
circuits. They are also often incorporated in a single package with the crystal oscillator
circuit.

18
3.HEADER PINS

Figure 5.9

A pin header (or simply header) is a form of electrical connector. A male pin
header consists of one or more rows of metal pins molded into a plastic base, often
2.54 mm (0.1 in) apart, though available in many spacings.[1] Male pin headers are
cost-effective due to their simplicity. The female counterparts are sometimes known
as female socket headers, though there are numerous naming variations of male and
female connectors. Historically, headers have sometimes been called "Berg
connectors",[2] but headers are manufactured by many companies.[3]

19
Normally pin headers are through-hole devices (THD / THT), but surface-mount
devices (SMD / SMT) exist too. In the SMD case, the solder side of the pins are bent on
a 90 degree angle so as to be soldered to pads on the PCB. On single row SMD headers
the pins are bent alternating to one side or the other, on dual row SMD headers the
pins are simply bent outwards. If pin headers are optional, the THD variant is often
chosen for ease of manual assembly.

Headers can be either straight (vertical) or right-angle, the latter form is sometimes
used to connect two PCBs together horizontally. [1]
Most often, headers are available in one or two rows,[1] though three or more rows are
available from some manufacturers.
They are often sold as long strips (typically 36 / 40 / 50 pins) which can easily be cut
apart to a required number of pins. Many pin lengths are available to minimize labor
during PCB assembly.
Male pin headers are often associated with ribbon cable connectors.[4] When used
alone, they can be recipients of jumpers, which have spacings of 2.54 mm (0.1 in) and
2.00 mm (0.079 in).[5]
Header types can be categorized by their pitch (uniform distance between pins
measured from center to center). Some common header pitches are:[1]

 5.08 mm (0.200 in)


 3.96 mm (0.156 in)
 2.54 mm (0.100 in) with 0.64 mm (0.025 in) square pins[6] or precision machined
0.50 mm (0.020 in) round pins[7]
 2.00 mm (0.079 in) with 0.50 mm (0.020 in) square pins[8]
 1.27 mm (0.050 in)
 1.00 mm (0.0394 in)

20
4.28 PIN IC BASE

Figure 6

in electronic circuit maintenance and upgrading, the system carries product quality. If
you use 28 pin ic base then you can easily change this ic from the circuit board and
replace it if necessary. Sometimes we designing a smart circuit using a microcontroller.
In this case, we need to upgrade our project according to time. If you soldering a
microcontroller with the PCB then its does not possible to upgrade. So IC Base is very
much import for standard electronic circuit designing. IC Base 28 Pin

21
5.CAPACITOR

Figure 6.1

A capacitor is a device that stores electrical energy in an electric field by virtue of


accumulating electric charges on two close surfaces insulated from each other. It is
a passive electronic component with two terminals.

The effect of a capacitor is known as capacitance. While some capacitance exists


between any two electrical conductors in proximity in a circuit, a capacitor is a
component designed to add capacitance to a circuit. The capacitor was originally
known as the condenser,[1] a term still encountered in a few compound names, such
as the condenser microphone.

22
The physical form and construction of practical capacitors vary widely and many types
of capacitor are in common use. Most capacitors contain at least two electrical
conductors often in the form of metallic plates or surfaces separated by
a dielectric medium. A conductor may be a foil, thin film, sintered bead of metal, or
an electrolyte. The nonconducting dielectric acts to increase the capacitor's charge
capacity. Materials commonly used as dielectrics include glass, ceramic, plastic
film, paper, mica, air, and oxide layers. Capacitors are widely used as parts of electrical
circuits in many common electrical devices. Unlike a resistor, an ideal capacitor does
not dissipate energy, although real-life capacitors do dissipate a small amount
(see Non-ideal behavior). When an electric potential difference (a voltage) is applied
across the terminals of a capacitor, for example when a capacitor is connected across a
battery, an electric field develops across the dielectric, causing a net positive charge to
collect on one plate and net negative charge to collect on the other plate. No current
actually flows through the dielectric. However, there is a flow of charge through the
source circuit. If the condition is maintained sufficiently long, the current through the
source circuit ceases. If a time-varying voltage is applied across the leads of the
capacitor, the source experiences an ongoing current due to the charging and
discharging cycles of the capacitor.

23
2.NODE MCU

Figure 6.2

The NodeMCU (Node MicroController Unit) is an open-source software and hardware


development environment built around an inexpensive System-on-a-Chip (SoC) called
the ESP8266. The ESP8266, designed and manufactured by Espressif Systems, contains
the crucial elements of a computer: CPU, RAM, networking (WiFi), and even a modern
operating system and SDK. That makes it an excellent choice for Internet of Things
(IoT) projects of all kinds.

However, as a chip, the ESP8266 is also hard to access and use. You must solder wires,
with the appropriate analog voltage, to its pins for the simplest tasks such as powering
it on or sending a keystroke to the “computer” on the chip. You also have to program
it in low-level machine instructions that can be interpreted by the chip hardware. This
level of integration is not a problem using the ESP8266 as an embedded controller chip
in mass-produced electronics. It is a huge burden for hobbyists, hackers, or students
who want to experiment with it in their own IoT projects.

But, what about Arduino? The Arduino project created an open-source hardware
design and software SDK for their versatile IoT controller. Similar to NodeMCU, the
Arduino hardware is a microcontroller board with a USB connector, LED lights, and

24
standard data pins. It also defines standard interfaces to interact with sensors or other
boards. But unlike NodeMCU, the Arduino board can have different types of CPU chips
(typically an ARM or Intel x86 chip) with memory chips, and a variety of programming
environments. There is an Arduino reference design for the ESP8266 chip as well.
However, the flexibility of Arduino also means significant variations across different
vendors. For example, most Arduino boards do not have WiFi capabilities, and some
even have a serial data port instead of a USB port.

Figure 6.3

 ower Pins There are four power pins. VIN pin and three 3.3V pins.
 VIN can be used to directly supply the NodeMCU/ESP8266 and its peripherals. Power
delivered on VIN is regulated through the onboard regulator on the NodeMCU
module – you can also supply 5V regulated to the VIN pin
 3.3V pins are the output of the onboard voltage regulator and can be used to supply
power to external components.

25

GND are the ground pins of NodeMCU/ESP8266

2C Pins are used to connect I2C sensors and peripherals. Both I2C Master and I2C Slave
are supported. I2C interface functionality can be realized programmatically, and the
clock frequency is 100 kHz at a maximum. It should be noted that I2C clock frequency
should be higher than the slowest clock frequency of the slave device.

GPIO Pins NodeMCU/ESP8266 has 17 GPIO pins which can be assigned to functions
such as I2C, I2S, UART, PWM, IR Remote Control, LED Light and Button
programmatically. Each digital enabled GPIO can be configured to internal pull-up or
pull-down, or set to high impedance. When configured as an input, it can also be set to
edge-trigger or level-trigger to generate CPU interrupts.

ADC Channel The NodeMCU is embedded with a 10-bit precision SAR ADC. The two
functions can be implemented using ADC. Testing power supply voltage of VDD3P3 pin
and testing input voltage of TOUT pin. However, they cannot be implemented at the
same time.

UART Pins NodeMCU/ESP8266 has 2 UART interfaces (UART0 and UART1) which
provide asynchronous communication (RS232 and RS485), and can communicate at up
to 4.5 Mbps. UART0 (TXD0, RXD0, RST0 & CTS0 pins) can be used for communication.
However, UART1 (TXD1 pin) features only data transmit signal so, it is usually used for
printing log.

SPI Pins NodeMCU/ESP8266 features two SPIs (SPI and HSPI) in slave and master
modes. These SPIs also support the following general-purpose SPI features:

4 timing modes of the SPI format transfer

Up to 80 MHz and the divided clocks of 80 MHz

Up to 64-Byte FIFO

26
SDIO Pins NodeMCU/ESP8266 features Secure Digital Input/Output Interface (SDIO)
which is used to directly interface SD cards. 4-bit 25 MHz SDIO v1.1 and 4-bit 50 MHz
SDIO v2.0 are supported.

PWM Pins The board has 4 channels of Pulse Width Modulation (PWM). The PWM
output can be implemented programmatically and used for driving digital motors and
LEDs. PWM frequency range is adjustable from 1000 μs to 10000 μs (100 Hz and 1
kHz).

Control Pins are used to control the NodeMCU/ESP8266. These pins include Chip
Enable pin (EN), Reset pin (RST) and WAKE pin.

EN: The ESP8266 chip is enabled when EN pin is pulled HIGH. When pulled LOW the
chip works at minimum power.

RST: RST pin is used to reset the ESP8266 chip.

WAKE: Wake pin is used to wake the chip from deep-sleep.

Control Pins are used to control the NodeMCU/ESP8266. These pins include Chip
Enable pin (EN), Reset pin (RST) and WAKE pin.

EN: The ESP8266 chip is enabled when EN pin is pulled HIGH. When pulled LOW the
chip works at minimum power.

RST: RST pin is used to reset the ESP8266 chip.

WAKE: Wake pin is used to wake the chip from deep-sleep.

USB to Serial Converter – CP2102 or CH340G

Incorporated into each NodeMCU is a USB to Serial Converter. The official design is
based on the CP2102 chipset and offers the best compatibility. Genuine boards use
the CP2102 chipset including the officially licensed Amica NodeMCU modules. The
other common USB to Serial Converter used is the CH340G which is common on the
lower-priced modules including the LoLin units. Other designs may use drivers
including the FTDI chipset, but those designs are rare.

27
Depending on the Operating System you are using with the NodeMCU, the appropriate
driver must be installed. Generally, Windows 10 immediately recognizes the CP2102
chipset while the CH340G may require separate installation.

Drivers for the CP2102 are available for download from the Silicon Labs
support site. Drivers constantly evolve and ensuring and installing the most recent
version in your development environment minimum issues. Drivers are available for
Windows, Mac, Linux, and Android. We also have a local copy of the CP2102 drivers
(v10.1.8) available locally for download. You are always best to visit the original
manufacturer to ensure you are receiving the most recent versions of the driver.

WCH maintain and update the drivers for the CH340G on a regular basis.
Versions of the driver are also available for Windows, Mac, Linux, and Android. Visit
their Driver Download page. We also have a local copy of the CH340G drivers (version
3.5) available locally for download. You are always best to visit the original
manufacturer to ensure you are receiving the most recent versions of the driver.

28
3.DH 11 HUMIDITY&TEMP SENSOR

Figure 6.4

Humidity is the measure of water vapour present in the air. The level of humidity in air
affects various physical, chemical and biological processes. In industrial applications,
humidity can affect the business cost of the products, health and safety of the
employees. So, in semiconductor industries and control system industries
measurement of humidity is very important. Humidity measurement determines the
amount of moisture present in the gas that can be a mixture of water vapour,
nitrogen, argon or pure gas etc… Humidity sensors are of two types based on their
measurement units. They are a relative humidity sensor and Absolute humidity
sensor. DHT11 is a digital temperature and humidity sensor.

DHT11 sensor consists of a capacitive humidity sensing element and a thermistor for
sensing temperature. The humidity sensing capacitor has two electrodes with a
moisture holding substrate as a dielectric between them. Change in the capacitance
value occurs with the change in humidity levels. The IC measure, process this changed
resistance values and change them into digital form.
For measuring temperature this sensor uses a Negative Temperature coefficient
thermistor, which causes a decrease in its resistance value with increase in

29
temperature. To get larger resistance value even for the smallest change in
temperature, this sensor is usually made up of semiconductor ceramics or polymers.

The temperature range of DHT11 is from 0 to 50 degree Celsius with a 2-degree


accuracy. Humidity range of this sensor is from 20 to 80% with 5% accuracy. The
sampling rate of this sensor is 1Hz .i.e. it gives one reading for every second. DHT11 is
small in size with operating voltage from 3 to 5 volts. The maximum current used while
measuring is 2.5mA.

DHT11 sensor has four pins- VCC, GND, Data Pin and a not connected pin. A pull-up
resistor of 5k to 10k ohms is provided for communication between sensor and micro-
controller.

30
4.AMBHU BAG(ADULT)

Figure 6.5

The Ambu ballon, from the acronym Auxiliary Manual Breathing Unit, is a self-
expanding flask used to support respiratory activity. The acronym was created by the
company that first put it on the market in 1956

It is one of the most widely used instruments in emergencies both as a


manoeuvre in resuscitation and to support breathing in patients with
insufficient lung ventilation.

The instrument is highly recommended to be used connected to oxygen in


case there is a need to maximise the oxygenation of the patient.

Let’s find out more about the characteristics and how to use
the Ambu bag.

Ambu ballon: characteristics

The Ambu resuscitation bag is an instrument consisting of a self-

31
expanding plastic bag connected at its ends to two one-way valves.

One of these valves allows air to enter the inside of the balloon, the other
valve directs the air outwards.

This prevents rebreathing, which involves inhaling exhaled air.

At the proximal end, the Ambu resuscitation balloon is equipped with a


universal 15 mm long connector to ensure connection to various airway
management devices such as masks, endotracheal tubes, tracheostomy
cannulae, HME filters, catheter mounts.

A feature of self-expandable balloons is that they are available in various


sizes, so that they can be adapted to different face shapes, and that they
can be fitted with an oxygen cylinder and/or reservoir.

The latter consists of a balloon where oxygen accumulates without waste


while waiting to enter the self-expanding balloon for subsequent
insufflation.

In ambu ventilation of a patient who already has an invasive way of


breathing installed, an HME filter must be connected before connecting
the self-expanding balloon to the device.

This device provides air heating and humidification.

In addition, it is also recommended to use a corrugated tube for better


ventilation, so that the device used to manage the airway is not under
tension.

32
This prevents extubation, which can occur due to the tube being under
tension.If the patient does not have an invasive airway, ventilation can be
carried out using a face mask.

This is placed over the mouth and nose so that they are both covered and
allows air to enter the pulmonary tree.

How to use the Auxiliary Manual Breathing Unit (Ambu)

After attaching the Ambu self-expanding balloon to the patient, the


operator compresses the balloon to generate a higher pressure inside
than atmospheric pressure.While this maneuver is performed, a flow of
air is generated which allows the proximal one-way valve to open and the
distal one-way valve to close, sending the flow to the patient.

When the balloon is released, the negative pressure created inside


generates the opposite effect on the valves and closes the proximal valve
while the distal one opens.

In this way the balloon can be refilled.

To use the Ambu bag, proceed as follows:

 The rescuer places the mask on the patient’s face, making sure that the
edges fit snugly around the skin around the mouth and nose.
 The mask is placed on the person’s face by performing an “EC”
manoeuvre, which consists of placing three fingers under the chin to
carefully spread the head. In addition, two fingers should be on top of the
mask to hold it in place and prevent air from escaping during insufflation.

33
 Press with one hand on the balloon simulating a forced inhalation: air is
pushed into the balloon through the valve and goes into the patient’s
lungs.During exhalation, the balloon expands again automatically and the
valve prevents the return of the carbonated air.
 Once the balloon is full of air again, it can be used again by pressing it.

During the pressure manoeuvre for ambu resuscitation, great care must
be taken with the volume to be blown and the pressure used.

This is necessary because adult self-expanding resuscitators have a


capacity of 1600 ml, but the patient must be given a volume of 500-600
ml.

This means that the self-expanding balloon should never be fully


depressed, but only compressed with one hand to deliver the correct
volume.

Excessive balloon pressure can cause the walls of the alveoli to stretch
and can damage them, causing air to be delivered into the extra-alveolar
spaces and leading to the formation of air in the pleural space.

Partial or complete collapse of the lung may result.

In addition to the adult ambu balloon, there is also the paediatric ambu
balloon, which is intended for children.

In addition, it is important to note that, like all CE-certified medical and


surgical devices, it has an expiry date.

34
5.POTENTIO METER

Figure 6.6

potentiometer is a passive electronic component. Potentiometers work by varying the


position of a sliding contact across a uniform resistance. In a potentiometer, the entire
input voltage is applied across the whole length of the resistor, and the output voltage
is the voltage drop between the fixed and sliding contact . A potentiometer has the
two terminals of the input source fixed to the end of the resistor. To adjust the output
voltage the sliding contact gets moved along the resistor on the output side. working
principle of a potentiometer is quite simple. Suppose we have connected two
batteries in parallel through a galvanometer. The negative battery terminals are
connected together and positive battery terminals are also connected together
through a galvanometer if the electric potential of both battery cells is exactly the
same, there is no circulating current in the circuit and hence the galvanometer shows
null deflection. The working principle of potentiometer depends upon this
phenomenon.

35
6.PUSH BUTTON SWITCH

Figure 6.7

push-button (also spelled pushbutton) or simply button is a simple switch mechanism


to control some aspect of a machine or a process. Buttons are typically made out of
hard material, usually plastic or metal.[1] The surface is usually flat or shaped to
accommodate the human finger or hand, so as to be easily depressed or pushed.
Buttons are most often biased switches, although many un-biased buttons (due to
their physical nature) still require a spring to return to their un-pushed state.

Terms for the "pushing" of a button


include pressing, depressing, mashing, slapping, hitting, and punching.

36
7.MAX 30100 SENSOR

Figure 6.8

The MAX30100 is an integrated pulse oximetry and heartrate monitor sensor solution.
It combines two LEDs, a photodetector, optimized optics, and low-noise analog signal
processing to detect pulse oximetry and heart-rate signals. The MAX30100 operates
from 1.8V and 3.3V power supplies and can be powered down through software with
negligible standby current, permitting the power supply to remain connected at all
times.

Benefits and Features ●


Complete Pulse Oximeter and Heart-Rate Sensor Solution Simplifies Design •
Integrated LEDs, Photo Sensor, and High-Performance Analog Front -End • Tiny 5.6mm
x 2.8mm x 1.2mm 14-Pin Optically Enhanced System-in-Package ● Ultra-Low-Power

37
Operation Increases Battery Life for Wearable Devices • Programmable Sample Rate
and LED Current for Power Savings • Ultra-Low Shutdown Current (0.7µA, typ) ●
Advanced Functionality Improves Measurement Performance • High SNR Provides
Robust Motion Artifact Resilience • Integrated Ambient Light Cancellation • High
Sample Rate Capability • Fast Data Output Capability

COVER GLASS NO
INK
10
AD
C

CONTR
SIGNA
OL
HbO L
2 PROCESSIN
G
H
b

0.
1 RE I
D R

Figure 6.9

38
Pin Pin Function
Type

VIN Voltage Input

SCL I2C - Serial Clock

SDA I2C - Serial Data

INT Active low interrupt

IRD IR LED Cathode and LED Driver Connection Point(Leave floating in the
circuit)

RD Red LED Cathode and LED Driver Connection Point(Leave floating in


the circuit)

GND Ground pin

SpO2 Subsystem
The SpO2 subsystem in the MAX30100 is composed of ambient light cancellation (ALC), 16-
bit sigma delta ADC, and proprietary discrete time filter. The SpO2 ADC is a continuous time
oversampling sigma delta converter with up to 16-bit resolution. The ADC output data rate
can be programmed from 50Hz to 1kHz. TheMAX30100 includes a proprietary discrete time filter
to reject 50Hz/60Hz interference and low-frequency residual ambient noise.

39
8.SERVO MOTOR

Figure 7.0

A servo motor is a type of motor that can rotate with great precision. Normally this
type of motor consists of a control circuit that provides feedback on the current
position of the motor shaft, this feedback allows the servo motors to rotate with great
precision. If you want to rotate an object at some specific angles or distance, then you
use a servo motor. It is just made up of a simple motor which runs through a servo
mechanism. If motor is powered by a DC power supply then it is called DC servo
motor, and if it is AC-powered motor then it is called AC servo motor. For this tutorial,
we will be discussing only about the DC servo motor working. Apart from these major
classifications, there are many other types of servo motors based on the type of gear
arrangement and operating characteristics. A servo motor usually comes with a gear
arrangement that allows us to get a very high torque servo motor in small and
lightweight packages. Due to these features, they are being used in many applications
like toy car, RC helicopters and planes, Robotics, etc.

Servo motors are rated in kg/cm (kilogram per centimeter) most hobby servo motors
are rated at 3kg/cm or 6kg/cm or 12kg/cm. This kg/cm tells you how much weight
your servo motor can lift at a particular distance. For example: A 6kg/cm Servo motor

40
should be able to lift 6kg if the load is suspended 1cm away from the motors shaft, the
greater the distance the lesser the weight carrying capacity. The position of a servo
motor is decided by electrical pulse and its circuitry is placed beside the motor.

Servo Motor Working Mechanism


It consists of three parts:

1. Controlled device
2. Output sensor
3. Feedback system

It is a closed-loop system where it uses a positive feedback system to control motion


and the final position of the shaft. Here the device is controlled by a feedback signal
generated by comparing output signal and reference input signal.

Here reference input signal is compared to the reference output signal and the third
signal is produced by the feedback system. And this third signal acts as an input signal
to the control the device. This signal is present as long as the feedback signal is
generated or there is a difference between the reference input signal and reference
output signal. So the main task of servomechanism is to maintain the output of a
system at the desired value at presence of noises.

Servo Motor Working Principle


A servo consists of a Motor (DC or AC), a potentiometer, gear assembly, and a
controlling circuit. First of all, we use gear assembly to reduce RPM and to increase
torque of the motor. Say at initial position of servo motor shaft, the position of the
potentiometer knob is such that there is no electrical signal generated at the output
port of the potentiometer. Now an electrical signal is given to another input terminal
of the error detector amplifier. Now the difference between these two signals, one
comes from the potentiometer and another comes from other sources, will be
processed in a feedback mechanism and output will be provided in terms of error
signal. This error signal acts as the input for motor and motor starts rotating. Now
motor shaft is connected with the potentiometer and as the motor rotates so the
potentiometer and it will generate a signal. So as the potentiometer’s angular position
changes, its output feedback signal changes. After sometime the position of
potentiometer reaches at a position that the output of potentiometer is same as
external signal provided. At this condition, there will be no output signal from the
amplifier to the motor input as there is no difference between external applied signal
and the signal generated at potentiometer, and in this situation motor stops rotating.

41
Interfacing Servo Motors with Microcontrollers:
Interfacing hobby Servo motors like s90 servo motor with MCU is very easy. Servos
have three wires coming out of them. Out of which two will be used for Supply
(positive and negative) and one will be used for the signal that is to be sent from
the MCU. An MG995 Metal Gear Servo Motor which is most commonly used for RC
cars humanoid bots etc. The picture of MG995 is shown below:

Figure 7.1

The color coding of your servo motor might differ hence check for your respective
datasheet.

All servo motors work directly with your +5V supply rails but we have to be careful on
the amount of current the motor would consume if you are planning to use more than
two servo motors a proper servo shield should be designed.

Controlling Servo Motor:


All motors have three wires coming out of them. Out of which two will be used for
Supply (positive and negative) and one will be used for the signal that is to be sent
from the MCU.

Servo motor is controlled by PWM (Pulse with Modulation) which is provided by the
control wires. There is a minimum pulse, a maximum pulse and a repetition rate. Servo

42
motor can turn 90 degree from either direction form its neutral position. The servo
motor expects to see a pulse every 20 milliseconds (ms) and the length of the pulse
will determine how far the motor turns. For example, a 1.5ms pulse will make the
motor turn to the 90° position, such as if pulse is shorter than 1.5ms shaft moves to 0°
and if it is longer than 1.5ms than it will turn the servo to 180°.

Servo motor works on PWM (Pulse width modulation) principle, means its angle of
rotation is controlled by the duration of applied pulse to its Control PIN. Basically servo
motor is made up of DC motor which is controlled by a variable resistor
(potentiometer) and some gears. High speed force of DC motor is converted into
torque by Gears. We know that WORK= FORCE X DISTANCE, in DC motor Force is less
and distance (speed) is high and in Servo, force is High and distance is less. The
potentiometer is connected to the output shaft of the Servo, to calculate the angle
and stop the DC motor on the required angle.

Figure 7.2

Servo motor can be rotated from 0 to 180 degrees, but it can go up to 210 degrees,
depending on the manufacturing. This degree of rotation can be controlled by applying
the Electrical Pulse of proper width, to its Control pin. Servo checks the pulse in every
20 milliseconds. The pulse of 1 ms (1 millisecond) width can rotate the servo to 0
degrees, 1.5ms can rotate to 90 degrees (neutral position) and 2 ms pulse can rotate it
to 180 degree.

All servo motors work directly with your +5V supply rails but we have to be careful
about the amount of current the motor would consume if you are planning to use
more than two servo motors a proper servo shield should be designed.

43
9.20*4 LCD DISPLAY

Figure 7.3

 In a 20x4 LCD module, there are four rows in display and in one row twenty

character can be displayed and in one display eighty characters can be shown.

 This liquid crystal module uses HDD44780 (It is a controller used to

display monochrome text displays) parallel interfacing.

 The liquid crystal display interfacing code is easily accessible. We just required

eleven input and output pinouts for the interfacing of the LCD screen.

 The input supply for this module is three volts or five volts, with that module other

components like PIC, Raspberry PI, Arduino.

44
 Thie electronic device can be used in different embedded systems, industries,

medical devices, and portable devices like mobile, watches, laptops.

 Liquid crystal display works on two types of the signal first one is data and the

second one is for control.

 The existence of these signals can be identified through the on and off condition of

RS pinout. Data can be read by pushing the Read/write pinout.

pinouts of 20x4 LCD modules that are described here with the detailed.

in No: Pin Name:


Parameters

It is ground pinout potential


Pin#1 It denoted as Vss
at this pinout is zero.

At this pinout, five volts are


Pin#2 It denoted as Vdd
provided.

This pinout denoted as This pinout is used to set the


Pin#3
Vo contrast of the screen.

It used to H/L register select


Pin#4 This pin denoted as RS
signal.

It used for H/L read/write


Pin#5 It denoted as R/W
signal.

This pinout denoted as


Pin#6 It used for H/L enable signal.
E

The pinouts from


Pin#7- It used for H/L data bus for 4
seven to fourteen
14 bit or 8-bit mode.
denoted as DB0 – DB7.

It used to set backlight


Pin#15 It identified as A (LED+)
anode.

45
It recognized as K (LED- It used to set backlight
Pin#16
). cathode.

Features of 20 x 4 LCD

 These are some features of 20 x 4 LCD modules that are described here with the

detailed.

 The most important feature of this module is that it can display 80 characters at a

time.

 The cursor of this module has 5x8 (40) dots.

 On this module already assembled the controller of RW1063.

 This module operates on the plus five volts input supply and can also work on the plus

three volts.

 The plus three volts pinout can also be used for the negative supply.

 The duty cycle of this module is one by sixteen (1/16).

 The light-emitting diode of this module can get supply from the pinout one, pinout

two, pinout fifteen, pinout sixteen, or pinout A and K.

46
10.I2C MODULE

Figure 7.4

I2C (Inter-Integrated Circuit; pronounced as “eye-squared-C”), alternatively known


as I2C or IIC, is a synchronous, multi-master/multi-slave (controller/target), packet
switched, single-ended, serial communication bus invented in 1982 by Philips
Semiconductors. It is widely used for attaching lower-speed peripheral ICs to
processors and microcontrollers in short-distance, intra-board communication.
Several competitors, such as Siemens, NEC, Texas
[1]
Instruments, STMicroelectronics, Motorola, Nordic Semiconductor and Intersil, have
introduced compatible I2C products to the market since the mid-1990s.
System Management Bus (SMBus), defined by Intel in 1995, is a subset of I 2C, defining
a stricter usage. One purpose of SMBus is to promote robustness and interoperability.
Accordingly, modern I2C systems incorporate some policies and rules from SMBus,
sometimes supporting both I2C and SMBus, requiring only minimal reconfiguration
either by commanding or output pin use.

47
Chapter 7

DESIGNING

. 1.3D printed machanism

Figure 7.5

48
2 Acrylic outer body

49
BLYNK IOT APP

Figure 7.6

50
Figure 7.9

51
Chapter 8

PROGRAM

1. //EDITED BY AYYAPPADAS VASUDEV//


2. #include <Servo.h>
3. #define DEBUG 1
4. #include <LiquidCrystal_I2C.h>
5.
6. LiquidCrystal_I2C lcd(0x27,20,4);
7. Servo myservo; // create servo object to control a servo
8.
9. int pos = -70; // default -70: initialize the servo start position
10. int RateDelay = 2000; // default 2000: The delay used between strokes
11. int StopPosition = 150; //default 150: The stop position of the servo determining the
volume of air
12.
13. int potpinVol = 0; // analog pin used to connect the 10K potentiometer for volume
14. int potpinRate = 1; // analog pin used to connect the 10K potentiometer for rate
15.
16. int val0; //variable to read the value from the analog pin
17. int val1; // variable to read the value from the analog pin
18. const int FASTEST_FREQUENCY = 35; // in "breaths per minute"
19. const int SLOWEST_FREQUENCY = 1; // in "breaths per minute"
20. char buffer[16]; //buffer for sprintf for LCD display.
21. void setup() {
22. pinMode(7, OUTPUT);
23. pinMode(8, OUTPUT);
24. digitalWrite(7, HIGH);

52
25. lcd.init();
26. lcd.clear();
27. lcd.backlight();
28. lcd.setCursor(0, 1);
29. lcd.print("VENTILATOR ON");
30. #ifdef DEBUG
31. Serial.begin(9600); // BaudRate for debug
32. #endif
33. myservo.attach(4); // attaches the servo on pin 4 to the servo object
34. }
35.
36. void loop(){
37. {
38.
39. digitalWrite(8, HIGH);
40. delay(100);
41. digitalWrite(8, LOW);
42. delay(100);
43. }
44.
45.
46. /* Number of Compressions per Minute
47. * rate of compression: 6, 10, 14, 18, 24, cycles per minute
48. * read the position of the Rate knob to determine the rate
49. */
50.
51. // calculate values used for display
52.

53
53. int breathFrequency = map (val0, 0, 180, SLOWEST_FREQUENCY,
FASTEST_FREQUENCY);
54. int breathDepthDisplayValue = map (val1, 0, 1023, 0, 5125); // 0..500 scale used
for display only.
55. // write the display values
56. lcd.setCursor(0, 2);
57. sprintf(buffer,"BPM:%2d br/m",breathFrequency);
58. lcd.print(buffer);
59. lcd.setCursor(0, 0);
60. lcd.print("GROUP 3*************");
61. lcd.setCursor(0, 3);
62. sprintf(buffer,"VOL:%3d ml",breathDepthDisplayValue);
63. lcd.print(buffer);
64. val1 = analogRead(potpinRate); // reads the value of the potentiometer
65. val1 = map(val1, 0, 1023, 0, 100);
66. #ifdef DEBUG
67. Serial.print("\t Delay map value = ");
68. Serial.print(val1);
69. #endif
70.
71. if (val1>=0 && val1<=20)
72. {
73. RateDelay = 10000; // default 10000
74. }
75. else if(20<val1 && val1<=40)
76. {
77. RateDelay = 6000; // default 6000
78. }
79. else if(40<val1 && val1<=60)

54
80. {
81. RateDelay = 4286; // default 4286
82. }
83. else if(60<val1 && val1<=80)
84. {
85. RateDelay = 1500; // default 3333
86. }
87. else
88. {
89. RateDelay = 1000; // default 2500
90. }
91. #ifdef DEBUG
92. Serial.print("\n RateDelay = ");
93. Serial.print(RateDelay);
94. #endif
95.
96. val0 = analogRead(potpinVol);
97. #ifdef DEBUG
98. Serial.print("\t pot value = ");
99. Serial.print(val0);
100. #endif
101.
102. val0 = map(val0, 0, 1023, 0, 180);
103. #ifdef DEBUG
104. Serial.print("\t map value = ");
105. Serial.print(val0);
106. #endif
107.
108. if (val0>=0 && val0<=36)

55
109. {
110. StopPosition = 30;
111. }
112. else if(36<val0 && val0<=72)
113. {
114. StopPosition = 60;
115. }
116. else if(72<val0 && val0<=108)
117. {
118. StopPosition = 90;
119. }
120. else if(108<val0 && val0<=144)
121. {
122. StopPosition = 120;
123. }
124. else
125. {
126. StopPosition = 170;
127. }
128. #ifdef DEBUG
129. Serial.print("\n Stop Position = ");
130. Serial.print(StopPosition);
131. #endif
132.
133. for (pos = -70; pos <= StopPosition; pos += 1) { // goes from 0 to 180 degrees
134. myservo.write(pos); //tell servo to go to position in variable 'pos'
135. delay(5); // default 15, quick is 5 // waits 15ms for the servo to reach the
position
136.

56
137. }
138.
139. delay(500); // default 100, original testing spec was 15
140. for (pos = StopPosition; pos >= -70; pos -= 5) { //goes from end pos to start
pos
141. myservo.write(pos); // tell servo to go to position in variable
142. delay(10); // default 15, quick is 5: waits 15ms for the servo to reach
position
143. }
144. delay(RateDelay);
145. }
146.
147.

57
PROGRAM

1. #include <Wire.h>

2. #include <ESP8266WiFi.h>

3. #include <BlynkSimpleEsp8266.h>

4. #include <MAX30100_PulseOximeter.h>

5. #include <BlynkSimpleEsp8266.h>

6.

7. char auth[] = "vrSs4buRffCPRGI0Ohet_n6Dc_ACyWt0"; //Blynk Authentication Token

8.

9. /* WiFi credentials */

10. char ssid[] = "POCOM3"; //Your WiFi SSID

11. char pass[] = "appu12345"; //Your WiFi Password

12.

13. #define REPORTING_PERIOD_MS 3000

14.

15. PulseOximeter pox;

16. uint32_t tsLastReport = 0;

17.

18. void setup()

19. {

20. Serial.begin(115200);

21. Blynk.begin(auth, ssid, pass);

58
22. Serial.print("Initializing pulse oximeter..");

23. // Initialize the PulseOximeter instance

24. // Failures are generally due to an improper I2C wiring, missing power supply

25. // or wrong target chip

26. if (!pox.begin()) {

27. Serial.println("FAILED");

28. for(;;);

29. } else {

30. Serial.println("SUCCESS");

31. digitalWrite(1,HIGH);

32. }

33. pox.setIRLedCurrent(MAX30100_LED_CURR_24MA);

34. }

35. void loop()

36. {

37. Blynk.run();

38. pox.update();

39. if (millis() - tsLastReport > REPORTING_PERIOD_MS) {

40. // to computer serial monitor

41. Serial.print("BPM: ");

42. Serial.print(pox.getHeartRate());

43. Serial.print(" SpO2: ");

44. Serial.print(pox.getSpO2());

45. Serial.print("%");

59
46. Serial.println("\n");

47. Blynk.virtualWrite(V4,pox.getHeartRate() );

48. Blynk.virtualWrite(V5,pox.getSpO2());

49. tsLastReport = millis();

50. }

51. }

52.
53.

60
Chapter 9

PROJECTVIEW

Figure 8.0

61
Figure 8.1

62
ADVANTAGES & DISADVANTAGES

ADVANTAGES
1 Low cost
2 Handy
3 Low powerd
4 It is used as life saving device
5 It is used as first aid
6 Can be used for differend age levels
7 Can be used if main ventilator failure
8 Can be used for the patients who are suffering from asthma/ lens related
problems

DISADVANTAGES

1. It can be only used as first aid canot be used as for further treatment
2. Pressure of the oxygen is less compared to main ventilator
3. Canot be used in high range areas (changes the pressure and humidity)

63
COST ANALYSIS

components Cost(Rs)
Atmega 328 500
12mhz crystal 8
22pf capacitor 3
7805 regulator 15
470uf capacitor 7
Glass epoxy pcb 250
Header pins 18
28 pin ic base 20
Potentiometer *2 30
Blue led 5
Pushbutton*2 30
Ambhu bag 1200
3d printed parts 2500
Acrylic outer body 1780
Node mcu 220
Max 30100 120
Dh 11 sensor 75
Connecting wires 50
20*4 lcd display 400
I2c module 80
Servo motor 250

Total 7561
discound -500
7061-/-

64
CONCLUTION

. This paper proposes, “Ventilator using Arduino with blood oxygen sensor for
covid19”, which automizes the manual operation of the ambu bag. There is a great
advancement in technology due to its features like low cost and ease of use. In
addition, this system reduces the manpower in the hospitals. The mistakes doneby
nurses and doctors while performing the manual operation can be reduced using this
system. A Menu can be updated every time based on the availability of food present in
the kitchen. This is an effective system to improve the performance of medical system.
Finally, we can conclude that this system will work perfectly and efficiently by solving
all issues faced by doctors and patients.

65
REFERENCE

1. 1low oxygen consumption pneumatic ventilator for emergency construction during a


respiratory failure pandemic, D. Williams S. Flory R. King M. Thornton J. Dingley, -
2008, DOI:10.1111/j.13652044.2009.06207.x

2. 2Design and Prototyping of a Low-Cost Portable Mechanical Ventilator, by Abdul


Mohsen Al Husseini1,Heon Ju Lee1, Justin Negrete1, Stephen Powelson1, Amelia
Servi1, Alexander Slocum1, Jussi Saukkonen, -2010 at MIT,
DOI:10.1115/1.3442790

3. Klein KR, Nagel NE (2007) Mass medical evacuation: Hurricane Katrina and
nursing experiences at the New Orleans airport. Disaster Manag Response. 2007
Apr-Jun;5(2):56-61

4. Tech. Digest Vol 25, Number 3 [6]. A low-cost ventilator for patients with COVID-
19.Vasan A, Weekes R, Connacher W, Sieker J, Stambaugh M, Suresh P, Lee DE,
Mazzei W, Schlaepfer E, Vallejos T, Petersen J, Merritt S, Petersen L, Friend
J.Med Devices Sens. 2020 Jun 5:e10106. doi: 10.1002/mds3.10106. Online ahead of
print.PMID: 32838208

5. ]. Masi: A mechanical ventilator based on a manual resuscitator with telemedicine


capabilities for patients with ARDS during the COVID-19 crisis.Chang J, Acosta A,
Benavides-Aspiazu J, Reategui J, Rojas C, Cook J, Nole R, Giampietri L, Pérez-
Buitrago S, Casado FL, Cataneda B.HardwareX. 2021 Apr;9:e00187. doi:
10.1016/j.ohx.2021.e00187. Epub 2021 Mar 3.PMID: 336815

66

You might also like