Keep Cool With This Open Source AVR Fan Controller

We’ve all got projects kicking around that we haven’t had time to document for our own purposes, let alone expose to the blinding light of the Internet. There are only so many hours in a day, and let’s face it, building the thing is a lot more fun than taking pictures of it. It took [Matthew Millman] the better part of a decade to combine everything he’s learned over the years to finally document the definitive version of his open source intelligent fan controller, but looking at the final result, we’re glad he did.

At the heart of this board is an ATmega328P, but don’t call it an Arduino. [Matthew] makes it very clear that if you want to hack around with the code for this project, you’re going to need to not only have a programmer for said chip, but know your way around AVR-GCC. He’s provided pre-built binaries for those content to run with the default settings, but you’ve still got to get it flashed onto the chip yourself. The project is designed to use the common DS18B20 temperature sensor, and as an added bonus, the firmware can even check if yours is a bootleg (spoilers: there’s an excellent chance it is).

Arguably the most interesting feature of this fan controller is its command line interface. Just plug into the serial port on the board, open your terminal emulator, and you’ll have access to a concise set of functions for querying the sensors as well as setting temperature thresholds and RPM ranges for the fans. There’s even a built-in “help” function should you forget a command or the appropriate syntax.

Originally [Matthew] developed this project as a way to control multiple fans inside of a PC case, but naturally, things have changed quite a bit since those early days. While today there’s no shortage of fancy controllers that can handle throttling an array of fans based on the internal temperature of your rig, there’s still something to be said for rolling your own solution. More importantly, there’s certainly other potential uses for a fully open source programmable fan controller.

TinyDriver – ATtiny84 Platform Without Arduino

You don’t need an Arduino for everything! Or do you? This is an argument that plays out here quite often. Whatever the outcome, most folks agree that once you’ve dipped your feet in the shallow end of the pool, the real fun is when you dive into the deep end.

[Mahesh Venkitachalam] designed tinyDriver, an experimental Open Source breakout board for the Atmel ATtiny84 chip. His idea was to create a convenient platform which can be used to understand microcontrollers in-depth, by letting users dive under the hood and make use of the various features of the chip such as timers, PWM, interrupts, ADC, and digital I/O. The ATtiny84 is cheap and simple enough for starters. Add a low-cost AVR programmer, install the free and cross-platform avr-gcc and avrdude tool chain, read up the data sheet, learn some C programming and start experimenting. Rinse and repeat and you’ll be a pro at it soon. He’s got a few starter projects documented on his website to get you going.

The hardware is open source, and the Git repository contains the hardware source and example code. If you’re a hardware noob, he’s thoughtfully added a PTC resettable fuse and reverse polarity protection on the board to make sure you don’t release the magic blue smoke prematurely. All of the I/O’s are broken out on a header, and the motor driver and RGB LED can be disabled when not needed. The board isn’t hand-assembly friendly, but he plans to crowd fund it shortly. If you want to move beyond the Arduino platform, projects like the tinyDriver are the way to go.

The HackadayPrize2016 is Sponsored by:

AVR Programming 02: The Hardware

You may be able to write the most eloquent code in the history of embedded systems but without a way to run it on the hardware it will be worthless. In this installment of the tutorial series we will:

  • Look at some of the available AVR programmer options
  • Place the microcontroller on a breadboard and connect it to a power supply and a programmer.
  • Use programming software to send some example code to the microcontroller

If you missed Part 1 take a few minutes to review that portion of the tutorial and then join us after the break.

Series roadmap:

Continue reading “AVR Programming 02: The Hardware”