Electronics USB PWM controller

Discussion in 'Modding' started by slisgrinder, 18 Jul 2008.

  1. slisgrinder

    slisgrinder Minimodder

    Joined:
    14 May 2008
    Posts:
    268
    Likes Received:
    3
    Hey guys,


    I have been browsing through the guides here at bit-tech and I found an interesting tutorial on a PWM controller, now that got the little hamster wheel turning in my head and I started to wonder if a DIY USB fan controller is possible. May be even a multi-fan controller (kinda like ESA by Nvidia) which can be directly controlled by the computer on start up with a custom software running as a service could accompany this controller...so I know its possible, but is it feasible with all the hard work going into it? Any ideas/concepts are welcome but I want this to be strictly DIY that anybody with the resources could do, thnkx in advance...
     
  2. dan-ere-07

    dan-ere-07 What's a Dremel?

    Joined:
    29 Mar 2007
    Posts:
    289
    Likes Received:
    6
  3. slisgrinder

    slisgrinder Minimodder

    Joined:
    14 May 2008
    Posts:
    268
    Likes Received:
    3
    yes:hip:...but maybe without the temp sensors and with molex connectors instead...:idea:
     
  4. slisgrinder

    slisgrinder Minimodder

    Joined:
    14 May 2008
    Posts:
    268
    Likes Received:
    3
    oh, i will be gone camping for this weekend ( i am in canada) so i might not reply for about 3 days or so, but plz brainstorm among others to get this project going hopefully...
     
  5. jakenbake

    jakenbake full duplex

    Joined:
    5 Jun 2005
    Posts:
    495
    Likes Received:
    3
    you would probably need a u-controller.

    plus you would have to develop the software/usb drivers for the thing.
     
  6. mattthegamer463

    mattthegamer463 What's a Dremel?

    Joined:
    26 Nov 2004
    Posts:
    2,804
    Likes Received:
    1
    I can think of a relatively easy way to do it with a parallel port and a relay board, but it wouldn't have speed control or anything, just ON/OFF.
     
  7. ArcSpark

    ArcSpark Did I let the magic smoke out?

    Joined:
    10 Jan 2008
    Posts:
    75
    Likes Received:
    0
    Would this be the article you are referring too?

    It looks like all you need to do is swap VR1 with some other variable resistor you can control electronically. You may be able to feed pin 1 with a DAC directly, or have the DAC feed a voltage amp that feeds pin 1. So you send a number to a register that feeds the DAC. To change the fan speed, you send a different number.

    Maybe you could use a USB->serial converter for this then use a terminal program to send data to the DAC over that link. This could grow into something more complex where there is some sort of microcontroller that has a terminal server on the serial link, waits for 16 bit numbers, and sends them to the DAC.
     
  8. jakenbake

    jakenbake full duplex

    Joined:
    5 Jun 2005
    Posts:
    495
    Likes Received:
    3
    well, seeing as PWM is just the ON/OFF of a FET (quickly, might I add), that may work as long as the relay doesn't die on you...
     
  9. slisgrinder

    slisgrinder Minimodder

    Joined:
    14 May 2008
    Posts:
    268
    Likes Received:
    3
    yes that is the very tutorial you pointed out...DAC? I n00b at electronis, but i am experienced at soldering and basic component knowledge (resistors, caps etc and some fundamentals) and what is a u-controller?
     
  10. ArcSpark

    ArcSpark Did I let the magic smoke out?

    Joined:
    10 Jan 2008
    Posts:
    75
    Likes Received:
    0
    DAC=digital to analog converter. Basically, it take a digital number, and converts it to a voltage level or current level. Say I have a DAC that can output a voltage between 0 and 1 volt. As an input, it takes an 8 bit number. With 8 bits, you get 65536 levels so the output voltage is 1*(X/65536 where x is a number between 0 and 65535. So, instead of using the voltage divider in the article, you use a DAC to feed pin 1 of the MIC502 directly after adjusting the voltage to meet the requirements of the IC. The datasheet says the voltage on this pin should be between 30% and 70% of Vdd.
    So for the circuit in the article, that's ~3.6V to ~8.4V. That's just under 5 volts total swing. I think you could use some op-amps to set up a level shifter, and an amplifier (if the DAC is something less than a 5 volt swing). If the DAC can do from 0 to 12 volts, then just limit your input values to be in that range. Taking the example of the 8 bit DAC, the values would need to be between 19661 (0x4CCD) and 45875 (0xB333). It's not the DAC's full range, but you still get 26214 levels out of it which is probably overkill :)

    A u-controller is a microcontroller, also called an MCU. These are microprocessors that are usually very basic, and are set to do one task. If you want to build a USB interface, you will need to become at least a little bit familiar with them.

    USB is not as strait forward as serial or parallel to program for. Ther eis a lot of overhead that allows for hot plugging and for the number of devices that can be used with just a single port. There have been some kits that have come out fairly recently that are not that expensive but ate USB 1.1 speed. But that shouldn't be a problem for what you want. The other issue will be writing OS drivers and an interface to let you set the speed of the fans.

    One other thing that may help is this page that demonstrates how to make a DAC with some resistors.
     
    Last edited: 21 Jul 2008
  11. slisgrinder

    slisgrinder Minimodder

    Joined:
    14 May 2008
    Posts:
    268
    Likes Received:
    3
    thanks...I do get the concepts but i am sort of confused at the 8 bit stage, how did u get 65536 lvls?
     
  12. ArcSpark

    ArcSpark Did I let the magic smoke out?

    Joined:
    10 Jan 2008
    Posts:
    75
    Likes Received:
    0
    Doh, I was thinking 16 bit when I said 65536, my mistake. I guess I was up too late writing that.
    In that case, if you limit the possible inputs to (512*0.7)-(512*0.3), you still get ~204 levels :)
     
  13. slisgrinder

    slisgrinder Minimodder

    Joined:
    14 May 2008
    Posts:
    268
    Likes Received:
    3
    np, so there must be something for usb to serial, i know there is...just need to find out where...and the software, if someone is experienced in programming, they could help us out.


    ***Attention all programmers!!!, If you are aware of this "project" and if you are interested in giving an insight to this undertaking, please drop in...
     
  14. error2061

    error2061 9800GX2 is dead long live 280GTX

    Joined:
    13 Jun 2008
    Posts:
    28
    Likes Received:
    0

Share This Page