Connect with us

Pulse Width Modulation Help

Discussion in 'Electronic Design' started by Mike, Oct 17, 2004.

Scroll to continue with content
  1. Mike

    Mike Guest

    Hello everybody!

    I'm seeking help in building a little device that will allow me to
    control speed on high current fans from a low current fan header found
    on motherboards.

    Preface: The fan header on motherboards was designed to run small
    fans, typically around 5W. Most motherboards nowadays support fan
    speed control via pulse width modulation. Speed is controlled by
    software which reads various thermistors (ex. CPU, hard drives,

    What I basically want to do is have a high current 12v input from the
    power supply, pulse width modulated low current 12v input from the
    motherboard header, and a high current pulse width modulated output.

    What would be the *simplest* way to go about this?
    (Preferably with parts available from the neighborhood RatShack.)
  2. Al Borowski

    Al Borowski Guest

    Since its just a fan, I suppose a simple transistor would work. It
    depends on what the motherboard actually modulates - the 12V supply, or
    the fan earth return. If the 12V is modulated an NPN transistor should
    do the trick

    FAN +

    FAN -
    ___ |/
    +12V from MB------|___|-----|


    created by Andy´s ASCII-Circuit v1.22.310103 Beta


  3. Mike

    Mike Guest

    If the 12V is modulated an NPN transistor should
    Al, yes it is 12V modulated on 3 different motherboards I tested. I
    also did find one interesting bit of information while testing this

    It seems there is a capacitor before the header, as when I was
    measuring voltage on the header after turning it off via software, the
    voltage took a good 3 minutes to settle at around 0.3V.

    So I have 3 questions:
    (please be patient as I have no formal education in electronics
    engineering or prior experience :-] )

    1.) I'm assuming that the capacitor before the header will make the
    single transistor approach impossible, unless a load is presented on
    the header. Resistor? Is that a good approach? And how would I
    calculate watts from ohms? Given voltage.

    2.) I found an old NPN TIP120 transistor laying around and tested it.
    I'm getting 420 ohms between the emitter ad the collector and 1.6k
    ohms between collector and emitter. Is it dead?

    3.) If it is, would a new TIP120 be good for what I'm trying to do?
    How many watts (ballpark) would it be able to handle on a small
    heatsink inside a sealed project box?

    Thanks for your help!
  4. Al Borowski

    Al Borowski Guest

    If you are just measuring with a multimeter, you might just be measuring
    the stray capacitance?
    Theres a fair chance the loading from the transistor will be enough.

    Resistor? Is that a good approach? And how would I
    I'm tired, so theres likely to be a mistake in this, but here's what I
    would do (note: The following are _very_ rough 'ballpark' figures that
    should be OK for a one-off).

    1) Assume that the 'capacitor' is just capacitance, and thus has a very
    small value. Assume that 100ma current flow is enough to discharge the
    capacitence quickly enough

    2) Since I = .1, and V = 12, use ohm's law to get a resistor to use. V =
    I*R, R = V / I, R = 120 ohms.

    3) check the resistors power rating. P = V * I = 12 * .1 = 1.2W.
    However, considering that the PWM probably won't always be at 100%, you
    can probably get away with 1W. Or play it safe and use 2 1W resistors.

    4) hook up the circuit as follows

    FAN +

    FAN -
    120 ohms | Collector
    ___ |/
    +12V from MB------|___|-----|
    Base |>
    | Emitter

    No idea sorry.
    It looks like it should be OK.
    What kind of box? Metal?
    No problem, but as I said I'm very tired right now, and may be speaking
    crap! :)


  5. Tim Wescott

    Tim Wescott Guest

    Is the circuit one that drives the motor straight off of a PWM
    transistor, or does it make a switching amplifier out of it with a
    filter coil and capacitor to spare the motor? If it's filtered (which
    the presence of a cap would indicate) then the simple transistor circuit
    we're giving you won't suffice; you'll need something to turn the analog
    voltage back into a PWM duty cycle.

    You should check: load the output (with a resistor or a real fan). If
    you have an o-scope then look at the voltage to the motor -- this will
    be good because the simple circuit given is also sensitive to frequency;
    above 1kHz you need to actually worry about the transistor speed. If
    all you have is a DVM then all you can do is check to see if there's
    significant AC on the pin, and hope that it's slow enough for your
    transistor circuit.
  6. Mike

    Mike Guest

    It seems there is a capacitor before the header, as when I was
    I thought it would be impossible to find the actual capacitor, but the
    are fairly large near the header, and can be traced with the naked
    eye. There
    is indeed one sitting right before each header, and it is 47uf @ 25v.
    Unfortunately no. I tried another small NPN transistor that I found
    and the
    fan went into full power as soon as the header was turned on. It made
    difference in fan RPMs if the header was set to 5% or 100%.
    And given that the capacitance is now known ([email protected][email protected] here
    based on that how would one calculate the speed at which it discharges
    a given resistor value @ 12v?

    And in this scenario, I guess we also need to know how fast the signal
    pulsated? As I'm assuming if the capacitor is not discharged fast
    and the transistor has a certain threshold before it switches off, the
    pulses coming off the transistor will be longer. Logic correct?
    Plastic, 1" x 1" x 2".

    Please bear with me for a second, and this might sound silly, but
    shouldn’t the resistor connect with one end to the 12v MB and
    the other end to 0V? (I think 0v is common ground in computers, that
    is the case and every other component shares that ground.)

    Power Supply
    | 12v+
    Motherboard Header |/
    12v+ ----------------------| NPN
    | |> Transistor
    .-. |
    | | |
    | | |
    '-' |
    Resistor | |
    | |
    | | +
    | |
    | .-.
    | (FAN)
    | '-'
    | | -
    | |
    | |
    ___ ___
    _ Ground _
    | |

    Would this schematic work? (Modulating (+) instead of ground?)

  7. Al Borowski

    Al Borowski Guest


    Rats. That makes thing harder.

    It doesn't work like that I'm afraid. The '25V' on the capacitor means
    the capacitor is rated for a maximum of 25V. It still has the valur of 47uf.
    This page may help - - or just google
    "rc discharge equation". Seeing there is a real capacitor there, the
    calculations become a bit trickier. I'd crunch the numbers myself but i
    don't have time right now.

    As I'm assuming if the capacitor is not discharged fast
    Yes. One danger is that the transistor may operate in the linear region,
    where it is neither fully on nor fully off. This means it will get much
    hotter then if it was switched fully on or fully off. In a sealed
    plastic box, this could cause problems.
    I'm not expert, but it sounds like that could be asking for trouble.
    Maybe a cheap metal box would be the way to go?

    It effectivly does!

    There is a (small) vltage drop accross the Base-Emitter pins, but
    otherwise its connected to 0V through the transistor.

    Possibly, but its asking for trouble:

    1) Too much base current may flow. The resistor in the first circuit
    served to limit the bse current, but also to discharge the capacitor.

    2) since you just want to use the NPN transistor as a switch, you are
    better off placing the fan between 12V and the collector. I don't have
    time to explain why right now, but google "common emitter" "emitter
    follower" and "transistor switch".

    I can give more details later if needed.


  8. Mike

    Mike Guest

    That I do not know, and slowly trying to figure out. The chances of me
    getting to an engineer at any motherboard manufacturer are slim to

    From what I can see on the board with my own two eyes, there are only
    two transistors, a few resistors and a capacitor in the final stage of
    the PWD fan control.

    The first transistor is small, with the base connected to the central
    microprocessor, and the base gets a 0 to 5.38v+ DC, linearly
    proportional to how many % the fan header is set to. The second
    transistor is larger, with the base feeding from the smaller
    transistor's emitter, collector a constant 12v+ DC and emitter going
    directly to the capacitor and then the actual fan header.

    With fan header loaded I'm getting 11.92V DC across the leads, and
    23.61V AC. The strange part is, if I set the multi-meter to AC, use
    the positive probe on the DC (+) I get the 23.61V but if I use the
    negative probe on the DC (+) I get 0V AC. Should it not be showing
    same voltage either way?
  9. Mike

    Mike Guest

    That's all very good stuff. I was just looking to be pointed in the
    right direction. With some google, and maybe *gasp* a book that is not
    too big I'll figure this out, hopefully without burning up all fan
    headers :-]

    Thanks for the help.

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day