กลับไปหน้ารวมไฟล์
automatic-temperature-adjusting-fan-f75b62.md

Final Project for CS 220 - Computer Architecture and Assembly Language at Mira Costa College

This is a fan that when turned on with a button will automatically choose its own speed based on the current temperature. Current temperature is represented by an LCD screen and an LED.


🛠️ เจาะลึกเบื้องหลังการทำงาน (Deep Dive / Technical Analysis)

The Automatic Temperature-Adjusting Fan is a practical home automation project that demonstrates the use of analog sensors to control mechanical actuators. Instead of a simple ON/OFF switch, this fan scales its speed based on how hot the environment is, saving energy and providing comfort.

Core Functionality

The Arduino continuously reads the voltage from the TMP36 temperature sensor. This analog voltage is converted into a temperature in Celsius. The code then maps this temperature range (e.g., 25°C to 35°C) to a PWM (Pulse Width Modulation) duty cycle (0 to 255).

Key Features

  • Dynamic Speed Control: The hotter it gets, the faster the fan spins.
  • LCD Status Display: Shows current temperature and fan status in real-time.
  • Low Power Threshold: The fan stays completely off if the temperature is below a certain comfort level (e.g., 24°C).

Hardware Breakdown

  • Arduino Uno: Central controller.
  • TMP36 Sensor: Low-voltage precision temperature sensor.
  • DC Motor & Blade: The cooling element.
  • NPN Transistor (2N2222): Required to allow the Arduino to control the higher current required by the motor.
  • 16x2 LCD Display: For user feedback and debugging.

Troubleshooting and Calibration

Because the TMP36 is an analog sensor, it can be sensitive to noise in the power supply. For more accurate readings, consider:

  1. Smoothing: Taking the average of 10 readings in the code.
  2. Decoupling: Adding a small capacitor across the VCC and GND of the sensor.

This project is a great foundation for building a smart greenhouse controller or a desktop workstation cooler.

ข้อมูล Frontmatter ดั้งเดิม

title: "Automatic Temperature-Adjusting Fan"
description: "A fan that when turned on automatically changes the rotation speed depending on the current temperature."
author: "menegoth"
category: "Lab Stuff"
tags:
  - "Lights"
  - "Weather"
  - "Monitoring"
views: 3730
likes: 1
price: 1120
difficulty: "Easy"
components:
  - "1x NPN Transistor"
  - "1x ARDUINO UNO R3"
  - "4x Resistor 150 Ohm ¼ w"
  - "26x Wires"
  - "1x Led RGB"
  - "1x Temperature Sensor - TMP36"
  - "1x Small DC Motor"
  - "1x 10kohm Potentiometer"
  - "1x LCD 16X2"
  - "1x Resistor 1k Ohm"
  - "1x pushbutton (generic)"
  - "1x Breadboard"
tools: []
apps:
  - "1x Tinkercad"
downloadableFiles:
  - "https://projects.arduinocontent.cc/71e84677-8cf4-4d0f-b8d8-33b4e6566790.cpp"
documentationLinks: []
passwordHash: "60f7e530cb8145e86968b8b9c209a641f263bb1abc409c606f1c151fea0aa189"
encryptedPayload: "U2FsdGVkX19CW7Fl7ndVXlmkq4d/zIiueBL7UxF0Ra6Kmch3cQj8QePp2unHJyr2b1RiezqeEAprCoMUHRuyzAF1LgkTMPXBz71unecKyN3vS0xKfA+c8cx/y9bXM9lkDw+KUcMIsgezp6BLlFDd7ejjbNlDedQX0+wftwXAQLc="
seoDescription: "An Automatic Temperature-Adjusting Fan that changes rotation speed based on the current temperature."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/automatic-temperature-adjusting-fan-f75b62_cover.jpg"
lang: "en"