You are on page 1of 4

1

Air Flow Control on an Incubator


Gomes P., Ribeirinho J., Santos D., Silvestre C.,

Faculdade de Engenharia da Universidade do Porto

 auxiliary tubes is measured in millimeters of water. To


Abstract— In order to preserve biological life in optimal determine water level in the tube it would be necessary a very
condition, it is necessary to control some main ambient accurate system that detected small variations.
parameters such as humidity, temperature, air flow and oxygen In this work, a rotating propeller was used as an
concentration. This is applied either, to plants in a greenhouse or
babies in an incubator. The objective of this project was the air
anemometer to detect all flow values and avoid the problem of
flow control. A microcontroller (ChipKit Max32) and two water level detection.
computer fans were used to control the air flow on an incubator Another important characteristic of an incubator is oxygen
(plastic box). The input fan velocity was controlled by ChipKit renovation. It is important to guarantee the correct level of
and a second fan was used as a sensor to measure air flow in an oxygen. This level is indirectly controlled, in this project, by a
output pipe. An anemometer was used to calibrate the sensor. smoke sensor that induces an input fan to increase air flow in
Operators are able to choose a desirable flow in m3 per minute.
The system automatically adjusts the input fan speed to match
order to reduce the smoke and consequently the CO2
the selected air flow in small or big steps. A second sensor was concentration inside the incubator. Another functionality of
also used in order to control the air quality inside the box, this incubator is the fact of an operator can define an air
simulating another type of sensor. In this case the amount of renovation rate. Before the implementation of algorithms and
smoke inside the incubator. A LCD was used to display all the construction of all components of the system, it was necessary
important information and select the flow speed. a design phase using UML (Unified Modelling Language)
diagrams. The UML diagrams avoid the ambiguity and
I. INTRODUCTION confusion due to the very formal language giving insurance

I N many biological experiments there is a need to


preserve the environment characteristics like temperature,
humidity or oxygen regulation. For instance, the air exchange
that systems details are misinterpreted [1]. To describe the
system two types of diagrams were used: use cases diagram
and state diagram. These types of diagrams were the more
is a key ingredient to a successful incubator. By controlling indicated to the simplification of main ideas and concepts
the flow, it is possible to control the temperature, pressure or involved on this project. Use cases diagrams describe the
humidity. Not only in a lab environment is important be able system purpose ignoring how it is organized. State diagrams
to regulate these characteristics. If a baby is nursed in an show the possible system states and the different conditions
environment which is too cold for him, he responds by that must be satisfied to occur transitions from one state to
increasing his rate of heat production to maintain body another – the state flow [2].
temperature. Due to babies’s fragility, this reaction can cause
diseases and death. Again, the air exchange is important to
solve this problem. For example, if the air renovation is II. MATERIALS
controlled, it is possible to guarantee that the changes of heat In this lab work, a plastic box with 5,3L of capacity, two
in the incubator will be small and the temperature will be fans, a smoke sensor, an infrared emitting diode and a
approximately constant over time. phototransistor were used.
In order to measure air flow, the most obvious solution is to
determine differential pressure using a Venturi tube or a Pitot III. METHODS
tube. The Venturi tube is a tube with a mild narrowing
conduct. With Bernoulli equation, differential pressure and air The idea was to design a system that was capable to
velocity can be determined. measure the air exchange per minute. To do that a rotating
In the other hand, Pitot tube allows measurement of propeller was used. This propeller was not supplied and
velocity in one point of flow. Usually it is necessary place it consequently will be called as a flow sensor in this paper.
within the flow. This technique may disturb the flow but, in
this case, that was not a problem, since a very accurate A. Design of UML diagrams
measurement was not necessary. To design UML diagrams, SmartDraw7® was used. Use
However, in both techniques, auxiliary tubes with a liquid cases diagram was done to describe the relationship and
are needed to measure differential pressure. Pressure in these interaction between all physical components of the system and
its users. State diagram was done to describe process
2
operation. used. The found value was 68kΩ. It was observed that this
value minimizes the slope of the signal allowing the signal
acquirement by the controller as a digital signal.
B. Mechanical construction
Appendix Figure 1 shows the prototype of the incubator.
The final version has some differences in fan position and E. Air Flow measurement
assembly (Appendix figure 2). The supplied fan was placed in By knowing how long it takes to the fan gives a complete
one side of the box while flow sensor was placed in the other turn, it is possible to determine its RPM. Through sensor RPM
side. The flow sensor is inside a pipe. A phototransistor and and air velocity in the output pipe, is it possible to build the
an IRLED were fixed with silicon on each side of the relation between the fan RPM and the output flow. The output
propeller. air velocity was measured with the anemometer Kestrel 1000.
With air velocity and the tube’s radius it was possible to
calculate the output flow using the equation: Q=A*V, being Q
C. Measurement and control the input fan rotations per
the flow (m3/s), A the cross section area of the tube (m2) and
minute
V the air velocity (m/s).
The fan gives two cycles of a signal per rotation. The signal
produced by the fan is a digital signal and a cycle corresponds
to a zero value followed by a one. The input fan generates a F. Display information on LCD
signal with four pulses per rotation. The pulse count per In this project the PDC8544 LCD was used to display
second multiplied by 60 and divided by 4 gives the desired information to operators, as flow speed and control menus. In
rotations per minute (RPM). table one it is shown the pin configuration used.
To control the input fan RPM the circuit in Appendix figure
8 was used. 5V is the minimum voltage required for the fan to Table 1 - LCD Pin Configuration
work. So a circuit with an output voltage between 5V and 12 LCD Pin Function ChipKit Pin
V was designed. The circuit output is controlled by ChipKit. 1 VCC 3.3V
An analog port is capable of give a voltage between 0 and 2 GND GND
3.3V. This voltage is the input voltage of the circuit. In case 3 SCE 7
this voltage is set to 0V the output will be 5V, in order to 4 RST 6
guarantee that the input fan is always working. If voltage is 5 D/C 5
3.3V at circuit input, the output will be approximately 12V. 6 DN(MOSI) 4
First operational amplifier has a gain of 2.2, so its output 7 SCLK 3
varies between 0 and 7.3V (2.2*3.3V). The second operation 8 LED Not Used
that the circuit does is the mean between the 5V and the
output of the first amplifier due the two 1KΩ resistors. That The table below shows how to design a character in
will be the input of the second amplifier. This amplifier is hexadecimal code. This is very useful because in the ChipKit
connected to a PNP transistor and a gain of 2 times. The PNP website only ASCII code are built so, if an extra character is
transistor amplifies the small current leaving the base of the needed, it has to be manually designed first.
transistor that will be necessary to the fan operation. At the
collector output, voltage will have approximately 12V Table 2 - Example of degree sybol design in hexadecimal code.
(12.26V was the real value obtained) also necessary to the fan Line 8
operation. Line 7
In addition, a button was added to the circuit to allow the Line 6
manual control of air flow. When button is pressed, user can Line 5
change the input fan RPM through a potentiometer. Line 4
Line 3
Line 2
D. Measurement of the flow sensor rotations per Line 1
minute
Hexa code 0x00 0x06 0x09 0x06 0x00
The flow sensor was built from a normal computer fan
removing the magnets to reduce the resistance (Appendix The function “LCDinitialize” turns on the LCD. The
Figure 4). function “LCD clear” clears all the information on the LCD.
To measure RPM of the propeller, an infrared emitting This is important because the characters are not erased
diode (SEP8736) [3] and a phototransistor (SDP8436) [4] automatically so, when is written one second information on
were used. As observed in the circuit (Appendix Figure 9), the LCD, only the replaced characters will be changed.
there is a resistor of 680Ω between the power source and the Characters that were not replaced stay displayed what would
IR diode, that have the role of prevent excessive current in the cause a lot of confusion on the information shown. The
diode. function “LCDCharacter” automatically searches and writes
A potentiometer, to determine the optimum resistance, was the correct ASCII characters on the LCD. In the case of use
3
this function to write a non ASCII character, it will return a Mpide 0022 (software associated to ChipKit Max32). Another
random figure instead of the desired character. The function fact to refer is the use of an IRLED. This LED type was used
“LCDCCharacter” writes a custom character on the LCD. In to minimize the external noise provided by the various lights
the previous function (“LCDCharacter”) the correspondent on the laboratory and even the existing lights in parallel works
character is automatically found while in this one it is needed on the same breadboard. The spectral response of the
to enter the character position. For instance, the degree phototransistor used is in the appendix (Appendix Figure 12).
symbol is in the position 0, so the correct code is It is possible to see that this transistor is not sensible to visible
“LCDCCharacter(0)”. The function “LCDString” executes the light spectrum and has a peak at wavelength of 900 nm, which
function “LCDCharacter” for all the ASCII characters is very close to the emission peak of used LED (Appendix
contained in the input string. The code that it was used to Figure 13).
work with the LCD divided the screen in 6 vertical lines and
84 horizontal columns. So, in the beginning of each line it is
necessary to specify the place where the information will start
to be displayed. The LCD can only show 12 characters per
line. If it tries to write more than 12 characters in the same
line, the extra data will be shown in the next line, what causes
some disorder on the information shown. The code is in
Appendix.

G. Smoke Alarm
The smoke alarm is an on/off alarm producing a digital
signal. It is connected to a digital pin of ChipKit and when
triggered, the ChipKit detects the value change of voltage
which informs presence of smoke. The output signal of the
alarm has 9V (in presence of smoke) but the controller is
protected and receives only the 3.3V. When smoke is
detected, the fan will increase its RPM to the maximum: the Figure 1 – Sensor Signal
controller increases the tension sent to the circuit that controls
fan RPM in order to remove the smoke from the incubator. To calibrate the sensor an air flow was injected for each
different input fan speed and the output flow was measured.
IV. RESULTS An anemometer (Kestrel 1000) was used to measure the air
The UML diagrams (Appendix Figure 11) proved to be an velocity at the output of the pipe .With air velocity and pipe
essential phase to acquire a prior knowledge because it is diameter it was possible to calculate the output flow. By
important thinking in all possible interactions, all events and applying voltages between 5V and 12V to input fan (to
their relationship. With those diagrams, it was offered a more change its RPM) an air velocity corresponding to a specific
generic vision about this project. On the use cases diagram, it RPM of the input fan is obtained. The input fan was
is possible to observe interaction of controller with smoke connected directly to the power supply and its velocity was
alarm and users. All the main interactions between these three measured in the controller. Due to the little instability of the
actors are shown in the diagram. State diagram shows what flow sensor RPM, 5 samples were acquired to calculate an
ChipKit does when running all the code once. The four main average value. The values got from anemometer were
states are “Verifying button”, “Performing smoke test”, multiplied by area of the pipe’s straight section (0,31cm2*pi)
“Reading input fan RPM” and “Reading output fan RPM”. and 60 seconds in order to calculate flow speed in cubic
The state “Adjusting fan speed” results from another state meters per minute. A relation between the voltage and the
(“Verifying button”) if it was verified that the button is Arduino pin’s level (between 0 and 255, an 8-bit resolution)
pressed. The state “Increasing input fan RPM” also results was also designed. The results are summarized in the table
from another state if it was verified that the smoke is detected. below:
The circuit used to obtain the signal of output fan rotations
Table 3 - Sensor RPM and Flow Speed Measured
allowed obtaining a signal with very fast transitions (Figure
Air Flow
1). This fact was very important because avoided the Tension Fan’s Sensor’s Trigger
Velocity speed
detections of intermediate values in the range [0; 3,3]V. It was (V) RPM RPM 3 Value
(m/s) (m /min)
necessary to solve this problem because the controller 0,5
5 1080 637 0,09 0
detected many intermediate values that did not allow the
5.5 1245 811 0,7 0,13 18
correct distinction between the moments that the fan blade did
covered IRLED and the moments that did not. With this 6 1410 965 0,8 0,14 36
system, it was determined changes of in a digital pin of 6.5 1575 1123 0,9 0,16 54
controller. Obtained values were verified on serial monitor of
4
7 1755 1281 1 0,18 72 Figure 3 – Graphic of Flow vs. Fan’s RPM

7.5 1920 1437 1,1 0,20 90 Flow sensor will be used to control the input fan speed. In
8 2070 1598 1,2 0,22 108 the manual control mode, the user selects the desired flow. If
8.5 2220 1727 1,3 0,24 126 the current flow is lower than the desired one, the controller
1,4 will increase the fan RPM. These RPM will have a
9 2370 1867 0,25 144
corresponding output flow read by the sensor. These velocity
9.5 2520 1977 1,5 0,27 162 variations are made in big or small steps depending on a large
10 2640 2067 1,6 0,29 180 or slight difference between the current and selected flow
10.5 2755 2181 1,7 0,31 198 speeds: if the difference between the current flow and the
1,8 desired one is big, the steps to increase the fan speed will be
11 2895 2242 0,33 216
bigger (a faster increase to the desired flow). If this difference
11.5 3060 2370 1,8 0,33 234 is small, small steps are used to increase the fan RPM. The
12 3210 2545 1,9 0,34 252 step increasing/decreasing is that the controller has an output
in its pins between 0V and 3.3V and uses an 8bit scale for it
Using the data collected in table 3, the correlation function (256 levels). The 0 value corresponds to 0V and the 255
between the flow sensor and flow speed was calculated using correspond to the 3.3V. An integer variable is defined and is
Microsoft Office Excel®. The correlation was found to be updated at each cycle, to increase the rotations by step. This
linear with a minimum flow speed of 0,10m3/min at about method is more convenient to avoid abrupt changes in the fan
500RPM/min, increasing until 0,35m3/min around RPM which may compromise its normal behavior.
2500RPM/min (figure 2). This equation, obtained in The implementation of the smoke alarm was successful. It
calibration process, is used twice in controller algorithm to was tested with a small burning paper. When it detected the
convert the sensor to flow that will be displayed in the LCD smoke the alarm turned on, as expected, and a message
(the controller reads the instantaneous RPM from the sensor to appeared on the LCD. The fan went to the maximum speed
calculate the flow based on the equation). while the smoke sensor was triggered. After removing all
smoke, the fan automaticly went back to the previous velocity.

V. CONCLUSIONS
The simplest way to control small air flows in a closed
space is using high precision pressure, air flow sensors,
Venturi tube or Pitot tube. However, these techniques were
non-viable in this project so it was necessary to came up with
new ideas. After analyzing some setups, it was decided to use
a small computer fan, a phototransistor and an IRLED to
control the flow speed. This setup has shown to be very
reliable and accurate. It gives precise values from the lowest
Figure 2 – Graphic of Flow vs. Sensor’s RPM
to the highest velocity and it is quite quick to respond to flow
changes. The fan RPM and flow showed to have a linear
Because output flow is controlled by ChipKit platform,
correlation as expected. A smoke alarm was also implemented
which controls the fan’s RPM, and is calculated from output
and was working. The used algorithm controlled the input fan
sensor, the correlation function between input fan RPM and
RPM according the sensor RPM and selected flow speed
output flow was also evaluated using Microsoft Office Excel®
correctly. All the necessary information was properly
(figure 3). With this equation it is possible to find the wanted
displayed on the LCD and constantly refreshed.
input fan’s RPM that matches the intended flow at the output
of the system.
VI. REFERENCES
[1] Bessa, S., Lobo, J., Vagos, M. Sousa, N. UML Tutorial.Porto January
2011.
[2] Correia, José Unified Modeling Language – Diagramas de Estados.
Março 2006.
[3] Datasheets of SEP8736 – AIGaAS Infrared Emitting Diode
[4] Datasheets of SDP8436 – Silicon Phototransistor

You might also like