Temperature Controlled Fan
by Annie Magnaibayar in Circuits > Arduino
12 Views, 0 Favorites, 0 Comments
Temperature Controlled Fan

For our ME208 Project, our team created a temperature sensor-based working fan. The fan will turn on when the temperature surpasses a certain level and turns off once it's below the certain level (More than 82F in our project). This is helpful for applications such as cooling systems, which allow you to control the temperature of a room or a gadget. The project employs a TMP36 temperature sensor to monitor temperature, an NPN transistor to drive the fan, and a pushbutton switch to allow the user to manually activate the device.
This article will walk you through the step-by-step process of constructing the components, wiring them together, and uploading the code to the Arduino to make the fan function according to temperature. Whether you're a novice or an experienced Arduino user, this project will teach you how to deal with sensors, transistors, and switches in a fun and useful manner!
Supplies

- Arduino UNO (1)
- Temperature Sensor (TMP36) (1)
- 5V Fan (1)
- NPN Transistor (2N2222) (1)
- Pushbutton Switch (1)
- Breadboard (1)
- Jumper Wires (Multiple)
- Power Supply (5V or USB from Arduino)
Set Up the TMP36 Temperature Sensor

- Connect the VCC pin of the TMP36 sensor to the 5V pin on the Arduino.
- Connect the GND pin of the TMP36 sensor to the GND pin on the Arduino.
- Connect the OUT pin of the TMP36 sensor to Analog Pin A2 on the Arduino.
Set Up the Pushbutton Switch

- Connect one terminal of the pushbutton to Digital Pin 2 of the Arduino.
- Connect the other terminal of the pushbutton to GND on the Arduino.
- Configure the pushbutton with INPUT_PULLUP mode in the code to activate when the switch is pressed.
Set Up the Fan and Transistor Circuit

- Connect the Collector pin of the NPN transistor to the negative terminal of the fan.
- Connect the positive terminal of the fan to 5V.
- Connect the Emitter pin of the transistor to GND.
Upload the Code

Testing
Have fun testing the final product!!