Professional Documents
Culture Documents
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