3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

FanBus Digital Fan and LED Interface for PC

FanBus Digital Fan and LED Interface for PC
«
  • IMG_2531.JPG
  • IMG_2532.JPG
  • fanbus_controller.png
  • fanbus_systray.png
  • S1120009.JPG
  • S1120010.JPG
Last year I modified a blue LED fan with RGB LED's to enhance the look of my server case.  Last summer I built a gaming computer and ever since I wanted to light it up with multiple controlled lights and fans.  I finally figured out an easy interface and designed a simple network (the "fan bus") to connect microcontroller-based fan and LED controllers to.

The bus uses a simple TTL-level serial signal in half-duplex mode.  A MAX232 on the distribution board adjusts the RS-232 input from the PC to microcontroller-compatible levels.  A diode and pull-up resistor are used to convert the full-duplex UARTs (and MAX232) into half-duplex.  The diode is responsible for pulling the line low when the Tx pin drives low.  This allows a large number of devices to be plugged in at the same time without any damage to the serial hardware.  With a properly formed protocol there are no collisions or communication problems.

Every device has a pre-programmed/reprogrammable address stored and loaded from EEPROM that it uses to identify itself.

The devices I built are more RGB fan controllers which are modified from the original design (eliminate the MAX232 and compact the board a bit to save space).  They have the same functionality (4 RGB LED's with 256-level PWM, 256-level hardware high-speed PWM with drive transistors for the fan, RPM counting and readout from the fan's sensor wire).  Like the original, the new design is also based around the Atmel ATMega168 AVR microcontroller and the board has a programming header for in system programming.
 
Remove these adsRemove these ads by Signing Up
 

Step 1Gathering the Parts

Gathering the Parts
«
  • IMG_2295.JPG
  • S1120002.JPG
The parts list is essentially the same as before.

For the 5-port FanBus to Serial board:
1x MAX232 (I recommend a socket too)
1x Diode
1x 1K Ohm Resistor
4x 1uF Capacitor
6x 4-pin header (1 for power, up to 5 for FanBus devices)
1x 3-pin header

For one FanBus RGB Fan Controller:
1x ATMega168 (I recommend a socket on this as well)
1x 4-pin header
2x 3-pin header (or one 2x3 header, for ISP connector)
12x 300 Ohm Resistor
1x Diode
1x 1uF Capacitor
2x 10K Ohm Resistor
3x 1K Ohm Resistor
1x 1116 Transistor (or equivalent)
1x 1616 Transistor (or equivalent)
2x Jumper (I just used clipped resistor leads)

For one RGB Fan:
1x 4-LED PC fan with sensor (yellow or white) wire
4x 4-pin common-cathode RGB LED (diffused)
4x Length of 4-conductor ribbon cable
1x Roll of transparent tape to hold it together

A 6x6 inch, single sided copper clad board should be plenty.  I used one 6x6 board to make 3 FanBus controllers, one FanBus adapter, my original RGB Fan Controller, and a LocoNet to Serial adapter for a train set.  One piece of PCB goes a long way!

You will also need a laser printer to do toner transfer (I used my HP LaserJet 5M, got it for $10 at a university garage sale and it's perfect!).  I recommend glossy or semi-glossy paper.  I used the back of some newspaper ads, save the ones that are already 8.5x11" size paper as you don't even have to cut them to size, just feed it into the printer and go.  You will also need a clothes iron (preferably one you don't use for clothes anymore) and a bottle of etchant (I used ferric chloride, $10 at RadioShack for a pretty large bottle that will last you a while).  To cut the boards down to size I used a Dremel with cut-off wheel.
« Previous StepDownload PDFView All StepsNext Step »
6 comments
Feb 23, 2012. 3:18 PMSalisen says:
I've been following your RGB fan project through, I've got everything working with the exception of rgbfan_win.exe (the random colour program does however work). Even after managing to get rgbfan_win.exe to compile properly on Windows 7 64-bit, it quits with the error "...unable to start correctly (0xc000007b) ...".

I'm loving the new Visual Basic control program, and the new microcontroller code- and I'd be really interested in downloading both for my own exploration (I'm very much new to microcontrollers).

I'd really appreciate it if you could upload the new microprocessor code and the new Visual basic control program (and source). I'd stand to learn a lot from both!

Kari
Aug 30, 2011. 1:58 AMdvforce says:
Hi I have a question. how do I connect three fan-RGB controller boards in a single serial port and if you can specify more components.
Jul 21, 2011. 12:29 AMpgan says:
I know a good amount of Electronics but not much about programming AtMega chips. Just how complicated is applying your code to the Processor?
Aug 8, 2011. 4:07 PMpgan says:
I meant the AtMega Processor xD

My question was how complicated is it to use the code you provided on the Atmega processor. Sorry for the confusion xD

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
52
Followers
9
Author:CalcProgrammer1
I'm attending Missouri University of Science and Technology for Computer Engineering. I like working with electronics, and I'll post instructions on projects. I also like the Nintendo Wii and the Xb...
more »