Working principal of spirometer
A spirometer measures how much air a person breathes in and out, and
       how quickly, to assess lung function. The working principle of a spirometer
       depends on the type of spirometry test being performed:
   Air flow
       A tube is placed in the patient's mouth or nose, and a sensor at the other
       end of the tube measures the air flow. The data is sent to a computer,
       which converts it into air volume in the lungs.
   Inert gas
       The patient breathes through a mouthpiece into a spirometer that
       contains a known amount of an inert gas, like helium. The concentration
       of the gas in the spirometer is monitored, and the ratio of the initial to
       final concentration is used to calculate the patient's lung volume.
   Chamber of water
       The spirometer is a tank of water with an air-filled chamber suspended in
       it. The patient breathes into and out of the chamber, which causes the lid
       to rise and fall. The distance the lid moves is used to calculate the volume
       of air inhaled and exhaled.
       A spirometry test can involve breathing normally, or it can require forced
       inhalation or exhalation after a deep breath. The patient may also be asked
       to inhale a different gas or medicine to see how it affects their test results.
       Spirometry
       Spirometers can be used to measure several parameters:
       FVC (forced vital capacity): The volume of air that can be exhaled after full
       inspiration.
       FEV1 (forced expiratory volume in 1s): The maximum volume of air that
       can be forcibly exhaled in the first second during an FVC maneuver.
       PEF (peak expiratory flow): The maximum flow (or speed) achieved
       during the maximally
       forced expiration initiated at full inspiration.
Additional parameters such as tidal volume, maximum voluntary
ventilation, flow-volume loops, and bronchial provocation can be
performed, depending upon the complexity of the unit.
System block diagram of a desktop spirometer.
Oximetry
The inclusion of pulse oximetry—which noninvasively measures oxygen
saturation in arterial blood—can enable diagnostic testing for asthma.
This capability can provide an all-in-one solution for walking tests; it also
makes the spirometer well suited for fitness testing in sports medicine.
Spirometer Solutions
Flow-Sensing Mechanism
Spirometers frequently use turbine transducers for flow measurement. In
this topology, a rotating vane spins in response to the airflow generated
by the subject. The revolutions of the vane are counted as they break a
light beam to determine airflow rate and volume.
Differential pressure sensors are sometimes used in place of turbine
transducers. Commonly referred to as pneumotachs, these designs can
measure low flow rates with high accuracy. An added advantage is cost:
because they are relatively inexpensive, pressure transducers enable the
implementation of disposable pneumotachs.
Front-End
For turbine-based spirometers, the front-end connecting the flow meter to
the microcontroller is relatively simple, since the signal coming from the
optical encoder can be easily managed by a Schmitt Trigger (Figure 1).
Figure 1. Typical front-end for a turbine transducer.
The front-end will be more complicated if a pressure sensor is used
(Figure 2). In this case, a signal conditioner is needed to compensate the
sensor output and remove the eventual offset. The resulting signal must
then be digitized by an analog-to-digital converter (ADC), which should
have a sampling rate of about 1ksps and at least 12 bits of resolution.
Microcontrollers that integrate a high-performance ADC are ideal for
these designs.
Figure 2. Typical front-end for a pressure sensor.
Connectivity
Desktop spirometers generally have a printer plus keyboard and include
several communication interfaces such as RS-232, USB, and Bluetooth®
for telemedicine purposes. Handheld spirometers typically use USB for
data transfer and battery charging; they can also include Bluetooth
capabilities.
USB and wireless connectivity options are important for managing
spirometry data and monitoring patients. They allow data to be
transmitted to a PC for storage, analysis, and transfer to healthcare
providers, when remote monitoring is required.
Power Supplies
Desktop spirometers are frequently line powered, although they normally
include lithium-ion (Li+) or nickel-metal-hydride (NiMH) rechargeable
batteries as well. They generally use a 6-cell battery pack, due to the high-
voltage requirements of thermal printers. Alternately, they can be
powered by USB, in which case a step-up converter is used to boost the 5V
to 9V. As shown in Figure 3, the OR-ing stage selects the source for the
LDOs, which are used to generate a 3.3V rail for logic and a 5V rail for
oximetry, if included.
Displays/Keyboards
Spirometers typically employ a full-color, backlit LCD to display patient
information, spirometry parameters, spirograms, and system information,
such as remaining battery life. Modern units increasingly use a touch
screen in combination with a graphical user interface (GUI) to make the
programming process more intuitive. Visible, audible, and haptic
responses to user inputs help designers improve the user experience.
Advanced touch-screen controllers from Analog Devices offer haptic
feedback, touch processing to reduce bus traffic, and autonomous modes
for precision gesture recognition.
For devices with keyboards or keypads, key switch can be managed by a
debouncer that provides electrostatic discharge (ESD) protection.
Integrated ESD protection can eliminate the need for discrete protection
components, while facilitating compliance with IEC 61000-4-2 ESD
requirements.