Author Topic: PWM Cooling-FAN Control and Over Temperature Protection using LM35 and ATTiny13  (Read 1141 times)

0 Members and 1 Guest are viewing this topic.

Offline hesam.moshiri

  • Regular Contributor
  • *
  • Posts: 103
  • Country: se
    • MyVanitar
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.

 
The following users thanked this post: MacDoktor

Offline andyB2022

  • Regular Contributor
  • *
  • Posts: 50
  • Country: ro
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    25
30    28
40    37
50    44
60    52
70    65

Hope 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.
« Last Edit: August 11, 2022, 07:08:27 am by andyB2022 »
 

Offline wraper

  • Supporter
  • ****
  • Posts: 14788
  • Country: lv
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    25
30    28
40    37
50    44
60    52
70    65

Hope 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.
Why not do a two point calibration?
EDIT:
Quote
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.
Not 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.
« Last Edit: August 11, 2022, 07:43:24 am by wraper »
 

Offline andyB2022

  • Regular Contributor
  • *
  • Posts: 50
  • Country: ro
How can I do that in software? (I wish I knew how..)
 

Offline hesam.moshiri

  • Regular Contributor
  • *
  • Posts: 103
  • Country: se
    • MyVanitar
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    25
30    28
40    37
50    44
60    52
70    65

Hope 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.

we 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)
« Last Edit: August 11, 2022, 01:10:37 pm by hesam.moshiri »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf