How to Make a Temperature-Controlled DC Fan

In various electronic devices such as CPUs and gaming consoles, you might have observed that the processor tends to heat up during intensive usage such as gaming or simulation, leading to the fan switching on or increasing its speed to dissipate the heat. Once the processor cools down, the fan returns to its normal flow or switches off.

In this DIY guide, we will build a simple temperature-controlled fan which switches on and off at predetermined temperature values, without the need for a microcontroller unit in its circuit.

4

What You’ll Need

To build this project, you will need the following components, which can obtained from online electronics stores.

The Problem: Continuous Rapid Switching of the DC Fan

For this DIY task, we want the fan to switch on when the temperature sensor senses a temperature of 38°C (100°F) or higher, and switch off when the temperature falls below this threshold. Temperature sensors provide the circuit with the voltage output that can be used for controlling the fan. We need a voltage comparator circuit using an LM393 to compare this voltage output with a reference voltage.

To enhance the voltage output from the temperature sensor, we’re using an LM741 non-inverting operational amplifier to upscale this voltage, which can be compared with a stable voltage reference provided by the voltage regulator. Moreover, we’re using an LM7805 as a 5V DC voltage regulator.

mega cloud storage with mega logo on laptop screen.

It is observed that when the temperature approaches 38°C, circuit output starts to switch repeatedly between the on and off stages due to noise on the signal. This jittering or rapid switching may occur unless the temperature gets well above 38°C or well below 38°C. This continuous switching causes high current to flow through the fan and electronic circuit, leading to overheating or damage to these components.

Schmitt Trigger: a Solution for This Problem

To address this issue, we are using the Schmitt trigger concept. This involves applying positive feedback on the non-inverting input of a comparator circuit which allows the circuit to switch between logic high and logic low at different voltage levels. Using this scheme, it is possible to prevent numerous errors caused by noise while ensuring seamless switching, as switching to logic high and low occur at different voltage levels.

The Improved Temperature-Controlled Fan: How It Works

The design works in an integrated approach, in which sensor data gives the output voltage level, which is used by other circuit elements. We will discuss the circuit schematics in sequence to give you an insight into how the circuit operates.

Temperature Sensor (LM35)

The LM35 is an IC for sensing the room temperature and gives output voltage proportional to temperature on the Celsius scale. We are using the LM35 in TO-92 packaging. Nominally, it can accurately measure temperature between 0° to 100°C, with an accuracy of less than 1°C.

It can be powered up using a 4V to 30V DC power supply and takes a very low current of 0.06mA. It means it has very low self-heating due to low current consumption, and the only heat (temperature) it detects is of its surrounding environment.

A computer monitor showing the Windows 11 security settings

The Celsius temperature output of the LM35 is given with respect to a simple linear transfer function:

• VOUT is the LM35 output voltage in millivolts (mV).

windows recovery environment on laptop screen.

• T is the temperature in °C.

As an example, if the LM35 sensor detects a temperature of approximately 30°C, the sensor output would be nearly 300mV or 0.3V. You canmeasure the voltage using a digital multimeter. We are using the LM35 in a tubular waterproof probe in this DIY project; however, it can be used without a tubular probe, like an IC.

A fan in a computer case

Voltage Gain Amplifier Using LM741

The output voltage of the temperature sensor is in millivolts, and thus needs amplification to suppress the effect of noise on the signal and also to improve signal quality. Voltage amplification helps us use this value for onward comparison with a stable reference voltage, with the help of an LM741 operational amplifier. Here, the LM741 is used as a non-inverting voltage amplifier.

For this circuit, we are amplifying the sensor output by a factor of 13. The LM741 is operated in a non-inverting op amp configuration. The transfer function for the non-inverting op amp becomes:

So we take R1 = 1kΩ and R2 = 12kΩ.

Electronic Switch Comparator (LM393)

As mentioned above, for glitch-free electronic switching, a Schmitt trigger can be implemented. For this purpose, we are using an LM393 IC as a voltage comparator Schmitt trigger. We’re using a reference voltage of 5V for inverting the input of the LM393. A 5V voltage reference is attained with the help of the LM7805 voltage regulator IC. The LM7805 is operated using a 12V power supply or battery, and it outputs constant 5V DC.

The other input of the LM393 is connected to the output of the non-inverting op amp circuit, which is described in the above section. In this way, the amplified sensor value can now be compared with the reference voltage using the LM393. Positive feedback is implemented on comparator LM393 for the Schmitt trigger effect. The output of LM393 is kept active high and the voltage divider (resistor network shown in green in the diagram below) is used at output to reduce the output (high) of the LM393 to 5 to 6V.

We’re using Kirchoff’s current law at non-inverting pins to analyze the circuit behavior and optimum resistor values. (However, its discussion is beyond the scope of this article.)

We’ve designed the resistor network such that when the temperature is increased to 39.5°C and above, the LM393 is switched to a high state. Due to the Schmitt trigger effect, it remains high even if the temperature drops just below 38°C. However, the LM393 comparator may output a logic low when the temperature falls below 37°C.

Current Gain Using Darlington Pair Transistors

The output of the LM393 is now switching between logic low and high, as per the circuit requirements. However, the output current (20mA max without active high configuration) of the LM393 comparator is quite low and can’t drive a fan. To address this issue, we are using ULN2003 IC Darlington pair transistors to drive the fan.

The ULN2003 consists of seven open collector common emitter transistor pairs. Each pair can carry a 380mA collector-emitter current. Based on the current requirement of the DC fan, multiple Darlington pairs can be used in a parallel configuration to increase maximum current capacity. The input of the ULN2003 is connected to the LM393 comparator and the output pins are connected to the negative terminal of the DC fan. The other terminal of the fan is connected to a 12V battery.

The circuit elements, except for the fan and battery, are integrated on the Veroboard through soldering.

Putting It All Together

The complete schematic diagram of the temperature-controlled fan is as follows. All ICs are getting power from a 12V DC battery. It is also important to note that all grounds must be held common at the battery negative terminal.

Testing the Circuit

To test this circuit, you can use a room heater as a hot air source. Place the temperature sensor probe close to the heater so that it can detect the hot temperature. After a few moments, you will find an increase in the temperature on the sensor output. When the temperature exceeds the set threshold of 39.5°C, the fan will switch on.

Now switch off the room heater, and let the circuit cool down. Once the temperature falls below 37°C, you will see that the fan will switch off.

Choose Your Own Temperature Threshold for a Switching Fan

Temperature-controlled switching fan circuits are commonly used in many electronic and electrical appliances and gadgets. You can select your own temperature values for switching the fan on and off by choosing the appropriate value of resistances in the schematics of the Schmitt trigger comparator circuit. A similar concept can be used to design a temperature-controlled fan with variable switching speeds, i.e. fast and slow.

Keep your cool this summer by making your own DIY fan. Just check out these awesome project ideas. No sweat!

Tor spoiled me forever.

Quality apps that don’t cost anything.

You’ve been quoting these famous films wrong all along!

Anyone with more than a passing interest in motorsports must see these films.

These plugins will make you wonder why you used Photoshop in the first place.

Technology Explained

PC & Mobile