/******************12F683 AUTOMATIC TEMPERATURE CONTROL WITH LM35**************/
/* We have 3 temperature tresholds, the HI_TEMP is when the fan spins
* at maximum power, the MD_TEMP is when the fan slows down to 50% or less
* and the LO_TEMP when the fan turns off.
* IMPORTANT: theres a capacitor in the AN0 input that filters noise from LM35,
* this capacitor is IMPORTANT cause the small signal has to be converted on
* a 0-5V scale, at the same time that input is multiplexed with ICSPDAT input
* so you have to disable the capacitor in order to program the device
* temporarily removing the designated small solder joint. */

The bottom side of the PCB has the mosfet and a small trimmer not implemented in this code, the trimmer i useful

if someone whants to set a temperature treshold setting the trimmer.


Download source

Download gerber

12f683 fan-auto-sch

12f683 fan-atuto-brd

fan auto 00