A little fan that spins up only when things get hot — and spins faster the hotter it gets. Great for cooling a project box or a router shelf.
What you’ll build
A 10K NTC thermistor senses temperature; the Nano converts the reading to °C and drives a DC motor (your fan) with PWM through a BC547 transistor — off below 28°C, then speed ramping up smoothly to full blast at 40°C.
Components you’ll need
| Component | Qty | Price |
|---|---|---|
| Arduino Nano ATmega328P Compatible Board | 1 | ₹149 |
| Thermistor NTC 10K | 1 | ₹129 |
| 10K Ohm 1/4W | 1 | ₹249 |
| BC547 | 1 | ₹69 |
| DC Toy Motor | 1 | ₹19 |
| 1N4007 | 1 | ₹199 |
| 400 Point Breadboard | 1 | ₹299 |
| Total | ₹1,113 |
Step-by-step guide
- Build the sensing divider: 5V → thermistor → A0, and from A0 a 10K resistor to GND.
- Wire the driver: Nano D9 → 1K resistor → BC547 base; emitter to GND; motor between 5V and the collector.
- Clip the 1N4007 flyback diode across the motor terminals, striped end to 5V — it protects the transistor from voltage spikes.
- Attach a small propeller or fan blade to the DC motor.
- Upload the sketch; warm the thermistor between your fingers and the fan should start, then accelerate.
The code
The Steinhart-Hart approximation turns the raw reading into real degrees, then the temperature maps to a PWM duty cycle.
const int therm=A0, fan=9;
float readC(){
int v = analogRead(therm);
float r = 10000.0 * v / (1023 - v); // thermistor resistance
float t = 1.0 / (log(r/10000.0)/3950.0 + 1.0/298.15) - 273.15;
return t;
}
void setup(){ pinMode(fan,OUTPUT); Serial.begin(9600); }
void loop(){
float t = readC();
Serial.println(t);
int speed = t <= 28 ? 0 : constrain(map(t*10, 280, 400, 80, 255), 0, 255);
analogWrite(fan, speed);
delay(1000);
}Build this project
Add all 7 required components to your cart in one click — total ₹1,113.
Add all components to cart