Summer Project: "Fanbus" Digital PC fan and LED System - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Hardware > Overclocking and Modding
Click Here to Login
Closed Thread
 
Thread Tools Display Modes
 
Old 06-04-2010, 11:10 PM   #1 (permalink)
 
Join Date: Nov 2006
Location: Illinois, USA
Posts: 2,363
Default Summer Project: "Fanbus" Digital PC fan and LED System

You may remember my previous project from early this year, the RGB LED Fan Controller. It is a custom fan controller I built that not only has digital, software controlled fan speed and RPM feedback but also four color-changing LED's that allow you to manually set the colors or cycle them using a program (or even make them flash different colors to music with a special app).

Well, I just built my new i7 build and going back to plain old blue LED's is getting boring. The Antec Nine Hundred case has four 120MM fans that are all within plain sight so just swapping one fan is hardly an option, but building four of my original fan controllers will require four serial ports and a lot of room to mount the boards.

The solution? A new, smaller design that simplifies multiple devices using daisy-chaining style connections. I will design a smaller RGB Fan Controller board using surface mount components that can be glued or otherwise directly attached to the fan, minimizing cable clutter. A single cable carries power and data to the fan and two ports per fan means that you can string them together in a chain. I will also design an LED controller that uses extra RGB LED's to shine onto the motherboard and PC components visible through the side window. All of these devices will connect to a "master" controller, which will connect to the PC using either serial or USB. The master controller may either be a small board that does nothing but interface, or it may be built into a front panel with an LCD display and digital knobs. This will allow the fans to be controlled either by software on the PC or front mounted knobs.

To simplify the interconnects, I plan to learn how to use the I2C interface to communicate between the master and slave devices.

This is just an idea I've been thinking about for the past few days, but I think it would be a very clean and professional way to connect case accessories and fans, and if I do it right the software shouldn't be terribly difficult either. Would anyone be interested in a system like this? I'm not doing this for money but I'd like to know what people think of the idea.

__________________

__________________

CalcProgrammer1 is offline  
Old 06-21-2010, 10:50 PM   #2 (permalink)
Newb Techie
 
Join Date: Jun 2010
Posts: 25
Default Re: Summer Project: "Fanbus" Digital PC fan and LED System

i can't see your picture but your project is quite interesting it's actualy your original projet wich brought me here on these forum cause for sumer time i plan on building a custom back cover to help air flow in my alienware M17 and i hope to build it with your methode as it would alow me to have a nice efect that fit with the rest of my lappy and at the same time if you add suport for aditional led it could help me correct th fact that the m17 head only light blue

the only draw back at the moment is that most modern laptop don't have a serial port mine is no exception it got everything but that
__________________

Granyte is offline  
Old 06-22-2010, 12:16 AM   #3 (permalink)
 
Join Date: Nov 2006
Location: Illinois, USA
Posts: 2,363
Default Re: Summer Project: "Fanbus" Digital PC fan and LED System

If you're really good with soldering you can usually cram USB devices into open spaces in laptops. I haven't tried it but I've seen other people do it, find the USB connections on the motherboard and use it with the circuit board from a USB to serial adapter. If that doesn't work you can try the V-USB firmware for AVR microcontrollers, it allows you to directly do USB communications at low speed.
__________________

CalcProgrammer1 is offline  
Old 06-23-2010, 12:20 PM   #4 (permalink)
Newb Techie
 
Join Date: Jun 2010
Posts: 25
Default Re: Summer Project: "Fanbus" Digital PC fan and LED System

i have next to no experience with soldering so soldering onto a pcb i made up my self is one thing but soldering onto my 3k lappy mobo .... and doing so what would be the modification done to your original project ? just soldering a usb cable instead of a serial one

also one last thing does your answer mean that you don't plan on pursuiing the project of making a new version that would suport more led and potentily aditional fans?
Granyte is offline  
Old 08-30-2010, 03:13 PM   #5 (permalink)
 
Join Date: Nov 2006
Location: Illinois, USA
Posts: 2,363
Default Re: Summer Project: "Fanbus" Digital PC fan and LED System

Time to revive this old thread, since I had no time during the summer due to work, I now have time at school and I got some new stuff to play with

Using the ATMega168 chip (same one I used before) I'm working up a master and slave configuration using the Philips i2c protocol (known as TWI - Two Wire Interface in Atmel's references). i2c is a common protocol which supports individual addressing of up to 128 devices with bi-directional communication using just 2 wires (SDA and SCL, a data line and a clock line). I spent quite a bit of time getting Atmel's provided demo code for the TWI module working but finally have solid communication between two microcontrollers so it's time to start working on my new fan controllers.

I also got a 2x16 character LCD module that is really simple to use. It would make a nice front-panel interface with a knob or some buttons. Now I need to port all my existing RGB Fan Controller code to using the i2c interface and write a new master code to convert serial data from the PC to i2c data for the fans as well as drive the LCD and any onboard functionality I want to add.
__________________

CalcProgrammer1 is offline  
Old 08-30-2010, 04:25 PM   #6 (permalink)
Newb Techie
 
Join Date: Jun 2010
Posts: 25
Default Re: Summer Project: "Fanbus" Digital PC fan and LED System

nice to know i've been experimenting with the ATMega 328 recently (inside the arduino platform) bu i'm having a **** of a hard time to manage a serial com capable of transmiting all the datas i need
Granyte is offline  
Old 08-31-2010, 01:25 AM   #7 (permalink)
 
Join Date: Nov 2006
Location: Illinois, USA
Posts: 2,363
Default Re: Summer Project: "Fanbus" Digital PC fan and LED System

Continuing with the i2c communications, I am trying to develop a self-addressing system where the master assigns each connected device an address (rather than programming each device manually). If the devices are chained linearly and wires do not branch, I should be able to use a third wire to enable devices individually. The master "turns on" the first device and gives it the first address, then the first device turns on the second and the master assigns the second device the second address and so on until the master receives no acknowledgement indicating that no more devices exist. This seems like a pretty simple idea and I have some untested code written for it.

As for Arduino serial communication, it's simple. Serial.begin() to start, Serial.Available() to check if there's new bytes, and Serial.read() (I think) to read in byte by byte. The harder part is creating a protocol (a formatting style) that allows you to transmit different commands. A simple protocol can be a 2-byte protocol, for instance where command tells the Arduino what to do and data is the data to perform the action with (for instance, if you're setting two lights, the command picks between the two lights and the data is the desired brightness level). However, I quickly found that a 2 byte system can fail if the Arduino misses a byte. If this should happen it is now out of sync and your data is interpreted as command and command as data, producing undesirable results. To counter this, I use "start" and "stop" bytes in a 4-byte format protocol. A known start byte starts the communication, then the command and data bytes, and then a known stop byte. If the first byte is different than the known start byte (or the stop byte is different from the known stop byte) then the packet has errors and is discarded.

In simple pseudocode, here is what I mean, this is essentially how my fan controller code reads the serial data:

do
{
//read and store latest serial byte
}while( latest byte is not the known start byte )
for(0 to 2)
{
//save 3 bytes
}
if( last byte is equal to known stop byte )
{
//proceed with operation on second and third bytes
}
else
{
//error, stop byte was incorrectly received
}
__________________

CalcProgrammer1 is offline  
Old 08-31-2010, 02:53 AM   #8 (permalink)
Lord Techie
 
S0ULphIRE's Avatar
 
Join Date: Mar 2007
Location: Australia
Posts: 8,668
Send a message via MSN to S0ULphIRE
Default Re: Summer Project: "Fanbus" Digital PC fan and LED System

Sounds good, bring on the project
__________________
"As a result of all this hardship, dirt, thirst, and wombats, you would expect Australians to be a sour lot. Instead, they are genial, jolly, cheerful, and always willing to share a kind word with a stranger, unless they are an American." -- Douglas Adams
S0ULphIRE is offline  
Old 08-31-2010, 12:14 PM   #9 (permalink)
Newb Techie
 
Join Date: Jun 2010
Posts: 25
Default Re: Summer Project: "Fanbus" Digital PC fan and LED System

thanks your pseudo code is helping much more then most of what i could find initiating the serial comm was not that hard but getting the protocol to work .....

and when you end up having several datas that might changes at the same time i will need more work on my c++ skills....

and keep up the good work i hope to see your project's result
__________________

Granyte is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RGB LED Fan Controller (custom electronics project) CalcProgrammer1 Overclocking and Modding 35 03-04-2010 01:07 AM
Repairing/Reconditioning a case/PSU fan CalcProgrammer1 Hardware Repairs and Troubleshooting 2 05-28-2009 11:34 AM
Blinking LED case fan pbrad08 Hardware Repairs and Troubleshooting 4 12-01-2008 01:26 PM
strange power problem: no boot, LED flicker, angry floppy drive AskMeAboutRNA Hardware Repairs and Troubleshooting 4 09-04-2008 08:36 PM



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 08:23 PM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.