[BUILD] 10 Channel USB PWM Fan Controller

Discussion in 'Modding Worklogs' started by Ameel, Jun 25, 2014.

  1. Ameel

    Ameel Member

    Joined:
    Feb 28, 2008
    Messages:
    502
    Location:
    Watson, ACT
    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:
    [​IMG]

    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.

    [​IMG]


    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.

    [​IMG]


    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 )

    [​IMG]


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

    [​IMG]

    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
     
    Last edited: Jun 25, 2014
  2. mad_mic3

    mad_mic3 Member

    Joined:
    Jan 18, 2009
    Messages:
    2,273
    Location:
    Nulkaba
    looks like a cool little(huge) project:thumbup:
     
  3. Recharge

    Recharge Member

    Joined:
    Sep 5, 2001
    Messages:
    9,564
    Location:
    Brisbane
    for the love of jebus, please resize pix, or host on ocau pics , it auto resizes and allows you to click image to show larger.

    otherwise, good job so far
     
  4. OP
    OP
    Ameel

    Ameel Member

    Joined:
    Feb 28, 2008
    Messages:
    502
    Location:
    Watson, ACT
    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.

    [​IMG]


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

    [​IMG]
    (forgot to plug in temperature module)


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

    [​IMG]


    What's next?
    1. Drill holes and put new prototyping board together.
    2. Test/debug software
    3. Progress other features mentioned in OP
     
    Last edited: Jun 27, 2014
  5. gazza30

    gazza30 Member

    Joined:
    Aug 28, 2009
    Messages:
    1,118
    Location:
    FNQ
    looking good man :thumbup:
     
  6. Dr Evil

    Dr Evil Member

    Joined:
    Oct 20, 2010
    Messages:
    2,855
    Location:
    Perth
    Amazing work:thumbup: want more progress:thumbup:
     
  7. Acesi7

    Acesi7 Member

    Joined:
    May 25, 2009
    Messages:
    2,149
    Location:
    Melbourne
    This is really cool stuff mate. Keep it up!
     
  8. OP
    OP
    Ameel

    Ameel Member

    Joined:
    Feb 28, 2008
    Messages:
    502
    Location:
    Watson, ACT
    Have friend from interstate this weekend. Only got to drill the holes and solder few components today. Will unlikely progress this weekend (unless I manage to squeeze some soldering here and there), but should get the board ready by Monday.
     
  9. sjp770

    sjp770 Member

    Joined:
    Apr 23, 2009
    Messages:
    1,717
    Location:
    Sticks, NSW
    Very cool :) subbed. Ps pics are fine. Not sure if you changed or not but I hate thumbnails, don't go there.
     
  10. OP
    OP
    Ameel

    Ameel Member

    Joined:
    Feb 28, 2008
    Messages:
    502
    Location:
    Watson, ACT
    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:

    [​IMG]


    On the software it looks like this:
    [​IMG]

    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.
     
  11. moloko vellocet

    moloko vellocet Member

    Joined:
    Feb 7, 2006
    Messages:
    619
    Nice work dude! I'm keen to see further development and progression. :thumbup: :)
     
  12. OP
    OP
    Ameel

    Ameel Member

    Joined:
    Feb 28, 2008
    Messages:
    502
    Location:
    Watson, ACT
    I've got the lcd working and looping rpm of each fan and temperature (firmware based) as a default configuration. Will implement some software based/controlled lcd display later and post some pics. But I really need a graphical lcd. I would be able to display more stuff.
     
  13. digamma

    digamma Member

    Joined:
    Mar 12, 2002
    Messages:
    2,721
    Location:
    Brisbane, Southside.
    Take my money!
     
  14. gazza30

    gazza30 Member

    Joined:
    Aug 28, 2009
    Messages:
    1,118
    Location:
    FNQ
    Can't wait to see more. How much power can this thing handle per channel?
     
  15. OP
    OP
    Ameel

    Ameel Member

    Joined:
    Feb 28, 2008
    Messages:
    502
    Location:
    Watson, ACT
    haha, yes yes

    The fans are powered directly by molex.
    According to formfactors, a fan will spike at least 1amp on spinup for 1 sec, but fans otherwise sit on 0.25mA (from memory).

    So for 10 devices, you want a source that can feed at least 10A.

    Depending on gauge of PSU molex, can feed about 6-10Amps. To be safe, you'd want to hook 2 molex to power the fans for the 1 second startup to stay within parameters. Alternatively, Friend suggested an incremental/delayed spin up of fans. That's something I'll look at last as I'm not in a hurry to redesign the board for a while (not particularly urgent/pressing issue atm). Using 2 PSU molex is very easy to do in any case, just hook up 2 molex cables instead of 1. Supply 5 fans from 1 cable, and 5 fans from the other. I'll have to think about delayed/incremental spin up later on (but that would add some complexity to the circuit).

    Otherwise, the IC is fed from USB 5v. Tach signal boosted from 5v from PSU molex

    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.

    LCD demo:
    [​IMG]
     
    Last edited: Jul 1, 2014
  16. mad_mic3

    mad_mic3 Member

    Joined:
    Jan 18, 2009
    Messages:
    2,273
    Location:
    Nulkaba
    looking sweet as, hope you do the graphical 1, id possible be interested 1 :thumbup:
     
  17. OP
    OP
    Ameel

    Ameel Member

    Joined:
    Feb 28, 2008
    Messages:
    502
    Location:
    Watson, ACT
    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:
    [​IMG]
     
    Last edited: Jul 2, 2014
  18. OP
    OP
    Ameel

    Ameel Member

    Joined:
    Feb 28, 2008
    Messages:
    502
    Location:
    Watson, ACT
    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

    https://plus.google.com/106571501264837102999/posts/CYT6FxZ2DRs
     
    Last edited: Jul 3, 2014
  19. OP
    OP
    Ameel

    Ameel Member

    Joined:
    Feb 28, 2008
    Messages:
    502
    Location:
    Watson, ACT
    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
    [​IMG]


    Calibrating fan0, fan1, fan6, fan from 0 to 4 steps
    [​IMG]


    Changing Fan Names:
    (Dialog Popups on doubleclick)
    [​IMG]
    [​IMG]


    Populating EEPROM data:
    [​IMG]


    Fan Output Tab:
    [​IMG]


    LCD Tab:
    [​IMG]


    Other Functions Tab (Change RPM Refresh Rate)
    [​IMG]
     
  20. Deathwalks69

    Deathwalks69 Member

    Joined:
    Sep 21, 2012
    Messages:
    110
    Location:
    Queensland, Bundaberg

Share This Page