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. tehtehteh

    tehtehteh Guest

    I've been trying to read up on this, seeing lots of people say that some transistors are not suitable for high frequency switching and a mosfet gate will draw a lot of current at high frequencies etc

    but what is considered a high frequency? is 25kHz high or not?

    can someone recommend me a suitable transistor?
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    9,668
    2,019
    Nov 17, 2011
    What for? Name you parameters:
    • max. Vds
    • max. Ids
    • actual switching frequency (is it 25 kHz or are you just poking in the dark?)
    • type of load (resistive, capacitive, inductive or mixed?
    Better yet: show us a schematic diagram of your circuit.
     
  3. tehtehteh

    tehtehteh Guest

    no it's definitely 25kHz

    PWM output from a microprocessor going to gate / base of transistor for open-drain / open-collector output to a PWM pin on a 4 pin computer fan, the fan pulls it up to 5v internally based on the only specification I could find

    the transistor needs to handle at least 8mA and 5.25v

    I'll draw a diagram if needed
     
  4. Alec_t

    Alec_t

    2,759
    735
    Jul 7, 2015
    Almost any common or garden NPN bjt would do the job, e.g. 2N3904.
     
  5. cjdelphi

    cjdelphi

    1,096
    104
    Oct 26, 2011
    The transistors datasheet should provide you with the maximum frequency to use..

    But it's normally up in the hundreds of khz the arduino is not going to be an issue for the cheapest of transistor
     
  6. tehtehteh

    tehtehteh Guest

    all I have in the box of stuff is a BS170 mosfet

    I've built this up on the breadboard and it looks like it works ok with an LED, but once I connect the fan's signal pin I get nothing

    this may be because I'm running the 5v part of the circuit off a battery, separate to the 12v part, so the grounds are different
     
    Last edited by a moderator: Dec 13, 2016
  7. tehtehteh

    tehtehteh Guest

    well let me get this straight, the switch on and off time for the BS170 is listed in the data sheet as 10nS, and the period of a 25kHz signal is 40000nS, so this sounds fine

    but the issue I want to know is the picaxe output recommends a max of 20mA on a single pin, so I have put a resistor between the output and the gate to limit it to 20mA, and I don't know if the mosfet wants more current to switch at 25kHz and if so what effect this will capping it at 20mA have on the pwm signal

    I have a little J-Tech DIY oscilloscope in the post but this might not be good enough to check
     
    Last edited by a moderator: Dec 13, 2016
  8. (*steve*)

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

    25,305
    2,738
    Jan 21, 2010
    You'll need to show us your circuit for us to make any comment as to why the circuit works for a LED but not a fan. I suspect the fan draws more than 8mA.

    The actual switching speed depends on a number of factors which are interdependent in a typical circuit. There factors include the gate capacitance, Vgs(th), the available gate current, the magnitude of any gate resistor, the maximum switching speed of the device, the current through the device and even the temperature.

    The limiting factor is often the losses during switching. In your case the stated load is so small that the MOSFET could stay in the most highly dissipative state all day and it would not get noticeably warm. For that load! For another load the situation may be completely different.

    25kHz is not fast for a small MOSFET driving a small load. Larger MOSFETs with lower Rds(on) capable of high currents will also likely have a far higher gate capacitance and may require a gate current measured in amps in order to switch fast enough to reduce heating to a level where they don't burn up.

    Another major issue is the topology of your circuit. The gate voltage is measured against the source terminal of the MOSFET. If you're not using a MOSFET so that the source is tied to an appropriate supply rail, you will require either a larger voltage swing out a voltage swing that exceeds the voltage applied to the load. And guess what, we need to see the circuit to analyse this.

    Electronic design is not something easily reduced to a couple of formulae and the "right" components. At low power the complexity of far less and it can appear thus, however as power levels increase some things that you didn't even need to consider can become significant headaches.
     
  9. tehtehteh

    tehtehteh Guest

    diagram

    H2 is the output
     

    Attached Files:

  10. (*steve*)

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

    25,305
    2,738
    Jan 21, 2010
    Ok, now explain what the load is and where it is connected. What current does the load draw? Is it inductive?
     
  11. tehtehteh

    tehtehteh Guest

    I explained this further up the thread, H2 is the open drain output, it's connected to the signal pin of a 4 pin computer fan, the specification says it will be pulled up internally to 5v or 3.3v and there should be no more than 5mA
     
  12. (*steve*)

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

    25,305
    2,738
    Jan 21, 2010
    OK, so it's not actually the fan you're powering, just supplying a signal to it.

    Assuming the fan can accept a 25kHz signal, you should be good to go.

    Have you looked at the signal on an oscilloscope?
     
  13. (*steve*)

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

    25,305
    2,738
    Jan 21, 2010
    This looks like the general specs.
     
  14. tehtehteh

    tehtehteh Guest

  15. (*steve*)

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

    25,305
    2,738
    Jan 21, 2010
    That should be fine for 25kHz. At a minimum you'll be able to check that with the fan connected an appropriate signal appears at the PWM input.

    If you don't see a signal, try connecting your own pull-up resistor (1k should be fine). As I read the version 1.2 specs, it doesn't appear obvious that the fan has a pull-up. Perhaps the later version is more explicit (or maybe I missed it). Can you post a link to the later version?
     
  16. tehtehteh

    tehtehteh Guest

  17. (*steve*)

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

    25,305
    2,738
    Jan 21, 2010
    Yeah, that's a lot more informative.
     
  18. tehtehteh

    tehtehteh Guest

    hooked up it up to a single power supply and it now works!

    will still test it with the oscilloscope though as I'm interested to see what the signal looks like
     
  19. tehtehteh

    tehtehteh Guest

    ok stuck again......

    this is the circuit

    circuit 1.jpg

    this is the signal straight from the microprocessor, pretty much as expected

    WP_20161220_12_40_17_Pro.jpg

    but this is the signal at H2, this signal does not fully control the fan

    WP_20161220_12_42_44_Pro.jpg

    however if I add an LED and resistor as so:

    circuit 2.jpg

    this is now the signal at H2 and the fan seems to work like it should

    WP_20161220_12_44_29_Pro.jpg

    but that LED / resistor should not be needed as the fan should have its own pullup, and I'm not sure if this could do damage

    any suggestions?
     
  20. tehtehteh

    tehtehteh Guest

    if the fan pullup was only 3.3v, and the mosfet gate is being driven by 5v, could this cause the problems I'm having here?
     
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

-