Task: In my Introduction to Engineering Principles and Practices class, I was tasked with designing a system that includes a KY-028 infrared/flame sensor that activates a fan when it detects heat. The system should include an Arduino board, an infrared sensor, a relay, and the fan.
Flame Sensor and Relay Description: An infrared sensor detects and measures the heat of an object within range of the sensor. The specific sensor used in this system is a KY-028 infrared/flame sensor, which measures temperature. There are many ways to activate the sensor with temperature, including but not limited to holding the tip of the sensor between your fingers (body heat), a phone flashlight, and fire. The flame sensor in this system activates a fan, but the fan cannot directly plug into the Arduino board because the motor (fan) will pull too much current from the board. When too much current is pulled from the Arduino board, it could fry it, so an interface is necessary. A relay is an electromagnetic switch that allows high-power motors like the fan to connect to the Arduino. The Relay Module connects the Arduino and the fan, with the Arduino on the low-power side and the fan on the high-power side. When the Arduino board sends the 5V to the relay, it activates the relay switch to power the motor. The switch allows the Arduino and the motor to talk while being isolated from one another. I have included photos of the relay and the infrared sensor below:

Setting up the System: To create a system that allows the Arduino to talk to both the relay and the infrared sensor, I used a breadboard so all devices have a common ground and power source connected to the Arduino. I also connected my infrared sensor to an analog pin on the Arduino board and the relay module to a digital pin. I have included a photo below:

Programming the System: Utilizing my previous knowledge, I defined all variables and used Serial monitor and Serial.println commands to track the numbers on the serial monitor that correspond to the infrared sensor readings. After testing the infrared sensor code, I used an if else statement with digitalWrite() commands to program the fan. The final code allows the infrared sensor to trigger the fan.
Final Result: The Youtube video below demonstrates the function of the system:
https://youtu.be/hhxaOFhafRo?feature=shared
Recent Comments