Helena Ferebauer | December 2025 | Arduino Programming
This project is a temperature responsive desk fan system built using an Arduino, an L298N motor driver, a KY-028 temperature sensor, and indicator LEDs. The fan automatically adjusts its speed based on temperature changes, and the LEDs provide a visual indicator of the current fan speed. The goal of this project was to create a simple automated cooling system while learning the basics of sensors, motor control, and microcontroller programming.
Rooms change temperature throughout the day, and manually adjusting a fan can be inconvenient. This system demonstrates how environmental data can be used to automate a response. It also serves as an educational project to learn how to read sensor data, control motors, and build a basic working electronics system.
Arduino Uno with USB cable
Breadboard and jumper wires
KY-028 temperature sensor
L298N motor driver
DC fan motor
LEDs (green, yellow, red)
300 Ω resistors
Planned the system behavior
Wired the temperature sensor, motor driver, fan, and LEDs
Programmed the Arduino using analog sensor readings and PWM motor control
Tested and adjusted thresholds for correct LED and fan behavior
Before building this project, I had very little experience using Arduino. I was given a beginner kit that included many components such as sensors, LEDs, resistors, wires, and motors. I took time to look up each part so I could understand its purpose and how it would be used in a circuit. I also watched several beginner Arduino tutorials and used the official Arduino Project Hub to learn more about reading sensors and controlling outputs.
To practice before building the real circuit, I used Tinkercad to simulate the wiring and test the general behavior of the LEDs and sensor (Figure 1). This helped me understand how everything should work together.
The temperature sensor was challenging because the raw values changed almost every time I reconnected the Arduino. Because of this, I had to keep testing and adjusting the code so that each temperature range worked correctly. This experience helped me learn how sensors behave in real conditions and how important testing and debugging are when working with electronics.
Figure 1. Tinkercad Simulation for Fan
Prototype Build (Figure 2):
Relay Module:
At first, I used a relay to switch the DC motor on and off. This worked for basic control, but the motor could only run at full speed or be completely off, having no variable control.
ULN2003 Driver Board + Stepper Motor:
To experiment with speed control, I added a stepper motor driven by the ULN2003 board. The stepper motor was useful for testing speed control, but it was not the best choice for a fan.
Transition to L298N Motor Driver + DC Fan Motor:
Finally, I upgraded to the L298N motor driver with a DC fan motor. This solved the limitations:
Allowed PWM speed control (OFF, MEDIUM, FAST).
Provided safe current handling compared to direct Arduino control.
Matched the simulation logic from Tinkercad but worked reliably in real hardware.
Combined with LEDs and the KY‑028 sensor, it created a complete temperature‑responsive fan system.
Figure 2. Prototype Build
Prototype Hardware List:
Arduino Uno R3 with USB cable
Breadboard + jumper wires
KY-028 temperature sensor
Relay module
ULN2003 driver board
Small DC motor
Stepper motor
LEDs (green, yellow, red)
330 Ω resistors
Arduino Code
The listed resources were used to understand component specifications, programming concepts, wiring methods, and design considerations. All information was reviewed, interpreted, and applied appropriately to develop and document my project.
1. KY-028 Temperature Sensor Module
ArduinoModules. (2019, January 29). KY-028 Digital Temperature Sensor Module. ArduinoModulesInfo. https://arduinomodules.info/ky-028-digital-temperature-sensor-module/
Used to understand sensor functionality, voltage requirements, and how to read analog values.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2. Arduino IDE and Analog Output Review Video
InterlinkKnight. (2024, August 25). Easy Arduino Tutorial: #1 Basics. YouTube. https://www.youtube.com/watch?v=FsJuSoDJVqk
Used to reinforce concepts related to analog readings, PWM outputs, and proper use of the IDE.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3. Arduino Documentation
Söderby, K. (2024, January 5). Getting Started with Arduino | Arduino Documentation. Docs.arduino.cc. https://docs.arduino.cc/learn/starting-guide/getting-started-arduino/
Used to verify correct wiring procedures, microcontroller setup, and code structure.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
4. L298N Motor Driver Tutorial
lastminuteengineers.comLastMinuteEngineers. (2018, November 28). In-Depth: Interface L298N DC Motor Driver Module with Arduino. Last Minute Engineers. https://lastminuteengineers.com/l298n-dc-stepper-driver-arduino-tutorial/
Used to learn how to control a DC motor with the L298N driver and how it interfaces with the Arduino.
---------------------------------------------------------------------------------------------------------------------------------
5. Temperature-Controlled Fan Concept Example
Temperature Controlled Fan. (2021). Arduino Project Hub. https://projecthub.arduino.cc/ramjipatel376/temperature-controlled-fan-daa2c0
Used to understand example applications of temperature-based fan control. The information assisted in planning and adapting the concept to my own design.
---------------------------------------------------------------------------------------------------------------------------------
6. ChatGPT (OpenAI)
Used to troubleshoot and debug sections of the code when the program did not compile or run as expected, and to clarify errors in logic after initial development.