Instructables

Color Changing Digital PC Fan Controller

Featured
We've all seen LED fans that you can put in your computer to make it look cool.  They usually come in blue, sometimes red or green and consist of a basic PC fan with 4 bright LED's mounted in the 4 corners.  They source their voltage from the fan's power input, so if you're using a fan controller (either the one built into your motherboard or otherwise) to slow the fan, the LED's get dim.

Well, I got a new case for my server and it took 120mm fans, so I had to buy new fans for it.  I got a nice blue LED fan for the front but one of the LED's was burned out and it didn't look good, plus the fan was loud and I was out of controllable channels on my motherboard.  I got a free replacement for the bad LED, but I already had my mind set on converting the fan with the bad LED into something much better using what I'd learned about microcontrollers last Fall.  The plan?  A self-contained, digital, full control fan controller based around an AVR microcontroller that could have fine control over the fan's speed, read back the RPM, and control not just the brightness of the LEDs but also the color.  Having seen a lot of cool projects using RGB (red-green-blue) LED's online, I figured it would be a good project.

 
Remove these adsRemove these ads by Signing Up
gomme60010 months ago
Good project, I opted for an easier option. I got two colour changing solar lamps (for the garden), dismantled them, took out the board with colour leds. Now because each was 1.5 volts I connected them in series and put the positive on the orange wire on the 24 pin motherboard connector and the negative to any 3 of the black wires. The I just mounted then into the fan and I all works perfect. P.S: I did this on the heat sink fan on my open server.

Photos below vvvvvvvv

http://www.instructables.com/files/deriv/FNZ/L202/HH2W0O0R/FNZL202HH2W0O0R.THUMB.jpg
http://www.instructables.com/files/deriv/FX1/FSHK/HH2W0O0N/FX1FSHKHH2W0O0N.THUMB.jpg
http://www.instructables.com/files/deriv/FIZ/Y68L/HH2W0O0L/FIZY68LHH2W0O0L.THUMB.jpg
IMG_20130602_091245.jpgIMG_20130602_091240.jpgIMG_20130602_091236.jpg
CalcProgrammer1 (author) 1 year ago
I'm working on a new protocol for the "FanBus" RGB Fan Controller system. The "FanBus" design (see my more recent Instructable) is designed to have more than one fan on a serial port, but otherwise is identical hardware. I'm using the original design built here as a test bed for new software, this time running the serial line at 38400 baud (up from 19200) and implementing a new register-based protocol that should make communications more reliable (designed so that collisions should be impossible).

The new framing is:

0x00 0xFF

This is a write operation, for a read, a value of 0x01 is used instead for the start byte. To prevent collisions or framing errors, the value may NOT be 0x00, 0x01, or 0xFF (as if these were allowed, a misaligned frame could be read incorrectly as valid). As for the internal register address, the new scheme sets up a virtual register bank which consists of pointers to code variables, allowing quicker, simpler reads and writes of values without a long chain of if/else or switch/case statements. In tests it is performing well, and I got my Processing audio script up and running with it which looks epic. I need to clean up the code and revise the initialization sequence to get the save-to-EEPROM and fade-in operations fixed, then push the code to my 3 FanBus controllers in my desktop to do a multi-unit test. Just goes to show that hardware isn't the only thing, a nice software/firmware update can make a HUGE difference!
Edit to the above:

The new framing is:

0x00 (device internal address) (device hardware address) (value to write) 0xFF

I used less-than/greater-thans which were not shown for some reason.
segapuppy1 year ago
Does anyone have a circuit diagram for this? I would really appreciate having it, it would be for a class. Thank you.
brains12 years ago
nice might try it a lot of work thow
CalcProgrammer1 (author) 3 years ago
http://www.youtube.com/watch?v=kQJaOcYtfAg
For some reason the embedding didn't work, but here's a video of my new RGB fan system in my new computer.  The Processing script processes the audio output and uses the fan LED's for audio visualization.

zack2473 years ago
AWESOME! if i had the parts i would do this. it looks totally awesome. i wish my case fan had leds, too bad its flat black. but thats where chrome spray paint comes in! (then i'll add my own, no matter what anyone says)

and dont feel bad about your case, look at mine:
-Intel celeron 400mhz processor
-256mb SDRAM, hoping to bump up to 512
-2 10GB hard drives (IDE)
-350W power supply
-64MB PCI graphics card
Its a shame, i know :(
S1010010.JPG
CalcProgrammer1 (author)  zack2473 years ago
Lol, wow!  I'm going to build a new gaming desktop in the next few weeks, looks like I'll have to build another one of these.  I'm going to use an Antec 900 case which has two front fans, each with 3 LED's instead of 4, so I may modify the design for 6 LED's.

What's the circuit board hanging out the side of your PC for?
I'm using an Antec 902 Case (Essentially the same but for a few minor details), and I have to say, it's great. Are you going to light up the "Big-Boy" fan on the top, because I personally think that would be awesome. You'd need more than four LEDs though, I'd think.
CalcProgrammer1 (author)  Archive5553 years ago
I finished installing the RGB fan in my 900 case (I just used the one I already built, though my new design is in progress). It looks really nice in the side panel. My new design is what I'm calling "FanBus", a modified i2c bus interface where each fan has a small surface-mount PCB attached that has a microcontroller for the LED's and fan speed/RPM feedback. The fans will connect in a chain to a master device (probably a front panel with 2x16 LCD) which will interface it all to the PC via USB or serial. I'm working on a self-addressing i2c using a chain (addresses each chip down the chain until it gets to the end). This should allow me to light up the two front fans (which I'm going to replace with clear fans) and the side fan, maybe the top "Big Boy" fan if I can figure out how to put LED's in it and read RPM from it. The rear fans (I have two rear 120mm's sandwiching a Corsair H50 radiator) will probably be the TriCool fans pulled from the front since lighting the back isn't as important. I'll also build an LED light bar with a microcontroller and 5 or so RGB LED's to just light up the inside of the case. Combined with a Processing script to process audio from the stereo mix input it will look awesome with music.
I finally designed the new boards. I am using a half-duplex serial bus at 5V levels to communicate with multiple boards. The "master" is simply a MAX232 board with molex connector and RS-232 connector. It then connects using a 4 pin connector to each fan controller board (Ground, Data, +5, +12). The serial line is pulled up by a resistor and the transmit pins pull down using diodes to create the signals. The hardest part will be fitting the fans into my Antec 900 case's front fan mounts which are cramped and have no room for running wires.
hey, i got a new mobo for my "GPC". along with a new case. Specs: -intel pentium D 3.2ghz processor -2 Gigs ddr2 ram -So far no hard drive -Dell 250W PSU (i really need to get a better one) -ATI Radeon 9250 256mb pci-e video card (the best ive got) and thats the specs of my upcoming "GPC"
sorry for the late reply. that cicuit board was used because my 64mb video cards fan dies, and i installed a new one. i didn't feel like cutting off the plug, so i soldered together a board so i plugged the fan in, and a floppy molex connector in. (pointless, i know) but you may/may not be happy to hear that i have migrated the internals into a new case. this case has a plastic (but i call it acrylic) sheet on the front which is edge lit by the power led and the hdd led. very nice, i have to say. i would have uploaded photos but i cant find my camera... unfortunately, the wires arent very much more organized. im building a gaming pc soon too. 1gb ddr RAM in 4 of the available 8 slots,a pentium 4, and possibly a 256mb agp card. (so its not very much of a gaming pc... but it would be the most top of the line pc ive ever owned.) im doing a led fan mod contraption maker recently posted, and it works.
WarLockStar3 years ago
AWESOME! A1 Job, I Really Like this project and It is definately On My to do List now, I am just trying to learn some things here and even Bought Me a Arduino Duemilanove to mess around with, But still am trying to do Code, and of Coarse Not very good at making Boards yet either, so If you happen to have a Board or Two available I surely could use. Please!! :) But anyhow Great Job!! 5 Stars all the way! and a Fav... Respect, WarLockStar
CalcProgrammer1 (author)  WarLockStar3 years ago
I only ever made one board, the one in the pictures. Making boards is pretty easy and cheap if you have access to a laser printer, you just print out the board design and iron it on to a blank copper clad PCB (buy on Digi-Key, Mouser, or other electronics store). Then you etch it with etching solution (you can make this using household chemicals, there are Instructables on it, or you can buy ferric chloride etchant).

I would recommend learning to code first before trying to make boards. Start by learning the Arduino and then try working with a bare AVR chip alone (the Arduino uses a different programming environment than AVR C).

Also, if you don't have one yet, buy a breadboard. They are incredibly useful tools for wiring up projects.
lol ok thank you, and yes I have several breadboards already and some other AVR programmers and misc mess of lots of chips and things I bought a Crap-load from a few Places in Hong Kong a while Back, started by Making a 3x3x3 LED Cube, and after Made a 4x4x4 but got stuck on trying to make code for it to work, the 3x3x3 was easier I had pretty much someone Gave me the outline for doing that one, and then I Bought RGB LEDs to Make another One But that was just before I got Ill and Had to take a break from it all... But yeah i was Hoping you Had any of the boards layin around.. :) it would Have Made things easier for me to do this Mod lol thank you for your Fast reply! Respect, WarlockStar
CalcProgrammer1 (author) 3 years ago
I finally got a music visualizer working for the fan.  I wrote the code a while ago and never posted about it, but I've been tweaking it to make it better.  Right now it's just written in Processing but it looks awesome.  I'll post a video soon.
domiflichi4 years ago
Awesome project!
amando964 years ago
 Wow, i have never, ever seen a PDIP max232...
PlastBox4 years ago
Awesome hack! Now write control software in php (a program that listens for incoming socket connections, and php-script that connects and sends commands) and let us control it, eh? ^^ Perhaps even a camfeed of that delicious crossfading? ;)
Shadyman4 years ago
Great job :D

+2 Internets for etching your own board, +5 for using an oscilloscope during prototyping ;)

You also made it on Hack-a-day, http://hackaday.com/2010/03/03/led-and-fan-controller/
Shadyman4 years ago
You can fix breaks in the toner transfer by using a sharpie. The sharpie marks won't dissolve in the acid, and can be removed later with isopropyl alcohol. :)
CalcProgrammer1 (author) 4 years ago

I filmed a video of the fan controller in action with a new "color wheel" program I wrote.  It isn't perfect yet but it works nicely (the program randomly stops after several hours though, don't know why as it's in a while(1) loop).
Wow. This is one of the few instructables that gets a 5.0 star rating from me. When I got my HAF932, I didn't like the red LEDs in the front fan, so I replaced them with green LEDs. I've always thought it would be cool to try an RGB LED fan + controller, but this is over-the-top; you even wrote a GUI program to control it.

Awesome! (FYI, I found this instructable via Zedomax: "http://zedomax.com/blog/2010/02/25/pc-fan-diy-how-to-make-a-nexus-one-pc-fan/")
Thanks!
CalcProgrammer1 (author) 4 years ago
I just got the RPM monitoring to work!  Needed a 1 Hz loop to compute it (basically take the counts per second times 60) and ended up using the Watchdog timer since it was available.  Also implemented feedback for all LED values and fan speed.  I still want to get crossfade working in hardware and then the micro code is done.  The GUI still needs some work (it is a sloppy mess of source code but it works enough for testing).
qwertyboy4 years ago
Very cool. I might have do do this if one of my blue LED 80mm fans dies.

A video would be nice.
CalcProgrammer1 (author)  qwertyboy4 years ago
I haven't filmed any more videos because I don't have the color fading working yet (want to write a "color wheel" app that rotates colors slowly around the fan).  However, here's a concept video from when I was still designing it on the breadboard, I didn't have a working serial port code so I just used color fading to test the fan speed and color fading.  While all 4 LED's are individually addressable, I was linking them all together to make it easy.

http://www.youtube.com/watch?v=TJ_oJXBIyJ4
Even just the fading is really cool. Nice Job!
frollard4 years ago
Very awesome, and totally feature-worthy, congrats!

Can't wait to see the final version of the program!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!