Add Temperature-Based On/Off Control to a 24 V Cooling Fan
A fan does not always need continuously variable speed. For a small low-voltage enclosure, temperature-based on/off control can be a useful starting point: run the fan when cooling is needed and stop it when conditions permit. The controller still needs careful electrical selection and a clear definition of what happens between those states.
PMD Way's 24 V DC fan collection includes an 80 × 80 × 25 mm fan listed at 24 V and 4.8 W. Those figures help estimate nominal supply demand, but do not establish startup current, permissible supply variation or a supported speed-control interface.
Decide whether switching off is acceptable
Begin with the equipment's cooling requirement. Some systems can remain within their temperature limits with the fan stopped under light load; others require continuous airflow. Establish this through the design's thermal requirements and controlled testing before choosing an automatic off state.
Define the consequences of a controller failure. If overheating could damage equipment, the cooling control may need an independent protective response as well as an ordinary fan command. The correct response depends on the system: maximum cooling, an alarm or controlled shutdown can serve different purposes.
A software variable called fan-on only records a request. It does not prove that the blades are moving or that air is reaching the hot components. Keep temperature protection and fan-command reporting separate in the design.
Budget the fan supply properly
Using the listed nominal values, 4.8 W divided by 24 V gives 0.2 A. This is an arithmetic estimate of running current, not a maximum current rating for the switch, wiring or power supply. Obtain the actual startup and operating requirements for the fan being installed.
If several fans start together, the supply must handle their combined demand along with the rest of the equipment. Check the voltage at the fan connection during startup, especially where the cable is long or shares a supply path with sensitive electronics.
Do not power a 24 V fan from a microcontroller GPIO. Use a suitably rated switching stage or thermostat output and a supply intended for the load. Confirm polarity and the actual lead identification from the fan documentation; wire colours alone are insufficient evidence.
Select switching hardware for a DC fan load
A relay contact's AC resistive rating does not automatically establish its ability to switch a DC fan. Check the contact rating, applicable load type, expected inrush and switching life at the required voltage. Omron's relay guidance explains how load characteristics and inrush affect contact performance.
An electronic switch also needs appropriate voltage, current, thermal and transient capability. For a MOSFET design, verify its on-resistance at the gate voltage actually available, its safe operating conditions and the gate's state while the controller resets. Follow a documented design for the chosen load and driver rather than treating any transistor marked with a large current rating as interchangeable.
Protection against switching transients must suit the fan's internal electronics and the switching arrangement. A brushless fan contains a controller, so it should not automatically be treated as an exposed motor winding. Obtain the fan and driver guidance before choosing suppression components.
Distinguish on/off control from supply PWM
Occasional thermostat-style power switching is different from rapidly chopping the supply to regulate speed. The latter repeatedly interrupts the fan's internal electronics and may not be supported. A separate PWM control input, where fitted, is another interface again.
Sanyo Denki's fan precautions explicitly warn against using supply PWM for the fans covered by its instructions. Other manufacturers document particular control methods for particular models. The practical rule is to use the selected fan's supported method, not assume that a technique demonstrated on another fan is suitable.
Use separate start and stop thresholds
If the fan switches on above 40°C and off below 40°C, sensor noise near that point can cause repeated cycling. Hysteresis creates a gap between the two thresholds. The controller remembers its current state while the temperature remains inside that gap.
For an illustrative low-voltage test setup, imagine starting at 40°C and stopping at 35°C. At 37°C, a stopped fan remains stopped and a running fan remains running. These numbers demonstrate the logic only; choose real thresholds from component limits, sensor error, thermal lag and the measured cooling response.
Analog Devices' fan-control discussion describes hysteresis as a way to avoid continual switching around a temperature threshold. Implement the state transitions explicitly and test them with simulated values before connecting the fan.
| Condition | Intended decision |
|---|---|
| Valid temperature reaches the start threshold | Request cooling |
| Valid temperature falls below the stop threshold | Allow cooling to stop if the system permits |
| Temperature lies between thresholds | Retain the previous state |
| Sensor is invalid or stale | Enter the documented fault response |
Place the sensor for the quantity you need
A sensor in incoming cool air does not necessarily represent a power component's temperature. Decide whether the control variable is enclosure air, a heatsink surface or a particular board region. Mount and route the sensor accordingly, without compromising electrical insulation or airflow.
Texas Instruments' temperature-sensor placement guidance explains how thermal paths affect response. Allow for delay between a component heating and the sensor reporting it. A slow sensor can require more conservative thresholds than a fast, well-coupled measurement.
Test behaviour before relying on it
First simulate temperatures below, within and above the threshold band. Check startup, reset, missing readings and implausible values. A failed sensor must not silently become a believable zero-temperature reading that switches cooling off.
Then test the secured, guarded fan under controlled conditions. Confirm reliable starts, supply stability and the expected state after controller reset. Evaluate temperature at the demanding normal workload with the final lid, vents and filter fitted. Stop the test before any component exceeds its permitted conditions.
Record thresholds, sensor location, switching hardware and observed temperatures. Recheck after changes to filters, enclosure layout or heat-producing components. A useful on/off controller is a verified relationship between temperature, fan operation and equipment limits, not just a relay responding to a single number.