“Proper thermal dissipation is an essential rule for nowadays electronics. The best operating temperature for the electronic components is 25 degrees (standard room temperature). Thermal dissipation in some commercial devices is not done properly which affects the lifetime and performance of the devices. So, embedding a compact automatic cooling Fan controller board would be useful. Also, it can be used to protect your own designed circuits and their power components, such as regulators, Mosfets, power transistors … etc.
Previously, I had introduced a circuit to control the cooling fans, however, my intention was not to use any microcontroller and keep it as simple as possible. So, the device was a simple ON/OFF switch for the FAN, depending on the defined temperature threshold. This time, I decided to design a complete and more professional circuit to control the majority of the standard FANs (25KHz PWM) using an LM35 temperature sensor and an ATTiny13 microcontroller.
I used SMD components and the PCB board is compact. It can control one or several standard 3-wires or 4-wires FANs, connected in parallel, such as CPU Fans. Moreover, the target device/component can be protected against over-temperature using a Relay. The user is also notified by visual/acoustic warnings (a flashing LED and a Buzzer).
To design the schematic and PCB, I used Altium Designer 22 and the SamacSys component libraries (Altium plugin). To get high-quality fabricated PCB boards, you can send the Gerbers to PCBWay and purchase original components using the componentsearchengine.com. I initially tested the circuit on a breadboard. I used the Siglent SDM3045X multimeter to accurately examine the voltages and the Siglent SDS1104X-E oscilloscope to examine the shape, duty cycle, and frequency of the PWM pulse.
- Supply Voltage: 12VDC (See text)
- Load Over-temperature Protection: Yes (above 60 degrees)
- PWM Frequency: 25KHz
- FAN Voltage: 12VDC
- Maximum Load Voltage/Current: 250V-10A (AC/DC)
- Active Temperature Thresholds: 25C to 60C
- Over-temperature Warning: Yes (Flashing LED and Buzzer)
According to the ATTiny13 datasheet: “The ATtiny13 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the ATtiny13 achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize power consumption versus processing speed.”
I have configured the clock source of the IC1 for 9.6MHz, internal. It is enough for our applications without using an external clock source, such as a crystal. R1 is a pull-up resistor for the Reset pin to prevent the MCU to Reset unwantedly. C2 and C3 are decoupling capacitors to reduce the noise of the +5V supply.
The main component of the power supply is REG1, which is a 78L05 regulator . I selected the SO-8 package for this regulator. P5 is a two-pins male XH connector that supplies the controlling board and FAN(s). The current of the supply voltage (12V) is dependent on the number of connected FANs, otherwise, the current consumption of the +5V supply rail is very low. R7 and C7 build a low-pass RC filter at the input to reduce the input noise as much as possible, however, the voltage drop on the RC filter is not significant to affect the operation of the regulator. D3 is an 0805 green LED that shows the proper supply provision and R8 limits the current to D3. C5 and C7 are used to reduce the output voltage noise.
The components of this section are R5, R6, P4, and D2. D2 is a 0805 red LED that flashes when over-temperature happens. R5 limits the D2 current. P4 is a 2-pins XH male connector that is used to connect a 5V buzzer. R6 limits the current to the buzzer.
The components of this section are Q1, D1, R4, C4, K1, and P3. K1 is a 12V-10A Relay that is used to switch OFF the load when over-temperature happens. It is normally closed (NC) which means the load is ON. D1 protects the Q1 against reverse currents of the Relay’s inductor and C4 damps the current spikes. Q1 is a 2N7002  Mosfet that is used to switch the Relay. R4 is used to pull-down the gate pin of Q1 to avoid unwanted triggering.
LM35 Temperature Sensor
P1 is a 3-pins male XH connector that is used to connect the LM35 sensor to the board. You should mound the LM35 on the heatsink using thermal glue and use a short wire to connect the sensor to the board. C1 is a decoupling capacitor that is used to reduce noise.
AVR ISP Programmer
ISP is a 5-pins male header that is used to program the microcontroller onboard. You can use whatever programmer you like, such as the cheap USBasp programmer or similar.
P2 is a 3-pins XH male connector that is used to connect the Fan(s) to the board. Q2 is used to transfer the PWM pulses to the control pin of the Fan. R2 is a 10K pull-up resistor that shifts the 5V PWM signal level to 12V. R3 is a pull-down resistor to avoid unwanted triggering of the gate pin of Q3. Figure 2 shows a typical Intel CPU Fan which could be one of your options to cool down the components, using this controller board.”