Connect with us

transistor for open-drain / open-collector 25kHz PWM

Discussion in 'General Electronics Discussion' started by tehtehteh, Dec 12, 2016.

Thread Status:
Not open for further replies.
Scroll to continue with content
  1. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    I think it's simply that the pull up in the fan is too weak. Perhaps the fan designer read the older spec that I did and assumed an external pull up?

    You could try reducing your gate resistor just in case the problem is that it is large enough that the MOSFET switch off time is being affected.
     
    Last edited: Dec 20, 2016
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    Have you tried connecting the microcontroller output directly to the fan?

    Perhaps leave that gate resistor between them just in case.
     
  3. tehtehteh

    tehtehteh Guest

    yeah I tried this and, like with the led, I get the signal I expect, but it's the wrong way of doing it and I want to get to the bottom of the problem

    if I disconnect the signal pin of the fan it spins up to max RPM, I measure a constant 4.25v on the fan signal pin when it's disconnected, and if I ground the pin the fan shuts off, all this is consistent with the internal pullup

    I measure 58uA of current going from the signal pin to ground, which suggests around 80k for the pullup resistor if I understand things correctly
     
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    The BS140 can have a very low Vgs(the). This can make the device slow to turn off.
    The is also no reason to use the MOSFET at all. Just connect the microcontroller output to the fan.

    If you're really interested you can view the waveform at the gate. If you have a dual channel scope, viewing the microcontroller output and the gate would give useful information.

    If you were to retain the MOSFET you could remove it or reduce the value of the gate resistor.
     
  5. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    What's wrong with connecting a 5V logic signal to a port which expects a 5V logic signal?
     
  6. tehtehteh

    tehtehteh Guest

    because its only really expecting ground

    here's a very simplified diagram including the fan to show what I mean
     

    Attached Files:

    • fan.jpg
      fan.jpg
      File size:
      117.5 KB
      Views:
      74
  7. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    Humor me. Just try connecting the microcontroller output to the PWM input. You can leave the 300Ω resistor there if you want to.
     
  8. tehtehteh

    tehtehteh Guest

    done it already, see reply 23
     
  9. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    Great. You now have the correct solution.
     
  10. tehtehteh

    tehtehteh Guest

    except it goes completely against the specification so it's obviously not correct

    also what will sending 5v down the pin with a pullup to 4.25v do? some current will be flowing the wrong way surely?
     
  11. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    The specs do not say you must use a pull down.

    They do give the voltage you need to pull the input down to, and they specify the max voltage at the input. Connecting the microcontroller to the input is within those specs.

    Also, I have told you what you most likely need to do to get the circuit working with the MOSFET, and what to measure to determine if it is the cause.
     
  12. tehtehteh

    tehtehteh Guest

    2.4
    Considerations for Motherboard Designers
    1.
    The trace from PWM output to the fan header must
    not have a pull up or pull down. The pull
    up is located in the fan hub. The presence of
    a pull up on the motherboard will alter the fan
    response to the PWM Duty Cycle. In some cases this may prevent the fan from achieving
    full speed even with the Hardware Monitor device issuing a 100% duty cycle.
     
  13. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    There will certainly be a problem if you put a pull up to a rail other than 5V.

    You can choose to believe me or not.

    Is there something you have against checking then fixing the gate drive?

    If so, you can just place a shottky diode between the microcontroller and the PWM input .

    So many acceptable solutions. Pick one.
     
  14. tehtehteh

    tehtehteh Guest

    250 is the lowest I can go on the resistor because the picaxe will only support 20ma per pin, and this hasn't made a difference to the signal so far

    I have been measuring at the gate, I get the correct wave at the gate, just not at drain when the fan is connected

    I have just tested with the fan disconnected and 100k resistor to 5v instead and it gives me the same undesireable sawtooth wave, so it would seem that a weak drain to source current causes a slow switch off time (or is that switch on? it's confusing)

    I guess a different transistor is needed
     
  15. Harald Kapp

    Harald Kapp Moderator Moderator

    11,524
    2,655
    Nov 17, 2011
    The specs are what a well constructed fan should work like.
    You'll have to look up the actual specs (datasheet) of the fan you're using. There's no guarantee that the actual fan fulfills the requirements as per the general spec you're taking for reference.
    Your experiments prove that.
     
  16. tehtehteh

    tehtehteh Guest

    I think all I've proved is that the mosfet has trouble switching when the current from drain to source is very low

    I don't know if that's a common thing with mosfets or not, I don't know enough about the nuances of them to say, but if it is then I'd put it down to a problem with my choice of mosfet rather than the fan, which is from a reputable brand

    the data sheets of computer fans don't appear to go into much electronic detail from what I can see
     
  17. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    Since you don't trust me, I won't give you any more advice.
     
  18. tehtehteh

    tehtehteh Guest

    [mod action: insult deleted]

    the attitude of some people on this forum really stinks, because I've asked a question I'm a total noob who's not entitled to query your 'advice' and now you're getting tarty about it, well sorry you'll just have to cry yourself to sleep
     
    Last edited by a moderator: Dec 22, 2016
  19. Harald Kapp

    Harald Kapp Moderator Moderator

    11,524
    2,655
    Nov 17, 2011
    There's no shame in being a noob - we all are in on or the other respect. However, it behooves a noob to take advice that has been given. You've been informed that the spec you're referring to is very probably not applicable to the fan you want to control.And the esxperiments you've done using external pull-up resistors prove that (as far is possible). Still you insist - against the advice of Steve, a very experienced member, definitely not a noob - that the problem lies elsewhere.
    What conclusion are we expected to draw other than you mistrust or disrespect those who try to help?

    In your post #23 you state a measured current of 50µA or an equivalent internal pull-up resistor of 80 kΩ. The spec you cited in post #16 (and note that I do not say this is the spec applicablke to your fan) states a max. short circuit current on the fan control pin of 5mA, which at 5 V (typ. pull-up voltage) translates into a pull-up resistor of 1 kΩ or more. Your measured 80 kΩ are a far cry from that value which again is a good sign that your fan doesn't obey the spec you're reading.
     
  20. tehtehteh

    tehtehteh Guest

    the specs just say to support 5mA, so the resistor could be anything from 1k up, it was suggested at the top of this page that the pullup may be weak by the same guy that got so butthurt later, so why is it not OK for me to think this could be the problem?

    you are seriously telling me I should accept that the fan is wrong, and not myself the noob? I am absolutely right to think it's a problem with my circuit, and not a mass produced fan that is used in 1000s of computers with no problems whatsoever
     
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.
Thread Status:
Not open for further replies.
Electronics Point Logo
Continue to site
Quote of the day

-