In a previous posting, I spoke about the hardware concepts to be implemented in this project. Overall, its a pretty simple project; take a temperature reading and set the fan speed based on the temperature reading. In hardware, we only need a temperature sensor, which is the NTC thermistor and a means to drive the 5 volt D.C. fan, which is the ATtiny13’s PWM output driving an N-Channel MOSFET.
I had some stock of a SMD NTC thermistor from another project. The thermistor I used has a 10KΩ resistance at 25ºC. Perfect for what I was looking for. I figured two lengths of 30 AWG Kynar wire-wrap wire would be sufficient to make the connections from the themistor to the fan controller’s PCB.
The interface was easy enough; use a voltage divider and read the voltage using the ATtiny13’s on-chip Analog-to-Digital Converter (ADC). The schematic to the left is from MAXIM’s web site article entitled “A simple thermistor interface to an ADC“. The only difference in the circuit I used is that the thermistor (RT) and reference resistor (R1) are swapped.
Fan control was also fairly easy to implement. As I pointed out in a prior post, I used an MTD20N03 N-channel MOSFET “pull” from a defunct PC motherboard. The MTD20N03 has an RDSon of 35 milliohms with a Vgs of 1.5 volts typical, which is low enough to be driven easily by the ATtiny13’s digital output. To the left is a partial schematic of the MOSFET fan driver. As shown, the ATtiny13’s PWM output feeds R2 and C4, which form a simple low-pass RC filter to smooth the PWM’s operating frequency. Diode D1 and capacitor C3 help absorb any inductive kick fed back to the driver from the FAN during speed changes.
I decided to add a serial output to the project so I could log data from the device if I wanted to. I didn’t see the need for serial input to control the device, so the soft-UART implemented is TX only. A TTL-to-USB converter is required. I’m glad I added the serial output as it came in very handy for measuring performance of the DPS3005C, the fan controller and the cooling efficiency of the fan itself.
The full schematic of the fan controller is shown below. A PDF version can be downloaded here.
In the next post, I’ll talk more about the software. In the next post, I’ll talk about layout and building the PCB.