AVR based fan controller