equivariant

12V 4-pin PC fan controller (AVR)

Over the weekend I built a PC fan controller using an Arduino Diecimila (containing a ATmega168 microcontroller). As a learning exercise, I decided to write the firmware with avr-libc and forgo use of the Arduino environment and libraries.

The device has a potentiometer to control the fan speed and outputs the current RPM over serial. The hardware is straightforward: the fan is connected as described in Intel and Noctua's documentation and the supporting circuitry for the ATmega168 is contained in the Arduino itself. After building the circuit on a breadboard, I captured the schematic in KiCad.

Schematic

The firmware uses several peripherals:

I suspect the firmware would have been significantly shorter if written using the Arduino libraries. I may revisit this in the future and make a comparison.

The project files are available on GitLab: https://gitlab.com/equivariant/pc_fan_control

References