PWM Cooling-FAN Control and Over Temperature Protection using LM35 and ATTiny13 - Page 1
Forum section: electronics / general

author: hesam.moshiri
author_rank: Regular Contributor
timestamp: June 07, 2022, 06:50:11 am
content: 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.

author: andyB2022
author_rank: Regular Contributor
timestamp: August 11, 2022, 07:06:25 am
content: The only problem with this project is that you may not be able to "fully calibrate" any NTC / PTC or any kind of passive temeprature sensor with the MCU.Real temeprature / temperature measured by MCU:25 2530 2840 3750 4460 5270 65Hope you got the point. I've done a similar project as yours and while I was "calibrating" one of the values, let's say 60 degrees (with an IR camera pointed on an NTC), when the NTC cools down to 25 degree (indicated by the camera) MCU was now reading 33. So if I calibrate the max temperature I'll definitely have a problem with the lower value of it, so on and so forth....I don't like the kind of sensor you used (TO-92 package) because it's very hard to get a good thermal conductivity with a heatsink, I prefer these kinds of sensors, check image attached.

author: wraper
author_rank: Unknown
timestamp: August 11, 2022, 07:37:41 am
content: Quote from: andyB2022 on August 11, 2022, 07:06:25 amWhy not do a two point calibration?EDIT:QuoteNot to say this is a pure nonsense. NTC/PTC are pretty crappy sensors, but there are RTD sensors like PT100 and PT1000 which are very precise. And guess what, in any serious application reading is calibrated in firmware/software.

author: andyB2022
author_rank: Regular Contributor
timestamp: August 11, 2022, 07:39:05 am
content: How can I do that in software? (I wish I knew how..)

author: hesam.moshiri
author_rank: Regular Contributor
timestamp: August 11, 2022, 01:01:40 pm
content: Quote from: andyB2022 on August 11, 2022, 07:06:25 amwe can get good thermal conductivity. You can use some thermal glue. also, you can fix the sensor on the heatsink. one example is using two screws and a holder (something like a bolt)