Emergency Blower-Based Ventilator with Novel-Designed Ventilation Sensor and Actuator

: The ventilator, a life-saving device for COVID-19-infected patients, especially for pneu-monia patients whose lungs are infected, has overwhelmingly skyrocketed since the pandemic of COVID-19 diseases started in December 2019. As a result, many biomedical engineers have rushed to design and construct emergency ventilators, using the Ambu-bag squeezing ventilator to compensate for the insufﬁcient ventilators supply. The Ambu-bag squeezing ventilator, however, suffers from the limitation of delivered tidal volume to the patient, the setting respiration rate and the noisy operational sound due to the movement of mechanic parts. The Ambu-bag based ventilator is, hence, not suitable for prolonged treatment of the patient. This paper presents a design and construction of a blower-based pressure-controlled ventilator for home-treatment COVID-19 patients featured with our novel-designed ﬂow and pressure sensor, electronic peep valve and proportional controlled valve. Our proposed ventilator can be programmed with the suitable parameter setting depending upon the weight, height, gender, and blood oxygen saturation (SpO 2 ) of the patients. This is useful in the current situation of COVID-19 pandemics, where trained medical staff is limited. The designed ventilator is also equipped with a safety mechanism, including an excessive-pressure-release valve, excessive ﬂow rate, overpressure, and over-temperature blower to prevent any hazardous event. A home ventilator server is also set where all ventilator parameters will be acquired and broadcasted for remote access of the health provider. The designed blower-based ventilator has been calibrated and evaluated with a lung simulator and standard ventilator tester, including alarmed functions, safety mechanism, sound level, and regulated pressure. The respiration output graph is complied with the simulation. The blower-based ventilator for home-treatment COVID-19 patients is suitable for life support, commensurate with the strict requirements of the FDA for life-support ventilators, and ready to be tested with animal subjects in the next phase.


Introduction
The new COVID-19 disease was first identified in China at the end of 2019 and rapidly spread worldwide. It has been projected that, by March 2021, the number of infections could reach 300 million cases and more than 2 million deaths. To prevent the rapid spread of COVID-19, many countries declare curfews, quarantine, and restrictions. It has been estimated that half of the world population will be under partial lockdowns or lockdowns by the middle of 2021. One of the main life-threatening symptoms of a COVID-19 patient is respiration failure that hampers lung oxygen exchange. A mechanical ventilator is necessary for such COVID-19 patients whose lung is impaired and unable to perform gas exchange normally. An overwhelming demand for mechanical ventilators has captivated researcher attention, especially biomedical engineers interested in temporally designing and constructing emergency ventilators to be used for COVID-19 patients with mild symptoms who are forced to be treated at home, as hospital faculties are running out of full capacity for severe-symptom COVID-19 patient admission.
A mechanical ventilator is a medical device that assists patients whose respiration system is impaired, resulting in difficulty breathing or shortness of breath. The principle of a mechanical ventilator is to control a high-pressure region that causes the air to flow into the pleural space and alveoli, which are lower-pressure regions, during the inspiration phase. During the expiration phase, ventilator is paused. Lung natural recoil, which creates higher pressure in alveoli, will cause the air to flow out. In general, a mechanical ventilator requires three fundamental components: (i) a source of high-pressure region, (ii) an automatic control of how air is delivered to the patient lung, and (iii) a mean of monitoring ventilator performance to assist patient respiration. A mechanical ventilator source of high pressure can be classified into two types, namely a compressor tank and a blower. A compressor-type ventilator is mostly used in the hospital, where a compressor pipeline is readily available. A blower-type ventilator is more portable and mainly used at home for patients under rehabilitation from injuries or conditions that cause respiration failure. The drawback of a blower-type ventilator is the noisy operating sound due to the turbine rotation in the blower. A noise level of 80-85 dBA can be observed in the blower-type ventilator. Automatic control of the ventilator controls the timing and amount of delivered air, and it can be classified into pressure control and volume control. In a pressure-control ventilator, the pressure will be regulated at a desired pressure during the setting time, and the amount of delivered air will be automatically adjusted according to lung compliance. The tidal volume is, hence, determined by lung compliance, circuit resistance, patient effort, and setting pressure. The pressure-control ventilator can prevent harmful pressure peaks and, therefore, any lung damage associated with ventilation. In a volume-control ventilator, the flow rate is kept constant while the airway pressure is varied. The tidal volume is guaranteed with a volume-control ventilator at the expense of variable airway pressures depending upon the inhaled tidal volume. The advantages of the volumecontrolled ventilator are the well-known technique and the controllable minute volume, which is the volume of air delivered in one minute. The drawback is the uncontrolled peak pressure that can cause damage to lungs and pneumothorax. Monitoring ventilator parameters is crucial in mechanical ventilators to ensure the ventilating performance of the patient. The monitor parameters typically include tidal volume, peak pulmonary pressure, respiratory rate, oxygen saturation, expired-air carbon dioxide content, and expired and inspired flow.
In our research, we developed a preprogrammed full-function blower-based emergency ventilator. The designed ventilator operates in pressure-control operation. Mandatorycontrolled and assist-controlled ventilation using a pressure-reduction sensor and flow sensor can be set in the proposed ventilator. Electronic-controlled positive end-expiratory pressure (PEEP) can be varied up to 20 cmH 2 O. All alarms similar to commercial ventilators can be set, including high/low-peak inspired pressure, high/low tidal volume, and low/high flow rate. To monitor lung oxygen exchange efficiency during using ventilator, our ventilator was equipped with a pulse oximeter to measure patient arterial saturation oxygen (SpO 2 ). The salient aspects and/or contributions of this paper are enumerated as follows: (1) This paper presents a development of a low-cost full-function blower-type emergency pressure-control ventilator which is based on proportional integral derivative (PID) control. (2) The proposed ventilator can be controlled and monitored remotely by using a WIFI or 4G network, making it suitable to be used during pandemics of a highly contagious disease. (3) Our proposed ventilator is designed to provide a fully functional ventilation operation suitable for life-support commensurate with the strict requirements of the FDA for life-support ventilators, even in a pandemic. (4) Our proposed blower-based ventilator is equipped with a pulse oximeter to monitor the treatment of the patient. (5) We introduce a novel-designed integrated flow and pressure sensor, electronic PEEP valve, and proportional controlled valve. We designed the sensor so that it can measure

Materials and Methods
The objective of our project was to design a blower-based ventilator that is compatible with commercial ventilator at an affordable price while promising safety issues. The designed ventilator is based on the pressure-control ventilator, where the pressure is maintained at constant by the application of proportional-integration-derivative (PID) control. Most of the components that we used in the designed and constructed ventilator must be found locally, except some parts, such as the blower fan, must be imported. The design step of the blower-based ventilator starts with scoping specification of the ventilator. Specification of our blower-based ventilator is as follows: (i) It is pressure-controlled ventilation; (ii) There are two ventilator modes, including continuous mandatory control (CMV) and assisted controlled mode (ACV); (iii) Peak inspired pressure range is 1-30 cmH 2 O; (iv) Respiration rate is 8-40 bpm; (v) I:E ratio is 1:1, 1:2, 1:3, 1:4, and 2:1; (vi) The fractional concentration of oxygen range (FiO 2 ) is 21-100%; (vii) Inspired time range is 0.5-3 s; (viii) Positive End Expiratory Pressure (PEEP) range is 5-20 cmH 2 O; (ix) Trigger mode is pressure and flow trigger; (x) The alarm is available for high/low-peak inspired pressure, high/low tidal volume, and low/high flow rate; (xi) The graph is available for pressure, flow, and volume; (xii) Remote control and monitor using web service are available.
With the required specification of blower-based ventilator, the design step can be categorized as follows.

Designed Ventilator Pneumatic Circuit Diagram
The pneumatic circuit of the mechanical ventilator is shown in Figure 1. Air from room atmosphere passing through air filter A is mixed with oxygen source p, of which mixing ratio can be adjusted. The mixing air is then passed to mixing chamber B. Next, the mixing air is pumped into the inspired circuit by blower C and the facial mask during the inspiration cycle. The inspired circuit consists of inspired pressure sensor D, inspired flow sensor E, inspired solenoid valve F, proportional valve G, pressure relief valve H, and humidifier I. During the expiration cycle, the expired air will pass through HEPA filter K, expired solenoid valve L, expired pressure sensor M, expired flow sensor n, and peep regulator valve O before being released into the atmosphere.
Pneumatic components that are associated with electronic circuit are oxygen source p, blower C, inspired pressure sensor D, inspired flow sensor E, inspired solenoid valve F, proportional valve G, humidifier I, expired solenoid valve L, expired pressure sensor M, expired flow sensor n, and peep regulator valve O. These components are described in Section 3.2. For pure pneumatic components, which include air filter A, mixing chamber B, pressure relief valve H, and HEPA filter K, details are described as follows.
(i) Air filter A: In a mechanical ventilator, an air inlet filter is used to remove all air contaminants, such as dust, spores, bacteria, viruses, and chemical compounds. The type of filter depends on the environment. In high-risk environments, such as laboratories, hospitals, and quarantine spaces, high-efficiency particulate air (HEPA) filters are recommended. For low-risk environments, efficient air filters (EPAs) or fine dust filters can be used. In the proposed ventilator, we used a fine dust filter as the air filter A that is capable of removing 10 µm particles more than 99%.
(ii) Mixing chamber H: A mixing chamber is used to mix filtered inlet air with oxygen. The concentration of oxygen in the gas mixture determines the fraction of inspired oxygen (FiO 2 ). When no additional oxygen is mixed in the ventilator, a fraction of inspired oxygen is 21%. The recommended volume of the mixing chamber is 1-2 L. Our mixing chamber is a clear acrylic cylindrical tube with a volume of 1 L. The proportion of the gas mixture is controlled by a proportional control valve (see Section 3.2.3).
(iii) Pressure relief valve G: In a mechanical ventilator, the excessive peak pressure entering the patient could result in traumatic lung injury. To prevent the incidence, a pressure relief valve was used. We used the pressure relief valve with a threshold 60 cmH 2 O.
(iv) HEPA filter K: To use the ventilator with COVID19 patients, a HEPA filter [11] is needed to remove all viruses from expired air before entering the ventilator and releasing the room air. A HEPA filter was, hence, used in our designed ventilator. Pneumatic components that are associated with electronic circuit are oxygen source p, blower C, inspired pressure sensor D, inspired flow sensor E, inspired solenoid valve F, proportional valve G, humidifier I, expired solenoid valve L, expired pressure sensor M, expired flow sensor n, and peep regulator valve O. These components are described in Section 3.2. For pure pneumatic components, which include air filter A, mixing chamber B, pressure relief valve H, and HEPA filter K, details are described as follows.
(i) Air filter A: In a mechanical ventilator, an air inlet filter is used to remove all air contaminants, such as dust, spores, bacteria, viruses, and chemical compounds. The type of filter depends on the environment. In high-risk environments, such as laboratories, hospitals, and quarantine spaces, high-efficiency particulate air (HEPA) filters are recommended. For low-risk environments, efficient air filters (EPAs) or fine dust filters can be used. In the proposed ventilator, we used a fine dust filter as the air filter A that is capable of removing 10 µm particles more than 99%.
(ii) Mixing chamber H: A mixing chamber is used to mix filtered inlet air with oxygen. The concentration of oxygen in the gas mixture determines the fraction of inspired oxygen (FiO2). When no additional oxygen is mixed in the ventilator, a fraction of inspired oxygen is 21%. The recommended volume of the mixing chamber is 1-2 L. Our mixing chamber is a clear acrylic cylindrical tube with a volume of 1 L. The proportion of the gas mixture is controlled by a proportional control valve (see Section 3.2.3).
(iii) Pressure relief valve G: In a mechanical ventilator, the excessive peak pressure entering the patient could result in traumatic lung injury. To prevent the incidence, a pressure relief valve was used. We used the pressure relief valve with a threshold 60 cmH2O.
(iv) HEPA filter K: To use the ventilator with COVID19 patients, a HEPA filter [11] is needed to remove all viruses from expired air before entering the ventilator and releasing the room air. A HEPA filter was, hence, used in our designed ventilator.

Designed Microcontroller and Electronic Part
The operation of our blower-based ventilator is controlled by a microcontroller and electronic part. For the ventilator microcontroller, we opt to use ESP32, which is a microcontroller board that has WIFI, Bluetooth, 16 analog inputs, 3 serial communication ports, a 16 MHz crystal oscillator, 2 I2Cs, and 4MB flash memory. There are four basic functions of microcontroller: (i) setting ventilator parameter, (ii) controlling inspiration and expiration phase, (iii) triggering alarm, and (iv) communicating with the ventilator webserver. The ventilator parameters that will be controlled by the microcontroller include peak inspired pressure, flow rate, PEEP, the fraction of inspired oxygen (FiO 2 ), and humidifier. The peak-inspired pressure and flow rate are controlled by varying the pulse-width modulation of blower motor drive. PEEP and fraction of inspired oxygen (FiO 2 ) are controlled by the proportional solenoid valve, which is also controlled by pulse-width modulation. The inspired air moisture is controlled by a humidifier. The humidifier, in turn, is controlled by a microcontroller, which is controlled by a water heating power. The inspiration and expiration timing are controlled by inspired and expired on-off 12-V solenoid valve. During the inspiration phase, the microcontroller sends the signal to turn on the inspired solenoid valve and turn off the expired solenoid valve. On the contrary, during the expiration phase, the microcontroller sends the signal to turn off the inspired solenoid valve and turn on the expired solenoid valve. The other function of the microcontroller behaves similar to a watchdog to trigger the alarm in the presence of the ventilator malfunction. There are five alarms for excessive peak-inspired pressure, excessive flowrate, excessive tidal volume, high respiration rate, and low respiration rate. The microcontroller also functions as a feedback controller to keep the pressure constant, as required by pressure-controlled ventilation. The feedback sensor used in the controller is the MPS20N0040D pressure sensor. The last function of the microcontroller is to communicate with the ventilator webserver.
Electronic components play an essential role in ensuring that the ventilator functions normally as a life support for COVID19 patients. Important electronic components are explained as follows.

Integrated Flow and Pressure Sensor
There are two types of sensors normally installed on a ventilator: (i) pressure sensor and (ii) flow sensor. These sensors are installed in both the inspired and expired flow circuits to monitor the pressure and flow of the inspired and expired air. A graph of pressure and flow rate can be derived and plotted on the monitor by continuously sampling pressure and flow rate with high sampling frequency. The 12-Bit ADC with a sampling frequency of 27 kHz was used for digitizing the pressure and flow signal. In addition, a graph of volume will also be provided by integrating the flow-rate graph. The commercial flow sensor [12,13] can be used to measure either the flow or sensor. We have designed an integrated flow and pressure sensor that can measure both flow and sensor, as shown in Figure 2a. Pressure sensors are used to sense a pressure in port P0. To measure flow rate, we used the principle of Venturi. In the Venturi principle, the flow rate of gas or fluid can be measured by reducing the cross-sectional flow area in the flow path. The pressure difference between two cross-sectional areas is directly related to flow rate that can be sensed with a differential pressure sensor via port P 1 and P 2 , as described in the following equation.
where Q is flow rate, A 1 is the diameter of Area 1, A 2 is the diameter of area 2, P 1 is the pressure of area 1, P 2 is the pressure of area 2, and ρ is gas density, respectively. MPXV5010DP differential pressure sensors [14] is used to measure flow, and MPS20N0040D pressure sensor is used to measure absolute pressure. The flow rate sensor can detect flow up to 180 L/min, while P 0 , the pressure, can sense up to 100 cmH 2 O. Our integrated flow and pressure sensor are shown in Figure 2b-d. In Figure 2b, port (i) is for the pressure sensor, while ports (ii) and (iii) are for flow sensor.

Blower
The blower used in the ventilator must be able to provide the maximum flowrate of 120 L/min or 2000 mL/s [15]. In most cases of ventilator setting, the I:E ratio is 1:2 at a respiration rate of 20 bpm. The volume in the inspired time of 1 s is tidal volume. The blower should be able to provide at least 60 L/min or 1000 mL/s, which is equivalent to a tidal volume of 1000 mL. Our blower can provide a flowrate of 1500 L/min. When the lower voltage is supplied to the blower fan, the lower flow rate and pressure can be derived. This can be performed by applying pulse-width modulation to the blower motor drive. Table 1 shows blower specifications. MPS20N0040D pressure sensor is used to measure absolute pressure. The flow rate sensor can detect flow up to 180 L/min, while P0, the pressure, can sense up to 100 cm H2O. Our integrated flow and pressure sensor are shown in Figure 2b-d. In Figure 2b, port (i) is for the pressure sensor, while ports (ii) and (iii) are for flow sensor. (a)

Blower
The blower used in the ventilator must be able to provide the maximum flowrate of 120 L/min or 2000 mL/s [15]. In most cases of ventilator setting, the I:E ratio is 1:2 at a respiration rate of 20 bpm. The volume in the inspired time of 1 s is tidal volume. The blower should be able to provide at least 60 L/min or 1000 mL/s, which is equivalent to a tidal volume of 1000 mL. Our blower can provide a flowrate of 1500 L/min. When the lower voltage is supplied to the blower fan, the lower flow rate and pressure can be derived. This can be performed by applying pulse-width modulation to the blower motor drive. Table 1 shows blower specifications.

Proportion Flow Control Valve
One of the other important contributions of this research is to design a reliable proportional valve. Our designed proportional control valve is shown in Figure 3a, where the servo motor is mounted on the ball valve. The servo motor is controlled by pulse-width modulation. By adjusting the pulse width, the rotational degree can be controlled. As the controlled knot of the ball valve is directly coupled with the ball valve, by adjusting the rotational degree of the servo motor, the ball orifice can be adjusted, and flow can be adjusted. We used a proportional valve to adjust the desired fractional concentration of oxygen (shown as "p" in Figure 1) to be mixed with air in the mixing chamber. Our designed proportional valve is shown in Figure 3. There are two proportional valves, which are the air proportional control valve and oxygen proportional control valve. The two proportional control valves are connected to air and oxygen sources and, hence, adjust the mixing ratio between air and oxygen, providing the oxygen concentration from 21 to 100%. The KE-25 oxygen sensor [16] is installed on the mixing tank to monitor the oxygen concentration of the gas mixture. The relation of oxygen concentration and the orifice of two proportional valves can be determined through a calibration process.

Electronic Peep Valve
Positive end-expiratory pressure (PEEP) is the pressure maintained at the end of the expiration phase to prevent the complete collapse of the alveoli. The benefit of PEEP is to reduce trauma to the alveoli and improve oxygenation. A PEEP valve is simply a spring-loaded valve that is against the patient's exhales. Our motorized PEEP valve uses the encoding DC motor mounted on the spring-loaded adjustable valve. The PEEP pressure can be adjusted in the range of 5-20 cmH 2 O. The rotational control is performed by mounting the encoding DC motor on the turning knob of the manual PEEP valve. The designed motorized peep valve is shown in Figure 4, consisting of 3 parts showing PEEP valve connected with motor-valve coupling part. justed. We used a proportional valve to adjust the desired fractional concentration of oxygen (shown as "p" in Figure 1) to be mixed with air in the mixing chamber. Our designed proportional valve is shown in Figure 3. There are two proportional valves, which are the air proportional control valve and oxygen proportional control valve. The two proportional control valves are connected to air and oxygen sources and, hence, adjust the mixing ratio between air and oxygen, providing the oxygen concentration from 21 to 100%. The KE-25 oxygen sensor [16] is installed on the mixing tank to monitor the oxygen concentration of the gas mixture. The relation of oxygen concentration and the orifice of two proportional valves can be determined through a calibration process.

Electronic Peep Valve
Positive end-expiratory pressure (PEEP) is the pressure maintained at the end of the expiration phase to prevent the complete collapse of the alveoli. The benefit of PEEP is to reduce trauma to the alveoli and improve oxygenation. A PEEP valve is simply a springloaded valve that is against the patient's exhales. Our motorized PEEP valve uses the encoding DC motor mounted on the spring-loaded adjustable valve. The PEEP pressure can be adjusted in the range of 5-20 cmH2O. The rotational control is performed by mounting the encoding DC motor on the turning knob of the manual PEEP valve. The designed motorized peep valve is shown in Figure 4, consisting of 3 parts showing PEEP valve connected with motor-valve coupling part.

Pulse Oximeter
To evaluate the patient's treatment, we equipped our ventilator with a pulse oximeter. The pulse oximeter model is an OEM YS2000A SpO2 module, shown in Figure 5a [17], that is capable of providing three parameters, including SpO2 (%), pulse rate(BPM), and body temperature (°C). The YS2000A SpO2 module provides a USB communication interface to transfer measured data. We used an ESP 32 microcontroller to interface with the YS2000A SpO2 module. The serial interfacing protocol via the USB port is shown in Figure  5b.

Pulse Oximeter
To evaluate the patient's treatment, we equipped our ventilator with a pulse oximeter. The pulse oximeter model is an OEM YS2000A SpO 2 module, shown in Figure 5a [17], that is capable of providing three parameters, including SpO 2 (%), pulse rate(BPM), and body temperature ( • C). The YS2000A SpO 2 module provides a USB communication interface to transfer measured data. We used an ESP 32 microcontroller to interface with the YS2000A SpO 2 module. The serial interfacing protocol via the USB port is shown in Figure 5b.

Ventilator Platform
All components in the ventilator diagram will be installed in the ventilator platform shown in Figure 6. The platform is divided into two compartments: (i) pneumatic compartment and (ii) electronic compartment. Electronic components and microcontroller will be installed on the movable box for easy maintenance in the electronic compartment. The main components in the pneumatic compartment, such as the blower, mixing chamber, and the proportional valve, will be locked to the chassis with a screw and nut. The other small components will be attached to the main components, and they are termed "attached main components". The connection between the attached main components or isolated main components is performed by a flexible silicon tube that is medically used for the ventilator.

Ventilator Platform
All components in the ventilator diagram will be installed in the ventilator platform shown in Figure 6. The platform is divided into two compartments: (i) pneumatic compartment and (ii) electronic compartment. Electronic components and microcontroller will be installed on the movable box for easy maintenance in the electronic compartment. The main components in the pneumatic compartment, such as the blower, mixing chamber, and the proportional valve, will be locked to the chassis with a screw and nut. The other small components will be attached to the main components, and they are termed "attached main components". The connection between the attached main components or isolated main components is performed by a flexible silicon tube that is medically used for the ventilator.

Ventilator Server for Remoted Control and Monitoring
The ventilator server for remote control and monitoring depicted in Figure 7 consists of 3 main parts: (i) ventilator acquisition and control system, (ii) ventilator webserver, and (iii) ventilator web client.
(I) Ventilator-Parameter Acquisition and Control System The function of the vital sign telemedicine acquisition and control system is to ac-

Ventilator Server for Remoted Control and Monitoring
The ventilator server for remote control and monitoring depicted in Figure 7 consists of 3 main parts: (i) ventilator acquisition and control system, (ii) ventilator webserver, and (iii) ventilator web client. To communicate the data from the ventilator acquisition and control system to the ventilator webserver and finally to the ventilator web client, we designed a communication package, as shown in Figure 8. There are two types of data: (i) inbound ventilator acquisition data and (ii) outbound ventilator control data. The inbound ventilator acquisition data are the data sent from ventilator acquisition and control system to ventilator webserver, which includes the plethysmogram, flow rate, pressure, and tidal volume to monitor the parameter on ventilator client web. The outbound ventilator control data are the data sent from the ventilator webserver to the ventilator acquisition and control system to control the function of the ventilator. The package header contains two bytes which are 0 × 77 0 × bb. Package ID integrates the ventilator data type. The package ID from 0 × 01 to 0 × 05 is for the plethysmogram, flow rate, pressure, and volume. The package content is for 1-byte real data. The checksum is for validation, and it is the sum of data from package ID to package content. For the inbound, one datum is set for four parameters (plethysmogram, flow rate, pressure, and volume) and it requires 20 bytes (5 bytes × 4 ventilator parameters). For the outbound, one datum is set for 11 parameters (respiration rate, I:E ratio, PEEP, peak pressure, ventilator mode, and six alarm-related parameters), and it requires 55 bytes (5 bytes × 11 ventilator parameters). Inbound data are sent continuously, but the outbound data are sent only when the user wants to adjust parameters. A sample of the broadcasting data is shown in Figure 9. To broadcast data, the package is sent to the client's browser if the client has logged in to the ventilator webserver.

(I) Ventilator-Parameter Acquisition and Control System
The function of the vital sign telemedicine acquisition and control system is to acquire ventilator parameters. These parameters are critical to monitor and control the ventilator remotely. The ventilator-parameter acquisition system will send four ventilator parameters, namely the plethysmogram, flow rate, pressure, and tidal volume waveform, to the ventilator webserver and receive the controlled parameters, including respiration rate, I:E ratio, peak pressure, ventilator mode, and alarm-related parameters. Serial communication (UART) is used as the communication protocol between the ventilator-parameter acquisition and control system and the ventilator webserver.
To communicate the data from the ventilator acquisition and control system to the ventilator webserver and finally to the ventilator web client, we designed a communication package, as shown in Figure 8. There are two types of data: (i) inbound ventilator acquisition data and (ii) outbound ventilator control data. The inbound ventilator acquisition data are the data sent from ventilator acquisition and control system to ventilator webserver, which includes the plethysmogram, flow rate, pressure, and tidal volume to monitor the parameter on ventilator client web. The outbound ventilator control data are the data sent from the ventilator webserver to the ventilator acquisition and control system to control the function of the ventilator. To communicate the data from the ventilator acquisition and control system to the ventilator webserver and finally to the ventilator web client, we designed a communication package, as shown in Figure 8. There are two types of data: (i) inbound ventilator acquisition data and (ii) outbound ventilator control data. The inbound ventilator acquisition data are the data sent from ventilator acquisition and control system to ventilator webserver, which includes the plethysmogram, flow rate, pressure, and tidal volume to monitor the parameter on ventilator client web. The outbound ventilator control data are the data sent from the ventilator webserver to the ventilator acquisition and control system to control the function of the ventilator. The package header contains two bytes which are 0 × 77 0 × bb. Package ID integrates the ventilator data type. The package ID from 0 × 01 to 0 × 05 is for the plethysmogram, flow rate, pressure, and volume. The package content is for 1-byte real data. The checksum is for validation, and it is the sum of data from package ID to package content. For the inbound, one datum is set for four parameters (plethysmogram, flow rate, pressure, and volume) and it requires 20 bytes (5 bytes × 4 ventilator parameters). For the outbound, one datum is set for 11 parameters (respiration rate, I:E ratio, PEEP, peak pressure, ventilator mode, and six alarm-related parameters), and it requires 55 bytes (5 bytes × 11 ventilator parameters). Inbound data are sent continuously, but the outbound data are sent only The package header contains two bytes which are 0 × 77 0 × bb. Package ID integrates the ventilator data type. The package ID from 0 × 01 to 0 × 05 is for the plethysmogram, flow rate, pressure, and volume. The package content is for 1-byte real data. The checksum is for validation, and it is the sum of data from package ID to package content. For the inbound, one datum is set for four parameters (plethysmogram, flow rate, pressure, and volume) and it requires 20 bytes (5 bytes × 4 ventilator parameters). For the outbound, one datum is set for 11 parameters (respiration rate, I:E ratio, PEEP, peak pressure, ventilator mode, and six alarm-related parameters), and it requires 55 bytes (5 bytes × 11 ventilator parameters). Inbound data are sent continuously, but the outbound data are sent only when the user wants to adjust parameters. A sample of the broadcasting data is shown in Figure 9. To broadcast data, the package is sent to the client's browser if the client has logged in to the ventilator webserver. (II) Ventilator Webserver Located at the patient's home, the ventilator webserver is operated in a Linux platform, using NodeJS. One patient server will have one URL. If the caretaker wants to access the patient server, he/she can open an internet browser to access a specific URL. Once logging in, the caretaker can access the patient monitor page. To monitor multiple patients, multiple internet browsers can be opened simultaneously. There are two main functions of the webserver. First, it communicates with the ventilator telemedicine acquisition system via serial communication. Second, it waits for the client to log in. Once the client logs in, it will broadcast the received data to the client via an index HTML file. The process of the ventilator webserver using Web Socket can be summarized as follows: • Step (i): Start serial communication protocol to establish serial communication with ventilator telemedicine acquisition system. • Step (ii): Start the Web Socket package to prepare for client connection via the setting port.

•
Step (iii): Wait for the client to connect.

•
Step (iv): If the client connects, broadcast the received data and start the index.html file.
(III) Ventilator Web Client The ventilator web client will initiate the index.html file. The inbound ventilator data are sent from sever to client via Web Socket. Once received, the ventilator data are decoded and plotted on the HTML canvas. The process of the ventilator web client using Web Socket can be summarized as follows. • Step (i): Prepare call-back function to run if there is data sent from the server by the Web Socket package.

•
Step (ii): If data are received, encode the data into separated parameters.
Plot the new flow rate, pressure, volume, and plethysmogram data on the prepared HTML canvas. Check if the plot reaches the end of the screen. If so, clear canvas and reset the trace to the beginning of the screen. The outbound command decoding process is performed similarly at ventilator-parameter acquisition and control system.

Preprogramed Initial Setting for Blower-Based Ventilator
Generally, using a ventilator requires well-trained personnel. However, in the current situation of the COVID-19 pandemic, there is a shortage of well-trained personnel. Hence, we designed the mentoring mode that will provide the suggested setting parame- (II) Ventilator Webserver Located at the patient's home, the ventilator webserver is operated in a Linux platform, using NodeJS. One patient server will have one URL. If the caretaker wants to access the patient server, he/she can open an internet browser to access a specific URL. Once logging in, the caretaker can access the patient monitor page. To monitor multiple patients, multiple internet browsers can be opened simultaneously. There are two main functions of the webserver. First, it communicates with the ventilator telemedicine acquisition system via serial communication. Second, it waits for the client to log in. Once the client logs in, it will broadcast the received data to the client via an index HTML file. The process of the ventilator webserver using Web Socket can be summarized as follows: • Step (i): Start serial communication protocol to establish serial communication with ventilator telemedicine acquisition system. • Step (ii): Start the Web Socket package to prepare for client connection via the setting port.

•
Step (iii): Wait for the client to connect.

•
Step (iv): If the client connects, broadcast the received data and start the index.html file.
(III) Ventilator Web Client The ventilator web client will initiate the index.html file. The inbound ventilator data are sent from sever to client via Web Socket. Once received, the ventilator data are decoded and plotted on the HTML canvas. The process of the ventilator web client using Web Socket can be summarized as follows.

•
Step (i): Prepare call-back function to run if there is data sent from the server by the Web Socket package.

•
Step (ii): If data are received, encode the data into separated parameters.
Plot the new flow rate, pressure, volume, and plethysmogram data on the prepared HTML canvas. Check if the plot reaches the end of the screen. If so, clear canvas and reset the trace to the beginning of the screen. The outbound command decoding process is performed similarly at ventilator-parameter acquisition and control system.

Preprogramed Initial Setting for Blower-Based Ventilator
Generally, using a ventilator requires well-trained personnel. However, in the current situation of the COVID-19 pandemic, there is a shortage of well-trained personnel. Hence, we designed the mentoring mode that will provide the suggested setting parameter to the caretaker. In this mode, the ventilator will suggest an initial ventilator parameter setting based on patient data, including weight, height, and gender. The algorithm in mentor mode is as follows [18]: Step (i): Input patient weight, height, and gender.
Step  Table 2. Step (vi): The ventilator is running at the setting parameter.

Ventilator Mode
The setting parameters in Section 3.4 will be applied in various ventilator modes. The designed emergency ventilator can operate in 2 ventilating modes as follows: (i) Continuous Mandatory Ventilation (CMV) This mode of the ventilator controls the respiration cycle for severe symptom COVID-19 patient whose respiration-control center does not function and patient in a coma. CMV model will control all parameters, including respiration rate, peak pressure, and I:E ratio delivered to the patient.
(ii) Assisted mode Ventilator (AMV Mode) The AMV mode is the mode with which the patient will determine the respiration rate. The onset of the inspiration phase is detected by measuring the inspiration flow, indicating that the patient tries to breathe in (spontaneous inspiration effort). All other ventilation parameters are set by the machine. The trigger of the onset of inspiration can use either pressure or flow sensor. To use a pressure sensor, the negative pressure due to the patient attempt to breathe in will be sensed. For the flow sensor, the direction and magnitude of flow will be sensed. Pressure-triggered inspiration can suffer from pressure drift and can cause auto trigger of inspiration. In this research, we used a flow sensor attached to the patient tube.

Ventilator Chassis and Assemble
Our designed ventilator is installed on the chassis of size 24 × 30 × 45 cm (width × depth × height), as shown in Figure 10. The chassis contains two chambers, which are an electronic chamber and a pneumatic chamber. In the pneumatic chamber, the blower and mixing chambers are mounted. A ventilator controller is installed in the electronic chamber. At the back end of the electronic chamber, a temperature probe and a pulse oximeter were installed on the back panel. The expiration and inspiration hoses are also mounted on the back panel of the electronic chamber. The microcontroller used in the ventilator controller is ESP32. There are two ESP32 microcontrollers used, namely the blower-controlled microcontroller and sensing and interfacing microcontroller (labeled as Q and R in Figure 1, respectively). The function of a blower-controlled microcontroller is to control the blower according to the setting parameter and the setting mode. Setting flow rate and pressure can be achieved by controlling the pulse-width modulation of the blower driver. The timing parameter, including the respiration rate and I:E ratio, can be controlled by the inspired and expired solenoid valve. Controlling the on time and off time of both solenoids directly affects the timing parameter. The tidal volume parameter is affected by both controlled pulse-width modulation and timing parameter. The blowercontrolled microcontroller and sensing and interfacing microcontroller will communicate through serial communication. The blower-controlled microcontroller will run the blower uninterruptedly according to the setting parameter and setting ventilator mode. At the end of each respiration cycle, the blower-controlled microcontroller will check for the command that is sent from the sensing and interfacing microcontroller via serial communication.
There are two functions of the sensing and interfacing microcontroller: The first function is to acquire the data from the pressure sensor and flow sensors installed in the inspiration path or expiration path. The second function is to communicate with webserver or android application. The sensing data will be sent to the webserver or android application to be displayed or plotted. At the same time, the sensing and interfacing microcontroller can receive commands set by the graphic user interface of the webserver or android application. The commands include ventilator on/off command, ventilator mode changing command, and ventilator-setting parameters. Figure 11 shows the webpage outlook of the webserver when the client logs in. Figure 12 shows the application outlook on an android phone written with app inventor [19], which consists of three pages: login page, database page, and ventilator interfacing page. The login page provided usage security. Only registered qualified personnel are allowed to log in. The database provides information about the patient. Firebase authentication and Firebase database [20] are used as the key features for the login page and database page. The ventilator interfacing page is the page that communicates with the sensing and interfacing microcontroller. The webserver also contains key features of authentication and patient database similar to android applications. The webserver and sensing and interfacing microcontroller communicate through a USB port. App Inventor and interfacing microcontroller communicate the Bluetooth of ESP32. inspired and expired solenoid valve. Controlling the on time and off time of both solenoids directly affects the timing parameter. The tidal volume parameter is affected by both controlled pulse-width modulation and timing parameter. The blower-controlled microcontroller and sensing and interfacing microcontroller will communicate through serial communication. The blower-controlled microcontroller will run the blower uninterruptedly according to the setting parameter and setting ventilator mode. At the end of each respiration cycle, the blower-controlled microcontroller will check for the command that is sent from the sensing and interfacing microcontroller via serial communication. There are two functions of the sensing and interfacing microcontroller: The first function is to acquire the data from the pressure sensor and flow sensors installed in the inspiration path or expiration path. The second function is to communicate with webserver or android application. The sensing data will be sent to the webserver or android application to be displayed or plotted. At the same time, the sensing and interfacing microcontroller can receive commands set by the graphic user interface of the webserver or android application. The commands include ventilator on/off command, ventilator mode changing command, and ventilator-setting parameters. Figure 11 shows the webpage outlook of the webserver when the client logs in. Figure 12 shows the application outlook on an android phone written with app inventor [19], which consists of three pages: login page, database page, and ventilator interfacing page. The login page provided usage security. Only registered qualified personnel are allowed to log in. The database provides information about the patient. Firebase authentication and Firebase database [20] are used as the key features for the login page and database page. The ventilator interfacing page is the page that communicates with the sensing and interfacing microcontroller. The webserver also contains key features of authentication and patient database similar to android applications. The webserver and sensing and interfacing microcontroller communicate through a USB port. App Inventor and interfacing microcontroller communicate the Bluetooth of ESP32.

Ventilator Model
Prior to the test with the lung simulator, we have conducted a mathematic model for the mechanical ventilator. Graph pf pressure, flow, and volume from the model are then used for a reference graph. Figure 13 depicts the ventilator model [21]. For a negligent ventilator compliance, Cv, the ventilator model can be approximately described by the following two first-order differential equations: where p(t) is the pressure source of the ventilator (mbar), Q(t) is the airflow (liter per minutelpm), R is the lung resistance (mbar/L/s), Rv is the ventilator related resistance, C is the lung compliance (mL/mbar), and p a (t) represents the airway pressure. The first-order differential Equations (2) and (3) can be solved for p a (t) and Q(t), yielding the following solution: where P 0 is maximum pressure of pressure source.
differential Equations (2) and (3) can be solved for ( ) and Q(t), yielding the following solution: ( ) = (1 − ( ) ), where P0 is maximum pressure of pressure source. During the expiration phase, pressure source, p(t), is diminished; hence, the ventilator model is replaced by the following two equations.

= ( + ) + ( ).
(4) The first-order differential Equations (11) and (12) can be solved for ( ) and Q(t), yielding the following solution: Figure 14 shows a simulation result for the lung model for pressure, flow, and volume. We simulated in two conditions. In Condition 1, ventilator-related resistance is not considered, whereas, in Condition 2, ventilator-related resistance is considered. We set the ventilator-related resistance at 12 mbar/L/s for Condition 2 [22]. The graph of volume is derived by integrating the graph of flow. The source pressure for the volume-control ventilator is 20 mbar or approximately 20 cmH2O. The respiration rate is 15 bpm, and the I:E ratio is 1:1. During the expiration phase, pressure source, p(t), is diminished; hence, the ventilator model is replaced by the following two equations. 0 = (R + Rv)C dp a dt + p a (t).
The first-order differential Equations (11) and (12) can be solved for p a (t) and Q(t), yielding the following solution: Figure 14 shows a simulation result for the lung model for pressure, flow, and volume. We simulated in two conditions. In Condition 1, ventilator-related resistance is not considered, whereas, in Condition 2, ventilator-related resistance is considered. We set the ventilator-related resistance at 12 mbar/L/s for Condition 2 [22]. The graph of volume is derived by integrating the graph of flow. The source pressure for the volume-control ventilator is 20 mbar or approximately 20 cmH 2 O. The respiration rate is 15 bpm, and the I:E ratio is 1:1.

Pressure Control Algorithm
Our pressure-control algorithm is based on proportional-integral-derivative (PID) control. It adjusts the output pressure (u(t)) depending on the present pressure error (e(t)), the accumulated pressure error in the past, and rate of change of the pressure error. The mathematical model for of PID pressure controller can be given as follows: where Kp is the coefficient of proportional term, Ki is the coefficient of integral term, and Kd is the coefficient of derivative term. The controller proportional gain (Kp) determines the ratio of output response to the error signal. The effect of Kp reduces the rise time, which is the time that the pressure output reaches the setting pressure and steady-state error. The Ki is responsible for speeding up the system toward acquiring desired values and eliminates the error due to proportional term. Kd reduces the overshoot caused by Kp and Ki. The determination of Kp, Ki, and Kd is a complicated process. We exploit the Ziegler-Nichols Method [22], where Ki and Kd are initially set to zero, while Kp is varied until the output pressure graph oscillates to pure sine waveform. The period of oscillation and optimal Kp are then used to compute Ki and Kd. Figure 15 shows PID pressure control diagram. To test the performance of PID pressure control, we set the pressure of the ventilator to 20 and 25 cmH 2 O; the airway was then deliberately blocked at the exit of the inspired valve. The PID control then compensates for the increased pressure by lowering the pulse width modulation (PWM) applied to the blower motor driver. The pressure is then stabilized. We compared the result with the non-PID control. Figure 16 shows the graph of pressure for the 20 and 25 cmH 2 O settings. Evidently, PID pressure control performs superior to non-PID pressure control and is able to stabilize the pressure in our pressure-control ventilator.
Electronics 2022, 10, x FOR PEER REVIEW 19 of 34 compliance of 0.060 L/mbar. Magenta is for lung resistance of 20 mbar/L/s and lung compliance of 0.075 L/mbar. The source pressure for volume control is 20 mbar. Respiration rate is 15 bpm, and I:E ratio is 1:1.

Pressure Control Algorithm
Our pressure-control algorithm is based on proportional-integral-derivative (PID) control. It adjusts the output pressure (u(t)) depending on the present pressure error (e(t)), the accumulated pressure error in the past, and rate of change of the pressure error. The mathematical model for of PID pressure controller can be given as follows: where Kp is the coefficient of proportional term, Ki is the coefficient of integral term, and Kd is the coefficient of derivative term. The controller proportional gain (Kp) determines the ratio of output response to the error signal. The effect of Kp reduces the rise time, which is the time that the pressure output reaches the setting pressure and steady-state error. The Ki is responsible for speeding up the system toward acquiring desired values and eliminates the error due to proportional term. Kd reduces the overshoot caused by Kp and Ki. The determination of Kp, Ki, and Kd is a complicated process. We exploit the Ziegler-Nichols Method [22], where Ki and Kd are initially set to zero, while Kp is varied until the output pressure graph oscillates to pure sine waveform. The period of oscillation and optimal Kp are then used to compute Ki and Kd. Figure 15 shows PID pressure control diagram. To test the performance of PID pressure control, we set the pressure of the ventilator to 20 and 25 cmH2O; the airway was then deliberately blocked at the exit of the inspired valve. The PID control then compensates for the increased pressure by lowering the pulse width modulation (PWM) applied to the blower motor driver. The pressure is then stabilized. We compared the result with the non-PID control. Figure 16 shows the graph of pressure for the 20 and 25 cmH2O settings. Evidently, PID pressure control performs superior to non-PID pressure control and is able to stabilize the pressure in our pressure-control ventilator.

Experiments and Results
We conducted a number of experiments, including PWM-tidal volume, PWM-minute volume, PWM-flowrate calibration test, ventilator timing test, pressure and flowrate sensing accuracy testing, noise-level measurement generated by the blower-based ventilator, and performance test on lung simulator. The details are as follows.

PWM-Tidal Volume, PWM-Minute Volume, and PWM-Flowrate Calibration
To calibrate the flow, volume, and pressure waveform, we have used VT Plus HF Gas Flow Ventilator Analyzer [23]. The testing setup can be performed into two configurations: (i) uni-directional circuit and (ii) bi-directional circuit. In the uni-directional circuit, only one inspiration valve is used. The inspired air from the ventilator is passed through the inspiration valve. The expired air from the patient is released through the exhalation valve (Ambu-bag valve). In the bi-directional circuit, the inspired air from the ventilator is passed through the inspiration valve. The expired air from the patient returns to the expiration valve of the ventilator. The test setup is conducted in the unilateral circuit where the output of our ventilator is connected to the ventilator analyzer, and the mechanically simulated lung is connected at the output of ventilator analyzer.
A number of calibration tests will be conducted to ensure that our blower-based ventilator meets the desired specification. The tests include (i) PWM-tidal volume, (ii) PWMminute volume, (iii) PWM-flowrate calibration, (iv) ventilator timing test, and (v) pressure and flowrate sensing accuracy testing. Details of each test are provided as follows.
The blower used in the research is the hall-sensor brushless type. The blower flow rate can be controlled by varying pulse width modulation (PWM) applied to the blower driver. A 12-bit DAC connected to ESP32 microcontroller was used to vary the PWM and, hence, speed of the blower. The relation between tidal volume and PWM is determined for various settings of I:E ratio and respiration rate or BPM by using VT Plus HF gas flow ventilator analyzer. The relation graph is shown in Figure 17a. Details of trace number ai for various I:E ratios and respiration rates are also provided in Figure 17a. The relation between PWM and tidal volume is mostly linear, except for trace a, where nonlinear relation can be seen at the high PWM. The graph of minute volume and PWM shown in Figure  17b was computed from the tidal volume and setting parameter, using the following equation:

Experiments and Results
We conducted a number of experiments, including PWM-tidal volume, PWM-minute volume, PWM-flowrate calibration test, ventilator timing test, pressure and flowrate sensing accuracy testing, noise-level measurement generated by the blower-based ventilator, and performance test on lung simulator. The details are as follows.

PWM-Tidal Volume, PWM-Minute Volume, and PWM-Flowrate Calibration
To calibrate the flow, volume, and pressure waveform, we have used VT Plus HF Gas Flow Ventilator Analyzer [23]. The testing setup can be performed into two configurations: (i) uni-directional circuit and (ii) bi-directional circuit. In the uni-directional circuit, only one inspiration valve is used. The inspired air from the ventilator is passed through the inspiration valve. The expired air from the patient is released through the exhalation valve (Ambu-bag valve). In the bi-directional circuit, the inspired air from the ventilator is passed through the inspiration valve. The expired air from the patient returns to the expiration valve of the ventilator. The test setup is conducted in the unilateral circuit where the output of our ventilator is connected to the ventilator analyzer, and the mechanically simulated lung is connected at the output of ventilator analyzer.
A number of calibration tests will be conducted to ensure that our blower-based ventilator meets the desired specification. The tests include (i) PWM-tidal volume, (ii) PWMminute volume, (iii) PWM-flowrate calibration, (iv) ventilator timing test, and (v) pressure and flowrate sensing accuracy testing. Details of each test are provided as follows.
The blower used in the research is the hall-sensor brushless type. The blower flow rate can be controlled by varying pulse width modulation (PWM) applied to the blower driver. A 12-bit DAC connected to ESP32 microcontroller was used to vary the PWM and, hence, speed of the blower. The relation between tidal volume and PWM is determined for various settings of I:E ratio and respiration rate or BPM by using VT Plus HF gas flow ventilator analyzer. The relation graph is shown in Figure 17a. Details of trace number a-i for various I:E ratios and respiration rates are also provided in Figure 17a. The relation between PWM and tidal volume is mostly linear, except for trace a, where nonlinear relation can be seen at the high PWM. The graph of minute volume and PWM shown in Figure 17b was computed from the tidal volume and setting parameter, using the following equation:

Ventilator Timing Test
Two microcontrollers have been used to control the blower-based emergency ventilator, namely the actuator microcontroller and sensor microcontroller. The two microcontrollers are interfaced with serial communication. The actuator microcontroller controls all actuators, including blower, expired solenoid valve, inspired solenoid valve, and mixing chamber proportional valve. The sensor microcontroller acquires sensing data from the flow sensor, pressure sensor, and pulse oximeter. The inspiration time and expiration A graph of the flow rate and PWM can also be derived from the tidal volume and setting parameter: where expired time and inspired time can be computed from the BPM and I:E ratio. In practice, the fitting graph will be used to adjust the PWM according to the setting parameters, which include peak pressure, BPM, and I:E ratio. We have used cubic polynomial to fit the graph between tidal volume, which is denoted as x, and PWM, which is denoted as y. The relation between x and y in cubic polynomial is in the following form: For a multiple input x and output y, Equation (11) can be written in matrix form as follows: Or where Given the n known point of x and y, the coefficient matrix can be computed by using minimized mean square error (MMSE): When setting the peak pressure, BPM, and I:E ratio, PWM can then be estimated by using Equation (11), using the computed coefficient (12). The computed PWM value is then applied to DAC. As pressure and airflow have a linear relation, the fitted airflow can be linearly mapped to pressure to acquire the setting pressure.

Ventilator Timing Test
Two microcontrollers have been used to control the blower-based emergency ventilator, namely the actuator microcontroller and sensor microcontroller. The two microcontrollers are interfaced with serial communication. The actuator microcontroller controls all actuators, including blower, expired solenoid valve, inspired solenoid valve, and mixing chamber proportional valve. The sensor microcontroller acquires sensing data from the flow sensor, pressure sensor, and pulse oximeter. The inspiration time and expiration time are controlled by setting delay time to turn expired solenoid valve and inspired solenoid valve. The blower control cycle of actuator microcontroller is explained as the following: The accuracy test of timing parameters, including inspired time and expired time, is given in Tables 3 and 4 for various respiration rates and I:E ratios. The percent error of inspired time and expired time is given as follows: where parameter is time. The error is averaged over ten measurements. The results demonstrate that the average error is less than 0.1%

Pressure and Flowrate Sensing Accuracy Testing
The flowrate and pressure acquired by the sensor microcontroller were evaluated for accuracy. Our flow sensor is based on the Venturi principle, as explained in Section 3.2.1.
To evaluate the accuracy of flowrate, we perform the testing procedure as follows: (i) Connect VT Plus HF gas flow ventilator analyzer inlet to the inspiration solenoid valve labeled as F in Figure 1. To evaluate the accuracy of pressure, we perform the testing procedure as follows: (i) Connect VT Plus HF gas flow ventilator analyzer inlet to the inspiration solenoid valve labeled as F in Figure 1.  Tables 5 and 6 respectively. The result demonstrates that the averaged error is less than 3% for both flowrate and pressure accuracy tests.

Noise-Level Measurement Generated by the Blower-Based Ventilator
The noise generated in the hospital, especially in the intensive-care unit (ICU), has drawn concern among hospital administrators, as it not only results in adverse effects for the patient treatment but also reduces the job performance of medical staff. The WHO recommends a night noise level of 30 dBA. The ICU peak sound level has been reported to be 90 to 101 dBA. The source of noise is mostly caused by the operation of medical devices. The noise generated by the ventilator during normal operation is approximately 85 dBA [24]. To evaluate the noise level of our proposed blower-based ventilator, we set up an experiment to measure the noise level around the ventilator by using a dBA meter during the operation of various loads. The maximum of noise was recorded. The result is shown in Table 7.

Performance Test on Lung Simulator
To ensure the safety operation of our proposed emergency blower-based ventilator, we tested the ventilator with the VT Plus High Flow ventilator and SmartLung 2000 lung simulator [25] shown in Figure 18. The SmartLung 2000 lung simulator, which is widely used to test the ventilator, offers adjustable compliances, i.e., 0.025, 0.060, and 0.075 L/mbar. Adjustable resistance can also be provided at 5, 20, 50, and 200 mbar/L/s. SmartLung 2000 is also featured with leakage valve to test for the airflow leakage. The uni-directional test setup configuration is shown in Figure 16. The SmartLung 2000 lung simulator will be set to vary lung resistance and lung compliance. We conducted four conditions, as shown in Table 8. The resulted waveforms of the ventilator are shown in Figures 19 and 20. The measured tidal volume of Conditions 1 and 2 is about 500 mL, whereas the measured tidal volumes of Condition 3 and 4 are approximately 800 and 1000 mL, respectively. The maximum measured airflow of all conditions is approximately ± 60 lpm. To test the performance of pressure control to stabilize the setting pressure, we conducted experiment by setting pressure to 20 cmH2O, lung resistance to 20 mbar/L/s, and lung compliance to 0.025 L/mbar. We then turned on the leakage valve of the SmartLung 2000 lung simulator and checked the ability to stabilize the pressure. Figure 21 shows the output graph of the stabilized pressure test.   To test the performance of pressure control to stabilize the setting pressure, we conducted experiment by setting pressure to 20 cmH 2 O, lung resistance to 20 mbar/L/s, and lung compliance to 0.025 L/mbar. We then turned on the leakage valve of the SmartLung 2000 lung simulator and checked the ability to stabilize the pressure. Figure 21 shows the output graph of the stabilized pressure test.

Discussion
In this research, we developed a low-cost pre-programmable full-function remotecontrolled and remote-monitoring blower-based ventilator to treat patients with lung infections. Despite the promising operating test of the designed blower-based ventilator, there are a number of issues that need to be discussed for the completeness of the manuscript.
(i) The material cost of the proposed blower-based emergency ventilator is approximately 400 USD, which is much cheaper than the full-scale ventilator used in the hospital. The average price of the full-scale commercial ventilator is 5000 USD. (ii) Compared with the MIT Ambu-bag emergency ventilator in Reference [2], where the tidal volume of 500 mL, which is limited by the volume of the Ambu-bag, can be delivered, the proposed blower-based emergency ventilator can provide a maximum tidal volume up to 600 mL and maximum minute volume of 7500 mL/min. Because there is no moving mechanical part, the proposed blower-based emergency ventilator operates in a less noisy environment than the Ambu-bag-based ventilator. The mode of ventilation in the proposed blower-based emergency ventilator that is provided is mandatory, and assisted modes are compatible with the full-function commercial ventilator. In safety measures, the proposed blower-based emergency ventilator uses the standard patient mask of Ambu-bag, which is equipped with a pressure-releasing valve, which will release the air when over-pressure is detected. The

Discussion
In this research, we developed a low-cost pre-programmable full-function remotecontrolled and remote-monitoring blower-based ventilator to treat patients with lung infections. Despite the promising operating test of the designed blower-based ventilator, there are a number of issues that need to be discussed for the completeness of the manuscript.

(i)
The material cost of the proposed blower-based emergency ventilator is approximately 400 USD, which is much cheaper than the full-scale ventilator used in the hospital. The average price of the full-scale commercial ventilator is 5000 USD. (ii) Compared with the MIT Ambu-bag emergency ventilator in Reference [2], where the tidal volume of 500 mL, which is limited by the volume of the Ambu-bag, can be delivered, the proposed blower-based emergency ventilator can provide a maximum tidal volume up to 600 mL and maximum minute volume of 7500 mL/min. Because there is no moving mechanical part, the proposed blower-based emergency ventilator operates in a less noisy environment than the Ambu-bag-based ventilator. The mode of ventilation in the proposed blower-based emergency ventilator that is provided is mandatory, and assisted modes are compatible with the full-function commercial ventilator. In safety measures, the proposed blower-based emergency ventilator uses the standard patient mask of Ambu-bag, which is equipped with a pressure-releasing valve, which will release the air when over-pressure is detected. The operating temperature is also monitored, which will stop the operation if the operating temperature exceeds the nominal limit.
(iii) To lower the cost of construction, carbon dioxide is not equipped in the proposed blower-based emergency ventilator. Only the oxygen sensor is installed. The displayed percent oxygen of the air in the mixing chamber, which is related to air proportional valve and oxygen proportional valve, is calibrated within the VT Plus HF gas-flow ventilator analyzer. (iv) The motorized peep valve can be used only in the bi-directional ventilating circuit by installing the valve at the expiration solenoid valve. In a uni-directional ventilating circuit, the exhalation valve is at the patient mask, making it difficult to install the motorized peep valve due to its weight. In the one-directional circuit, a manually controlled peep valve is used instead. (v) The proposed blower-based emergency ventilator, which is equipped with a pulse oximeter, is very suitable when the hospital-bed occupation is full. In such cases, patients with mild-to-severe symptoms are forced to be treated at home. The blood oxygen level of the patients can be monitored to evaluate the treatment condition. (vi) Our web application and mobile-phone android application offer security login using Firebase authentication. As a result, only authorized users will allow access to the webserver and/or the application. Moreover, the data sent via Web Socket and/or Bluetooth are encoded in confidential protocols that are not open to the public. This provides another security measure. (vii) Most of the components used in the construction of blower-based ventilators are available locally in the electronic and pneumatic market, including an MPX5010 differential pressure sensor, ESP 32 microcontroller, solenoid valve, acrylic mixing chamber, connecting air tube, pressure relief valve, and HEPA filter. However, some components need to be imported from a foreign country: KE-25 oxygen sensor, YS200A pulse oximeter, and blower. During the first wave of COVID-19 pandemics, the overwhelming global interest in designing emergency ventilators increased the demand for ventilator equipment significantly. Presently, due to the improved condition of COVID 19 pandemics worldwide, the demand is now back to normal. The shipping time of imported components from a foreign country takes about one week. (viii) One of the crucial safety mechanisms of the designed and constructed blower-based ventilator is the alarm system. The alarm system provided both vision and audio alarm. The setting alarms include an over-inspired pressure alarm, over-inspired flowrate alarm, low heart-rate alarm, and low SpO 2 alarm. To test the over-pressure alarm, the blower speed is varied and applied to the test lung. Observe until the measured pressure and flowrate reach the setting overpressure and over-flowrate alarm before the alarm goes off. (ix) The one-liter acrylic mixing chamber is considered too small to ensure mixing efficiency. The recommended volume should be two liters and should make from a stainless tube. A safety relief valve should also install in the mixing chamber to provide the safety mechanism. (x) The noise level of 80 dBA of blower is the maximum noise generated by the blower when operated at full capacity. In our blower-based ventilator, the blower runs at 50% capacity, and hence noise level is significantly decreased. The maximum sound level generated by our blower-based ventilator is 75.4 dBA, which is comparable to that of the commercial ventilator. (xi) The designed and constructed blower-based ventilator was successfully tested on the lung simulator and ventilator analyzer. The resulting waveform of the ventilator shown in Figures 17 and 18 is similar to the mathematic model in Figure 14b,d,e. The simulated tidal volume of Conditions 1 and 2 is about 500 mL, where the simulated tidal volume of Conditions 3 and 4 are approximately 1000 and 1200 mL. The measured tidal volume of Conditions 1 and 2 is about 500 mL, where the measured tidal volume of Condition 3 and 4 are approximately 800 and 1000 mL. The maximum flow of all conditions is approximately ±60 lpm. The error between the model and the real measurement may be caused by the underestimated resistance related to the ventilator. (xii) Our proposed blower-based ventilator is based on pressure control. In pressure control, the device will constantly set at the specific pressure. The volume of air flowing to the patient's lung, i.e., tidal volume, will adapt automatically depending upon lung compliance. In COVID-19 patients whose lungs are complicated by acute respiratory distress syndrome (ARDS), lung compliance decreases, and the pressure-control ventilator will automatically adjust the tidal volume such that less amount of volume is delivered to the patient. By contrast, in the volume-controlled ventilator, the fixed tidal volume is delivered to the patient. This may cause a hazardous event, especially in the case where lung condition is not known. Although pressure-controlled ventilator improved comfort for the patient who breathes spontaneously, there are some disadvantages for pressure-controlled ventilator. The uncontrolled tidal volume, especially the sudden change in lung compliance, may lead to hyperventilation and volutrauma, resulting in permanent lung and brain damage. Insufficient tidal volume is also detrimental and may develop when lung compliance or spontaneous respiratory effort decreases. The only concern of pressure control is to ensure that the setting pressure does not exceed the actual pressure. Moreover, all ventilators, including those installed in our blower-based ventilator, are equipped with pressure relief valves. In the case when the pressure accidentally increases, the excessive pressure will be released into the room atmosphere, and, hence, it will prevent the hazardous event. Another protection is by using an alarm system. The high-pressure limit can be set to send the notification to the caretaker when overpressure is detected. Experiments on the alarm system were performed intensively to ensure that the alarm system works normally. Hardware protection is also used to provide another preventive measure. By limiting the maximum supply, the pulse width modulation control, of the blower, the blower is not run at its full capacity. Even though the blower can provide pressure of up to 100 cmH 2 O, by limiting the power supply of the blower, the maximum pressure is limited only 30 cmH 2 O. The temperature of the blower is also always monitored by the attached temperature sensor. In case the temperature of the blower is over 40 degrees Celsius, the blower will be stopped. In normal operation, the blower temperature is around 30-37 degrees Celsius when operated overnight. (xiii) The designed ventilator is a pressure-controlled type. The applied pressure will hold fixed, and the tidal volume will automatically adjust depending on lung compliance. To avoid excessively high tidal volumes, however, the setting pressure should be started at a relatively low level (usually <20 cmH 2 O), and inspiratory time should be relatively short (usually <1.25 s in adults). Careful adjustment of setting pressure can be performed while observing the changes in tidal volume and respiration graph. The optimal pressure setting will be the point where further increasing pressure results in an insignificant change in tidal volume. (xiv) Our emergency blower-based ventilator is based on the pressure-mode ventilator in which the pressure will be regulated at a desired constant pressure during the setting time, and the amount of delivered air will be automatically adjusted according to lung compliance. This is crucial for COVID19 patients, whose lung compliance decreases, which may be due to acute respiratory distress syndrome (ARDS). Pressurecontrolled ventilator will control the appropriate setting of tidal volume automatically. The performance of the pressure-mode blower-based ventilator to sustain a desired constant pressure using SmartLung simulators that is capable of mimicking flow leaking, as shown in Figure 21, demonstrates promising results.

Conclusions
As the number of COVID-19-infective cases becomes significantly increased, 80% of the hospital facilities and services are prioritizing and running for COVID-19-related diseases. Patients with mild COVID-19 symptoms or other diseases are then forced to be treated at home. This research concerned the design and construction of a blower-based emergency ventilator that can be used for patients with mild lung infection. Our designed emergency ventilator has four key features. First, our designed blower-based ventilator emergency ventilator is programmable with the suitable parameter setting depending upon patient weight, height, sex, and percent blood oxygen (SpO 2 ). This is useful in the current situation of COVID-19 pandemics, where trained medical staff is limited. Second, we introduce a novel-designed integrated flow and pressure sensor, electronic PEEP valve, and proportional controlled valve that can be used efficiently, replacing the expensive commercial components. Third, our designed emergency ventilator can be operated remotely via a webserver. Designed to operate on a Linux operation system, the ventilator webserver will broadcast sensor information sent by the ventilator microcontroller to the ventilator web client, using the Web Socket package, and send commands from client webpage to microcontroller. Fourth, the designed ventilator is a fully functional ventilation operation suitable for life support commensurate with the strict requirements of the FDA for life-support ventilators, even in a pandemic. Lastly, the designed emergency ventilator is equipped with a pulse oximeter that is capable of measuring present oxygen saturation, heart rate, and temperature. The last feature acts as the built-in patient monitor, which is essential to evaluate the treatment for COVID-19 patients. To ensure that the designed blower-based ventilator meets the safety and standard measures, we conduct a number of calibrations and tests, including pressure accuracy test, flow accuracy test, inspired time and expired time accuracy test, operating sound level test, operation test on lung simulator, and robustness test for pressure control. The error tolerance of the pressure-accuracy test and flow-accuracy test is less than 5%. The inspired-time and expired-time accuracy tests provide an error less than 0.05%. The operation sound level is comparable to that of the commercial ventilator, with less than 80 dBA. The performance of pressure-stabilized test using the VT Plus Hi Flow Ventilator analyzer and SmartLung 2000 confirms the robustness to regulate pressure of the designed blower-based ventilator. Although the designed blower-based ventilator was successfully tested with smart lung with a satisfactory result, the further test with live animal subjects should be conducted in the next phase to ensure the safe use on COVID-19 patients.

Conflicts of Interest:
The authors declare no conflict of interest.