An extension of Temperature over LCD project, this wants to be an example of old computer components reusing.
With an LCD, temperature sensor, optocouplers, two switches and some resistors, we are going to create a digital controlled CPU FAN.
In this example I'm using a 3 wires 5V fan, in order to powering directy with Arduino 5V pin.
It will possible to set a threshold temperature using two switches, one increments and the other decrements, in order to tell Arduino when switch on fan. If actual temperature is greather then threshold temperature, fan will switch on.
What to know about CPU fans
Exists different kinds of fans, with 3 or 4 wires. First ones has GND, Powers supply and output wire to communicate rpm, second ones instead use the 4th wire as a PWM power supply, in order to set rpm.
Another thing to know is that 5V fan usually operates with 400mA, that's generate noisy on Arduino lines that could damage internal voltage sensors. So keep thisprojectjustaeducationalpurpose,notasaprofessionalcircuit.
What to know about OPTOCOUPLERS
Are a simple switch, that use an internal LED and foto-resistor in order to close and open the circuit. If LED is on circuit is closed and "electricity" can pass, otherwise not.
To turn on/off the LED just use a LOW and HIGH digital output from our Arduino, with a resistor in order to not burn it.
EXPANDED TECHNICAL DETAILS
Pulse-Width Modulation (PWM) Mastery
This project simulates the behavior of a professional PC cooling fan, allowing for a deep dive into variable speed control and tachometer feedback.
- PWM Signal Management: The Arduino Uno generates a 25kHz PWM signal (the industry standard for PC fans) to control a simulated or physical 4-pin PWM fan. The firmware uses the
analogWrite()function to vary the "Duty Cycle," effectively changing the fan's RPM. - Tachometer Pulse Reading: The Arduino monitors the "Sense" pin of the fan. It uses hardware interrupts to count the frequency of incoming pulses, calculating the exact RPM (Revolutions Per Minute) of the fan in real-time.
Diagnostic Interface
- RPM Dashboard: Current fan speed, duty cycle, and calculated RPM are displayed on the Serial Monitor or an attached 16x2 LCD, providing a complete diagnostic tool for PC cooling performance analysis.