You are on page 1of 34

Laboratory Exercise No.

Arduino Nano
Temperature-Controlled Fan System
Aliaga, Darren Ezra P.
Antonio, Jerome
Bautista, Ryan Jacob N.
Manipol, John Mark A.
Santiago, Jose Wilfredo A.
Sison, Cherven Jiro O.
Abstract
The laboratory exercise displayed the application of a microcontroller like
an Arduino in identifying and regulating temperature parameters. The
code was set to command the Arduino to regulate temperature once it
reached the set value for temperature. A sensor was utilized to identify the
temperature. There were various electronic components involved on
cooling down the surroundings using a fan. This activity exhibited the
presence and importance of code in commanding microcontrollers like
Arduino, in performing a task like identifying temperature. This
application can be clearly applied in controlled agro-structures like
greenhouses.
Introduction
• Automation has driven technological advancements across various
applications.
• A microcontroller, an integrated circuit designed for embedded
systems, combines processing power, memory, and input/output
peripherals in a single chip (Lutkevich, n.d.).
• Arduino, a well-known microcontroller, finds applications in diverse
fields, including temperature sensing.
• Temperature plays a crucial role in agriculture, particularly in
regulating environments like greenhouses, impacting crop and
livestock performance
Introduction
• Arduino can be programmed to perform temperature sensing, offering
a versatile solution for agricultural applications.
• Fritzing, an electronics simulation software, enables the creation and
simulation of electronic circuits.
• The laboratory activity demonstrated the practical use of Arduino as a
microcontroller with a focus on temperature sensing, evaluating the
performance of a temperature sensor through hands-on
experimentation.
Objectives
The students were able to perform the following:

• understood the basic principle of Arduino;


• performed coding using Arduino 2.2.1;
• performed schematic diagram and assembled the electronic
component for temperature sensor; and Temperature-Controlled
Fan System
Materials
Rationale of
Materials
DS18B20 Temperature
Sensor
GND - the sensor’s GND pin was connected to the ground
pin of arduino nano
VCC - the sensor’s VV pin was connected to the 5v outputf
arduino nano on
Dara pin - the sensor’s data pin was connected to the digital
inputnumber 2 pin of arduino nano
LED
Anode (+) - the D13 is connected directly to the LED
together with switch relay
Cathode (-) -- The cathode pin is connceted to the ground
through resistor
Power Supply for Arduino

The arduino nano was powered via USB for the continuos
operation
Experimental Procedures
Connect the Connect the Fan Code the
temperature sensor Arduino
Connect the (VCC) power Connect the fan to Write an Arduino sketch to
input, GND (ground) and the Arduino via a transistor or read the temperature from
data (DOUT) pins of the relay module. The fan the sensor and control the
temperature sensor to the should have its power fan based on the
appropriate pins on the Arduino supply if it needs more temperature reading. It
Nano. current than the Arduino needs to use a conditional
can provide. statement in code to
determine when to turn off
or on the fan.
Experimental Procedures
Upload the Code Test and Calibrate
Upload the code to the Arduino Test the system and make
Nano using a Fritzing. adjustments to the desired
temperature and fan control logic.
Calibrate the temperature reading
from the sensor for accuracy.
Results and
Discussions
Results and Discussion
Objective
To Create a Temperature-Controlled Fan System using Arduino Nano.
Components Used
Arduino Nano, temperature sensor, and a fan.
System Operation
Fan activation/deactivation based on temperature data from the sensor
Initial Procedures
⚬ Assessment of the planned configuration.
⚬ Methodology for operating the temperature sensor identified.
⚬ Utilization of a previously created diagram for establishing connections.
Results and Discussion

Figure 1. Schematic Diagram of Temperature Sensor


Results and Discussion
• Utilization of the previous activity related to the recent activity
• Missing details in the figure: AC Relay and the fan
• Students' approach:
⚬ Utilized Figure 1 as a reference.
⚬ Collaborated and peer-taught to fill in missing details.
• Key results and observations after manual configuration:
⚬ Successful execution of the experiment procedures.
⚬ Temperature-controlled fan system functioned as intended.
⚬ Fan activation/deactivation based on temperature data from the
sensor.
Results and Discussion for
Temperature Sensor Connection
• Successful establishment of correct connections for the temperature
sensor with the Arduino Nano.
• Temperature sensor connections:
⚬ VCC pin connected to the Arduino Nano's 5V output.
⚬ GND pin connected to the Arduino's ground (GND) terminal.
⚬ Data (DOUT) pin connected to a digital I/O pin on the Arduino.
• External power source needed for the fan.
• 12 V AC relay incorporated to supply power to the fan.
• The AC relay ensured sufficient power for the fan's operation.
Results and Discussion for
Fan Connection
• Students encountered challenges in connecting the fan to the system.
• Difficulties stemmed from limited understanding of AC relays and
complex switches.
• Complexities included unfamiliarity with electrical circuits and safety
precautions.
• Fan required a separate power supply due to higher current demands.
• Transistor or relay module used as a switch to enable Arduino control of
the fan's operation.
Results and Discussion for
Arduino Code
• Students modified and adapted previous code for the current system
setup.
• Developed an Arduino sketch to continuously collect temperature data
from the sensor.
• Utilized conditional statements to determine fan activation or
deactivation based on temperature readings.
• When the temperature exceeded a predefined threshold, the Arduino
activated the fan to lower the environment's temperature.
Results and Discussion for
Arduino Code

Arduino Code use for Temperature Control


Results and Discussion for
Uploading the Code
• Students adapted previous code for the system setup:
• Created an Arduino sketch to collect temperature data from the sensor
continuously.
• Incorporated conditional statements to control fan activation based on
temperature readings.
• When the temperature exceeded a set threshold, the Arduino activated
the fan to cool the environment.
Results and Discussion for
Testing and Calibration
• Students calibrated and uploaded the code for testing.
• System testing showed the fan's responsiveness to temperature changes.
• Fan activated promptly when the temperature exceeded the set threshold
(e.g., 28-30 degrees Celsius for Group 1).
• Fan deactivated when the temperature fell below the threshold.
• Observed behavior validated precise fan control based on temperature
sensor data.
Results and Discussion
Unexpected Outcomes and
Challenges Encountered
Connections and
Materials Handling:
• Students encountered challenges integrating the fan into the system,
leading to confusion about wire placements.
• Issues with material damage, including wires.
• Peer and professor guidance sought for assistance, resulting in a
modified, organized connection.
• Figure 4 depicts the modified connection of the system.
Connections and
Materials Handling:

Modified Connection of the System


Calibration of Codes
• Initial system testing faced coding problems, causing system errors.
• Solution involved using another group's code to verify connection
effectiveness, successfully resolving coding issues.
• Calibration of temperature sensors was crucial due to occasional
inaccuracies in sensor readings.
• Calibration involved comparing sensor readings with a calibrated
thermometer and adjusting the code for accurate temperature display.
Conclusions and
Recommendations
Conclusion
• The students made impressive strides in this activity.
• They grasped the fundamentals of Arduino, successfully wrote code
using Arduino 2.2.1, and constructed a functional Temperature-
Controlled Fan System with a temperature sensor.
• This reflects their basic understanding of Arduino's principles and their
practical application.
• However, it's essential to acknowledge the challenges they encountered,
particularly in integrating the fan, handling materials, and resolving
coding issues during initial testing.
Conclusion
• These hurdles underscore the learning process, demonstrating their
determination to overcome obstacles and their growing competence in
electronics and programming.
• Overall, this experience equips them with valuable skills for future
engineering projects and automation endeavors.

As an Agricultural and Biosystems Engineering student,


knowing how to work with technologies like Arduino for
temperature control and automation is important
Conclusion
As an Agricultural and Biosystems Engineering
student, knowing how to work with technologies like
Arduino for temperature control and automation is
important
Recommendations
• Gather necessary components: Arduino Nano, temperature sensor (e.g.,
DHT22 or DS18B20), DC blower fan, resistors if needed, relay board,
breadboards, jump wires, and a 12V power supply

• Develop circuit assembly skills: Practice connecting components on a


breadboard, understanding voltage, current, and resistance principles,
forming a strong foundation for project construction and troubleshooting.
Recommendations
• Emphasize comprehensive documentation: Maintain detailed records
encompassing circuit connections, code, challenges faced, and solutions
found. This documentation serves as a valuable reference for
troubleshooting and future projects.

• Commit to ongoing learning: Recognize that mastering Arduino and


electronics is a continuous journey requiring dedication and patience.
Follow instructions diligently, stay patient during assembly, and embrace
the learning process for continuous skill development.
References
• Arduino (n.d.). What Is Arduino? Retrieved September 23, 2023 from
https://docs.arduino.cc/ learn/starting-guide/whats-arduino
• Contributor, T. (2021). resistor. WhatIs.com.
https://www.techtarget.com/whatis/definition/resistor#:~:text=A%20resistor%20is%20an
%20electrical,device%20such%20as%20a%20transistor.
• Engineers, L. M. (2022, November 25). Interfacing DHT11 and DHT22 Sensors with
Arduino. Last Minute Engineers. https://lastminuteengineers.com/dht11-dht22-arduino-
tutorial/
• Lutkevich, B. (n.d.). Microcontroller (MCU). Retrieved September 23, 2023 from
https://www. techtarget.com/iotagenda/definition/microcontroller
• Nano | Arduino Documentation. (n.d.-b). https://docs.arduino.cc/hardware/nano
REFERENCES
Arduino (n.d.). What Is Arduino? Retrieved September 23, 2023 from https://docs.arduino.cc/ learn/starting-
guide/whats-arduino
Contributor, T. (2021). resistor. WhatIs.com.
https://www.techtarget.com/whatis/definition/resistor#:~:text=A%20resistor%20is%20an
%20electrical,device%20such%20as%20a%20transistor.
Engineers, L. M. (2022, November 25). Interfacing DHT11 and DHT22 Sensors with Arduino. Last Minute
Engineers. https://lastminuteengineers.com/dht11-dht22-arduino-tutorial/
Lutkevich, B. (n.d.). Microcontroller (MCU). Retrieved September 23, 2023 from https://www.
techtarget.com/iotagenda/definition/microcontroller
Nano | Arduino Documentation. (n.d.-b). https://docs.arduino.cc/hardware/nano

You might also like