Jump to content
Sign in to follow this  

[BUILD] 10 Channel USB PWM Fan Controller

Recommended Posts

How did this start?


I have 7x Corsair SP120 and a pump on my mini-itx rig which are all controlled through the swiftech 8-way PWM splitter which I got with the cooler. While splitting PWM sounds great in theory, I found out that the splitter does not work well with Corsair SP120 fans which are 'sensitive'.


I did a bit of reading, and built a simple diy PWM amplifier using a 555 timer.


That was great! However, while I could now effectively control fan speeds, if I wanted everything quiet, the pump would almost not run at all! >_< Bugger! So I needed an alternative option where I could control each group of fans separately, and this is when I decided to build my own Fan Controller.


What I want to do/achieve

Build a PWM Fan Controller with a USB and software interface that has lots of features:

1) individually control speed of up to 10 devices

2) linked fan control

3) temperature sensor (modular/wired and can be put against cpu/gpu/hdd/mobo/etc)

4) adjust temp based on temperature

5) individual/linked speed scheduler

6) LCD output (more of a gimmick, but why not!)

7) etc/as other features/thoughts come to mind



How can you help?

Offer ideas/feedback/criticism, or other suggestions



Complete Log (Brief)

0) Put together rough designs (drawn poorly, not CAD), and put together a simple prototyping board for a PIC18F2455 and some breadboards + basic firmware

1) Reading the fan speed/RPM. I got the microcontroller to output fan speed every second and that seemed to work fine

2) Implement PWM through the firmware. That was equally simple to implement.

3) Implemented a basic USB interface (and moved away from Serial). This allowed me to initially just read the RPM.

4) Improved the software interface to allow me to read and set PWM cycles.

5) re-wrote software interface ground up with improved features (slider to control PWM, PWM calibration. (week 16/06)

6) Implemented temperature sensor, on design, prototyping board, firmware and software interface

7) Learn to use Eagle (weekend 21/06)

8) Redesigned schematic to use a PIC18F4550 to support LCD, temp sensor and 2 LEDs (for status or whatever end user wants to do) (and ordered some parts, which I've been waiting on for a while)

9) Built circuit on a prototyping board for new schematic, except for the IC and Fan headers (waiting on those from UK)

10) Not happy with size, and decided to etch my own board.

11) Learn to etch boards, acquired material, and trialled couple of small designs

12) Redesign schematic for bottom layer only (24/06)

13) Etch final schematic (25/06)


What's Next as at 25/06

1) Drill PCB and solder parts

2) Firmware implementation:

a) LCD implementation

3) Software implementations:

a) LCD control

b) Calibrating Fans

c) Linked fan

d) individual Fan Scheduler (software-based for now)

e) Switching between PWM Control and % speed control

f) Fan profiles

g) Linked fan profiles

h) Fan names + mapper

i) Profiles based on temp with overriding rules


Detailed Progress log as at 25/06

By way of update, I got some parts and waiting for some more.


Meanwhile, I redesigned my 9-Channel USB PWM Fan Controller to a 10 Channel USB PWM Fan controller with these extras:

1) 2x16 monochrome LCD support (software is WIP)

2) 2xstatus LEDS (for debugging. software is WIP, but i'll probably allow user-control)

3) Temp sensor (this modular/wired. so it can be put against motherboard/cpu/gpu/hdd/whatever)


I've also had some time to work on the firmware and software. I've basically re-written the app ground up in WPF (so I can make it look nicer later on)

Software now implements:

1) slider for fans

2) temperature readings

3) Fan calibration (i.e. tries duty cycles 0 -100 to see what duty cycles give what RPM/% fan speed)\



Software update:

Posted Image


While still waiting for the parts, I started preparing a breadboard. It resulted in a 150x100mm config for the 10 fans and other output/input (LED, LCD, Thermistor, ICSP).

(Pin headers for Fans missing, and the PIC18F4550 Those are the only parts I've been waiting on.


Posted Image



I went nuts here and decided to solder bridge everything. Was first time experimenting with this particular board. The pads make it fairly easy to solder bridge.


Posted Image



Although I liked the design and soldering outcome, I didn't like the size and decided to etch my own board. Having some extra spare time, I learnt how to use Eagle, re-designed the board, learnt (thanks internet!) how to etch boards, printed, got some copper clad and experimented a bit. For those who use Eagle, I've only used it 2 days now and REALLY hate the autorouter. It probably uses the worst algorithms there are. I tried a lot of times with different parameters but eventually just gave up. What you see on the board below is what I fully manually routed (yes, can probably improve).


I just now finally etched the board and cleaned it, and guess what... I got my parts earlier today! The only thing to progress this project further is to drill the newly baked pcb tomorrow, solder the parts. After that's done I'll have a complete prototyping board to fully work on the firmware and software.

(you will notice I forgot it's now a 10 channel fan controller, but still etched '9 channel' on it, it's just a typo )


Posted Image



Photo of PCB, iphone 4s and 250mL up&go for size comparison


Posted Image


Btw this is what I would call my "proper prototyping board". It wouldn't necessarily be what the end user would have/use. For example I've provided pin-outs for all the pins of the IC and also ICSP, which would normally not be included in a final product


Also, I realise I will need bigger traces to power 12v fans and for ground. I'll look into that in an updated version later on. I'll be focusing on firmware/software for now

Share this post

Link to post
Share on other sites

Holey smokes, I am impress!

Look forward to seeing how this all works out for you.

Share this post

Link to post
Share on other sites

Detailed Progress as at 27/06


1. "Minor" issues with the board.


2. Redesigned the board with thicker connections and solved a couple of things I forgot/mixed up the first time. Already printed and etched it, but too late/early to drill and solder.


Posted Image



3. Updated Firmware and software to support control of 10 fans (hiccups with 4 inputs because of poor circuitry on first board :confused: )


Posted Image

(forgot to plug in temperature module)



4. Successfully tested 6 fans with individual controls (see picture below)


Posted Image



What's next?

1. Drill holes and put new prototyping board together.

2. Test/debug software

3. Progress other features mentioned in OP

Edited by ameel

Share this post

Link to post
Share on other sites

Detailed Progress as at 30/06

1. Drilled remaining holes on new board

2. Soldered components

3. Re-wrote firmware partly to match new board's i/o configuration

4. Noted 3 channels seem to still be giving trouble. Upon comparing with the previous board (re-mapping the pins), I figured out 3 of the chip's i/o were defective.

5. Change chip, and Tada! All 10 channel now working.


Here's the newboard running 6 SP120 and 1 Pump:


Posted Image



On the software it looks like this:

Posted Image


What's Next

1. Might look at LCD tonight, although I now realise I should have got a GLCD instead. But still keen to try it out.

Share this post

Link to post
Share on other sites

Detailed Progress as at 01/07

1. Working LCD (firmware-controlled only)


What's Next

1. Will see about implementing software-side updates for LCD. Need wrap my head around couple of things to get this to work.

2. I should really get a graphical LCD. Could display more stuff, and costs about the same anyway.


LCD demo:

Posted Image

Edited by ameel

Share this post

Link to post
Share on other sites

Not to keen to spend anymore until pay day, although the graphical lcd is fairly cheap >_<


Would be a couple of months at least before I get to the standards I'm happy with. Right now, it actually achieves the original functions I wanted, which is individual fan control.


Implementing the software-side of things is very easy (profile, scheduler, renamed/mapped fans, linked fans, temperature-profile override, customisable LCD display, etc). Unfortunately, because it's very easy to do (and therefore not challenging), means I'm not particularly excited to work on them, so I'll probably only progress slower from now on.



Detailed Progress 02/07

1. Software-controlled LCD text implemented

2. Firmware "handover" from firmware display loop to software control implemented



What's next

1. Need to fix some minor hiccups with firmware display loop

2. Will implement eeprom features


LCD showing software control:

Posted Image

Edited by ameel

Share this post

Link to post
Share on other sites

Detailed Progress 03/07

1. Fixed hiccups with LCD display loop (now all working properly)

2. Implemented setting custom text on LCD from software, and switching back to firmware LCD display loop

3. Implemented custom text in firmware LCD display loop (saved in eeprom, i.e. text is shown in LCD display loop without requiring software interface)

4. Implemented EEPROM for PWM values, i.e. preferred PWM values are saved and don't need software interface

5. Implemented read/write functions for debug (both firmware/software)


What's next

I'll look into the following over next few weeks, not in any particular order:

1. Complete Fan Calibration Logic

2. Switching between PWM control and Fan speed % control

3. Fan Profiles (names, temperature profiles, linked groups etc)

4. Adjustable PWM Refresh Rate

5. Resetting Firmware Default Settings

6. Scheduler + Temperature Overrides

7. Re-writing firmware and software to optimize code

8. Re-designing software UI



Edited by ameel

Share this post

Link to post
Share on other sites

Detailed Progress 04/07

Various Software/Firmware updates:

1. Calibration now fully working and recorded

2. Renaming Fan

3. Displaying all values in EEPROM

4. Changing Refresh Rate(Resolution in ms) on the fly through software and saved on EEPROM --> The higher the refresh rate, the longer it takes to show RPM, but the more accurate the reading.

5. Assimilated functions into tabcontrol for easier management/debug

6. Read Set Custom Message when LCD is cycling info

7. Added Refresh Rate resolution info on LCD cycle


What's Next?

1. Will implement other features previously described. I might take a couple days off this project as we approach the weekend. Got a fairly busy schedule starting Friday to Monday.


Calibrating fan0 from 0 to 100 steps

Posted Image



Calibrating fan0, fan1, fan6, fan from 0 to 4 steps

Posted Image



Changing Fan Names:

(Dialog Popups on doubleclick)

Posted Image

Posted Image



Populating EEPROM data:

Posted Image



Fan Output Tab:

Posted Image



LCD Tab:

Posted Image



Other Functions Tab (Change RPM Refresh Rate)

Posted Image

Share this post

Link to post
Share on other sites

Thanks guys.


I'm taking a break from the project for now as I've already achieved my initial goal and beyond. Instead of progressing any further, I'll likely restart this project and redesign from ground up into a more efficient/performing version in a couple of weeks or so

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this