Escolar Documentos
Profissional Documentos
Cultura Documentos
To cite this Article Burunkaya, M. and Guler, I.(2006) 'A Microcontroller Based, Low Cost Oxygen Gas Controller for
Medical Purposes', Instrumentation Science & Technology, 34: 5, 509 — 527
To link to this Article: DOI: 10.1080/10739140600806039
URL: http://dx.doi.org/10.1080/10739140600806039
This article may be used for research, teaching and private study purposes. Any substantial or
systematic reproduction, re-distribution, re-selling, loan or sub-licensing, systematic supply or
distribution in any form to anyone is expressly forbidden.
The publisher does not give any warranty express or implied or make any representation that the contents
will be complete or accurate or up to date. The accuracy of any instructions, formulae and drug doses
should be independently verified with primary sources. The publisher shall not be liable for any loss,
actions, claims, proceedings, demand or costs or damages whatsoever or howsoever caused arising directly
or indirectly in connection with or arising out of the use of this material.
Instrumentation Science and Technology, 34: 509–527, 2006
Copyright # Taylor & Francis Group, LLC
ISSN 1073-9149 print/1525-6030 online
DOI: 10.1080/10739140600806039
Abstract: In this work, an oxygen gas concentration controller circuit is designed and
implemented for use in medical applications such as incubator environments. Since the
air of the incubator environment is dried during the control processes, oxygen gas flow
is humidified by the designed ultrasonic nebulizer. A polarographic type oxygen gas
sensor was used. A signal conditioning circuit was developed to capture the required
voltage levels. Control processes have been performed by a high speed PIC micro-
controller. Set values can be entered either via an embedded control circuit or via a
keyboard. The system is linear, sensitive, and relative error is only about 21 O2%.
All of the parts of the system are renewable. As a result, a low cost and effective
microcontroller based circuit, modular in structure, has been provided.
INTRODUCTION
There are many oxygen (O2) meters. However, the need for controlling O2
levels in any environment, such as in industry or for medical purposes, has
grown continuously.
A low cost, small, disposable or continuously usable oxygen gas sensor is
needed for patient observation, gas level determination in anesthesia, during
the surgical operation to be able to observe oxygen levels in blood. Thus,
there are research and development studies aimed at making small size
509
510 M. Burunkaya and I. Guler
sensors and to make them suitable for mass production. This situation caused
the development of many specific oxygen sensors.[1 – 3] High pressure and
high temperature levels are required for some of the O2 sensors to work, so
that it is not suitable for measurents in ambient conditions. Since some of
these sensors are not suitable for continuous measurement, there have been
some studies to develop sensors for continuous observation.[1] Since the
lifetimes of some of these sensors are short, their costs might be very
expensive.[4] In addition to the sensor selection for the designed measurement
circuit, design and construction of the proper controller unit is another
important task. There are many types of controller circuits that are used,
e.g., fuzzy logic, PID, etc., control methods. For example, a fuzzy logic
control method cannot be effectively realized without a computer and a data
Downloaded By: [INFLIBNET India Order] At: 07:45 4 May 2011
EXPERIMENTAL
A low cost, effective oxygen gas concentration controller that can be used for
medical purposes is required to be developed for the health of a patient, so that
the best sensor was determined. First, oxygen sensors were researched
generally. Then, their features, structures, and the required polarization
methods were researched for providing proportional voltage levels that
depend on the physical value. Then, a high speed and high performance con-
troller circuit was developed with isolation included. Then, the developed
system and a PC were combined to communicate with each other by using
an RS 232 protocol. Then, performance tests of the developed system were
performed.
Microcontroller Based Oxygen Gas Controller 511
O2 Sensors
There are many types of oxygen analyzers for use with continuous
processes.[2] Classified, working principles and usage limiting factors of
these are discussed in the following.
Paramagnetic Analyzers
For the sensor to be able to work, a current is passed through the sensor
and, then, the sensor is heated. The heater raises its temperature, thereby
reducing the magnetic property of the O2 molecules. Its use is not practical.[2,8]
Clark cell sensors are polarographic types which are a specific type of electro-
chemical sensors. There are two kinds of electrochemical sensors, i.e., galvanic
and non-galvanic. Galvanic sensors gives voltage levels at the output in direct
proportion to the O2 level. Conversely, a non-galvanic sensor can provide
output current indirectly if only polarization voltages are supplied to it.
512 M. Burunkaya and I. Guler
A sensor which has polarographic type Clark cell model was used in the
measurement circuit. The structure and cross section of the sensor are shown
in Figure 1. A Clark cell is an electrochemical cell. It was insulated from the
unknown solution (or measurement environment) by a diffusion barrier
(membrane). The sensor also contains a small ‘0’ ring, a protective cover,
and a known solution (electrolyte) which includes a platinum and a Ag –
AgCl electrode (as active and reference electrodes). Salt water or neutral
potassium chloride can be used as an electrolyte.[8] The main body was
made of high density polyethylene. The cell is covered with a membrane
which is permeable to oxygen molecules. Since the thickness of the
membrane can be controlled easily, generally silicon or teflon membrane are
used in the sensor structure. If the thickness of the membrane or electrolyte
is increased, the response time of the sensor increases, while its output
Downloaded By: [INFLIBNET India Order] At: 07:45 4 May 2011
Features Ceramic-oxide sensor Micro-fuel cell Open cathode cell Polarographic sensor
513
514 M. Burunkaya and I. Guler
Figure 1. The structure and cross section of the sensor to be used in the Clark cell
model.
Downloaded By: [INFLIBNET India Order] At: 07:45 4 May 2011
current and sensitivity decrease.[8] Some researchers suggest that the diameter
of the electrode also affects the linearity. According to some researchers, the
course of diffusion would be different with a change in the characteristic of
the membrane, if polarization was with a pulse instead of DC voltage.[6]
Figure 2. The polarization circuit for the sensor: (a) voltage output (b) current output.
Microcontroller Based Oxygen Gas Controller 515
Oxygen atoms combine with hydrogen atoms in the internal gas to produce an
electric current, as shown in equation (1).[2,8]
4e þ O2 þ 2H2 O ! 4OH ð1Þ
At the end of the anodic reaction, silver ions occur, as shown in equation (2).
Ag þ Cl ! AgCl þ e ð2Þ
þ 2
At the same time, Ag ions combine with Cl ions in the chemical reaction
and AgCl is obtained, as represented in equation (3). The reaction can be
defined as the following form:
4Agþ þ O2 þ 2H2 O þ 4Cl ! 4AgCl þ 4OH ð3Þ
Downloaded By: [INFLIBNET India Order] At: 07:45 4 May 2011
Four electrons (e2) flow from the power supply for each O2 molecule.
This reaction occurs only for 0.3 –0.4 V levels of the battery voltage. After
this, it begins to increase. The chemical reaction is the fastest at an 0.5 V
level and continues free from voltage up to 0.8 V. If the higher voltage
levels are applied to the electrodes, it causes electrolysis of the water and
this yields oxygen and hydrogen gases around the electrodes.
The current-voltage relationship of the O2 electrode for four different O2
levels are shown in Figure 3.[2,8] Current that flows between the electrodes is a
linear function of oxygen concentration in the electrolyte.[12] After the half
reaction is completed, a transposition between the hydroxyl (OH2) and
chloride (Cl2) ions is concluded. As a result, the electrolyte and membrane
must be renewed or changed. The lifetime of the sensor may vary from 1– 2
hours to 1 –2 months, depending on the design of the sensing membrane. If
a measured gas is dry, its lifetime must be increased. Since the electrolyte
volume of the sensor is also small, water in the electrolyte evaporates more
quickly and the electrolyte becomes dry.[8]
DEVELOPED SYSTEM
Measurement Circuit
the reference electrode changed, measurement result had some errors. Thus,
this method was not used. To solve this problem, the more the resistance
value to the measured current becomes decreased, the better it is. But, this
can affect the linearity of the sensor and output voltage level can decrease sig-
nificantly. In this case, the output voltage levels have to be increased to a
useful level. As the output of the measurement circuit produces voltage
levels, the output signal may yield a somewhat noisy signal.
As a best solution for this circuit design problem, the output current of
the sensor was directly applied to an op-amp current-to-voltage converter, as
shown in Figure 2(b). Thus, three main advantages were realized. First, the
sensor could be located at a greater distance, unless the output signal was
exposed to noise, and there is no need for amplification. Secondly, the
response time is faster and linearity is better because of the light loading con-
straint. Thirdly, the offset voltage level of the amplifier can be minimized.
Since the active electrode is polarized directly in this circuit design, the
polarization voltage was chosen, again, as 20.75 V, which is the best
value. As was expressed previously, the output of the sensor depends on
temperature. When the temperature is increased by 18C, it causes an
increase of output level of the sensor of 2.5%. In other words, the sensor
has a positive temperature coefficient. Therefore, in addition to a temperature
compensation circuit, the amplifier circuit that can provide an adjustable
offset value and zero and span adjustment circuits, which are necessary for
measurement, are added.
The last circuit design of the measurement circuit is shown in Figure 4.
The polarization voltage of the electrodes was obtained by using an LM
336 integrated circuit (IC) as a voltage reference supply. Since long term
stability of the LM 336 IC reference supply is about 20 ppm 8C21 and can
provide 10 mA output current, a stable reference voltage is provided.[13]
Grounds are used as common. Output voltage of the first stage is
determined from equation (4).
VO1 ¼ I R1 ð4Þ
Downloaded By: [INFLIBNET India Order] At: 07:45 4 May 2011
518
M. Burunkaya and I. Guler
Figure 5. Block schematic of the O2 gas controller and the controlled environment.
Microcontroller Based Oxygen Gas Controller 519
While the input level is zero (0% O2 level), the output level of the measure-
ment circuit is adjusted to zero volts by using the ‘offset’ trimpot and,
while the input level is at a maximum value, the output level is adjusted to
5 V by using the ‘Gain’ trimpot. Thus, zero and span value adjustments of
the measurement circuit depends on the input physical gravities.
The power supply, which provides þ9 V and 29 V sources, is required for the
system operation. The O2 controller can be operated by the main power or, if it
is necessary, the power can be supplied with batteries. Thus, either a portable
520 M. Burunkaya and I. Guler
and the maximum values of the input physical gravities, respectively, and
output of the measurement circuit was set to 0 V and 5 V, respectively.
Measurement results are presented in Table 2 and, according to this, input-
output characteristics of the measurement circuit is as shown in Figure 6.
Measurement results show that its input-output characteristics were linear.
0 0.00 20 mV
1 20.78 300 mV
2 21.5 0.7
3 22 1.37
4 22.4 1.4
5 22.895 2.14
6 23.39 2.3
7 24.4 2.64
8 25 3.0
9 25.8 3.6
10 26.3 4.1
11 27.0 4.7
12 28.0 5.00
Microcontroller Based Oxygen Gas Controller 521
Downloaded By: [INFLIBNET India Order] At: 07:45 4 May 2011
Temperature changes can cause variation of the physical values on the whole
materials. This situation is also a very important problem, especially of the
measurement tools. Temperature compensation was provided with an ntc
used for the measurement processes. Measurement results are shown in
Figure 7 before temperature compensation was provided and after it was
provided. They show that temperature effects have been decreased at the
measurement processes after compensation.
Determination of the Response Time of the Sensor and O2 Controller
Figure 8. Characteristic of the O2 controller when the power is first on, and determin-
ing the response time of the O2 sensor.
Microcontroller Based Oxygen Gas Controller 523
result, the controller circuit is much faster than the reference meter and it is
also faster than the other oxygen sensors for which the features had been pre-
viously given in Table 1. Conversely, the reference O2 meter was very slow
and reached a stable value of 17% O2 in 2 minutes. Since the data logger has
a large value of sample and hold capacitance, and a large amount of
sampling has been provided, there are many fluctuations of the output
characteristics. This causes to oscillations and instability on the output
voltage of the measurement circuit. Thus, driving of the O2 valve became
unstable and the O2 level in the control environment exceeded the
maximum set value. As a result, the minimum value of the last ten measure-
ments was recorded and the control processes have been performed
according to this software of the PIC. Since this overshoot problem had con-
Downloaded By: [INFLIBNET India Order] At: 07:45 4 May 2011
Since the high level of O2 is easily provided in the limited volume of the
environment, the performance test of the developed system has been done
in the incubator environment as shown in Figure 5. However, the O2 controller
can be used in any limited or unlimited volume of environment. Since the air
of the incubator environment became dried during the control processes,
oxygen gas flow is humidified by an ultrasonic nebulizer.[15 – 17]
Performance test results of the controller for the set value over 50% O2
are shown in Figure 9. Measurement values of the controller and reference
meter are displayed, respectively, as 45% O2 after 12 s and 42% O2
5 minutes later.
Stability Test of the O2 Controller After its Sensor Had Been Left from
the Middle Level of O2 Concentration Environment to a Low Level
After the performance test of 50% O2 had been finished, the sensor of the
controller was exposed to a normal atmospheric condition. The output
value of the measurement circuit dropped to 1.05 V and a value of 21%
O2 was displayed on the LCM in 10 s. At the same time, values of 26%
O2 was displayed on the LCM of the reference O2 meter. This shows that
the controller circuit is faster than reference meter when same type of O2
sensor is used.
524 M. Burunkaya and I. Guler
Downloaded By: [INFLIBNET India Order] At: 07:45 4 May 2011
The O2 controller sensor and the reference meter were exposed to a 100% O2
level in the incubator environment. Then, the O2 tube valve was closed. Five
minutes later, the output value of the measurement circuit was measured
as 1.35 V, and 27% O2 was displayed on the LCM, as shown in Figure 10.
At the same time, a value of 28% O2 was displayed on the LCM of the
reference O2 meter. This shows that the measurement results of the
reference O2 meter are reliable, but slow. According to these results, the
developed system has operated correctly.
Figure 10. Stability test of the O2 controller after the high O2 concentration test was
done.
Microcontroller Based Oxygen Gas Controller 525
output is linear, and the offset value is low. The response time of the O2 con-
troller circuit was determined to be 5.5 s. This is the fastest response time for a
polarographic type of sensor. For example, the designed system is about 12
times faster than reference meter in which the same type of sensor has been
used. Measurement results show that relative error of the measurement
circuit is about 21% O2 in the range of 0 – 100% O2. This error was
reduced at the output of the measurement circuit by adjusting the gain of
the amplifier circuit. The developed system can be used for measurement in
ambient temperature conditions and there is no need for a high temperature
level. Since the measurement processes are affected by temperature
changes, required temperature compensation has been accomplished by
using an NTC.
Since the designs of measurement and control circuit are modular, they
can easily be used for either measurement or control processes alone. In
addition to these, since the measurement unit produces an electrical output
which depends on the physical gravity, it is compatible for use with other
embedded or separated control systems. Control processes were performed
by a high performance, high speed PIC microcontroller. The O2 controller
can also be controlled by a computer, using an RS232 protocol. Measurement
results show that the developed system is very sensitive to O2 changes. The
controller circuit has a resolution of 1 1021% O2. Additionally, it is very
fast, as explained above, due to the PIC and its measurement circuit.
The most important disadvantage of the measurement device is that the
calibration of the Clark cell model sensor may change with time and, since
the membrane and electrolyte of the sensor lose their characteristics with
time, periodic maintenance is required. But, this is the main problem of the
measurement instruments which work according to a voltaic cell principle
that shows its similar working performance and its output voltage is
obtained directly. Also, the cost of these sensors is very high and their
lifetimes are very short. By contrast, the lifetime of the Clark cell type
sensor is unlimited, in theory. Therefore, the cost of the developed system
is very low. Additionally, the sensor can be redesigned and reproduced. In
this case, the cost will be decreased even further.
526 M. Burunkaya and I. Guler
REFERENCES
3. Culshaw, B. Optical system and sensors for measurement and control. J. Phys.
E: Sci. Instrum. 1983, 16, 978– 986.
4. Alphasense Ltd. 2005, O2-A1 Oxygen sensor. Available online at: http://www.
alphasense.com/Product%20page/Products/pdf/PDF%20tech%20data%20sheets/
O2A1.pdf.
5. Lin, S.C.; Luo, C.H.; Yeh, T.F. Fuzzy oxygen control system for the indirect
calorimeter of premature infants. J. Med. Eng. Technol. 2001, 25, 149– 155.
6. Short, D.L.; Shell, G.S.G. Fundamentals of clark membrane configuration
oxygen sensors: some confusion clarified. J. Phys. E: Sci. Instrum. 1984, 17,
1085 –1092.
7. Tehrani, F.; Rogers, M.; Lo, T.; Malinowsky, T.; Afuwape, S.; Lum, M.;
Grundl, B.; Terry, M. Closed loop control of the inspired fraction of oxygen in
mechanical ventilation. J. Clin. Monit. Comput. 2003, 17, 367– 376.
8. Lauer, J. 2003, Sensors for gas phase oxygen analyses. Available online at: http://
www.teledyne-ai.com/pdf/lauer.pdf.
9. Fairchild Semiconductor Corporation, 2005, General Purpose 6-Pin Phototransis-
tor Optocouplers. Available online at: http://www.fairchildsemi.com/ds/4N/
4N25.pdf.
10. Doebelin, E.O. Measurement Systems Application and Design; McGraw-Hill Book
Company: New York, USA, 1983, 876.
11. Kuesner, A. Indirect application of a membrane-covered electrochemical clark cell
sensor for the determination of molecular oxygen in gaseous, liquid or solid
samples. J. Phys. E: Sci. Instrum. 1987, 20, 224– 230.
12. Toma-Daşu, I.; Waites, A.; Daşu, A.; Denekamp, J. Theoretical simulation of
oxygen tension measurement in tissues using a microelectrode: I. The response
function of microelectrode. Physiol. Meas. 2001, 22, 713– 725.
13. National Semiconductor, 2003, LM136-2.5/LM236-2.5/LM336-2.5. Available
online at: http://cache.national.com/ds/LM/LM136-2.5.pdf.
14. Microchip Technology Inc. 2001, PIC 16F87X Data Sheet. Available online at:
http://ww1.microchip.com/downloads/en/DeviceDoc/30292c.pdf.
15. Burunkaya, M.; Güler, I. Design and Construction of a Microcontroller Based
Active Humidifier System Employing an Ultrasonic Nebulizer; Congress of
Electrical-Electronics-Computer Engineering: Bursa, Turkey, 2000 (in Turkish).
16. Burunkaya, M.; Güler, I. Humidity Control of an Incubator Using the
Microcontroller Based Active Humidifier System Employing an Ultrasonic
Nebulizer; National Congress of Biomedical Engineering, Istanbul, Turkey, Nov
27 – 28, 2000, (in Turkish).
Microcontroller Based Oxygen Gas Controller 527
17. Guler, I.; Burunkaya, M. Humidity control of an incubator using the micro-
controller-based active humidifier system employing an ultrasonic nebulizer.
J. Med. Eng. Technol. 2002, 26, 82 – 88.