App note: PC fan control using an ATtiny13

Dumb PC fans come with 3 pin jacks, and have no PWM control. This app note explains how to make a “smart” fan from a “dumb” one by implementing PWM control using an ATtiny13 microcontroller.

This application note describes the operation of 12 volt DC  cooling fans typically used to supply cooling air to electronic  equipment: These fans are typically based on two-phase Brushless DC (BLDC) motors drawing between 1 and 50 watts of power. Single-phase brushless DC motors are also used in fans,  but this is outside the scope of this application note.
Further discussion describes the addition of an Atmel ATtiny13  microcontroller and the benefits this offers, such as variable speed by external thermistor input. An additional input is a PWM pulse width-varying signal, which also controls fan

Join the Conversation


  1. They thought of everything except for the pulse counter. I think the host PWM would mostly only work if it receives a pulse ticker, so instead of using a thermistor for temperature regulation, make that an output and report RPM.

  2. To be honest I’m a little horrified by the quality of the document and the idea Atmel have generated.

    I work in the fan industry and found that this is a poor idea.

    First off there are lots of PWM fans available that you can use in your PC . Yes they are more expensive but there is generally a reason. They are not made from $1 worth of parts. These cheep fans have limited life, plastic bearing etc. A good quality fan will out last the life of the PC. What you would like more, the fan to stop working and your PC over heat.

    Anyone who really wants to do this should first look at quality built BLDC fans and the large array of BLDC micro’s and controllers that are available from people like Atmel and others.

    I would not recommend people ripping apart fans to then relay on them in their expensive PC’s.

    As one last point – these cheep DC fans (and even the better ones) that have no speed control input – consider changing the supply voltage to control the fan speed (Do not voltage chop) as this works very well, there are controllers designed to work like this, and anyone into electronics should be able to have a go at this and make a much better speed controller, for any fan.

    1. Hi Paul, I would be very interested in knowing how this is implemented. Is it through some sort of a buck converter or liner? if you have any designs plz shared them.

      1. Hi Filip, I could not post a circuit as I have designed a controller to do this and I would end up breaking IP. However I would certainly consider the buck regulator as a good choice to follow. Could easy drive this with a micro and then have any type of input you like, like a temperature sensor for example.

  3. I’d also really like to see a tutorial on AVR control of a PWM fan with a sensor. It’d be nice to get a baseline that individuals could adapt. I’ve spent countless hours searching over many months. If fans generate noise and use power, it only makes sense to turn them down when unnecessary. Interestingly Atmel has the following document, which I’ve found to be very informational.

Leave a comment

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.