Maker Pro
Maker Pro

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

Status
Not open for further replies.
T

tehtehteh

Jan 1, 1970
0
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?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,681
Joined
Nov 17, 2011
Messages
13,681
can someone recommend me a suitable transistor?
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.
 
T

tehtehteh

Jan 1, 1970
0
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
 

Alec_t

Jul 7, 2015
3,586
Joined
Jul 7, 2015
Messages
3,586
Almost any common or garden NPN bjt would do the job, e.g. 2N3904.
 

cjdelphi

Oct 26, 2011
1,166
Joined
Oct 26, 2011
Messages
1,166
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
 
T

tehtehteh

Jan 1, 1970
0
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:
T

tehtehteh

Jan 1, 1970
0
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:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
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.
 
T

tehtehteh

Jan 1, 1970
0
diagram

H2 is the output
 

Attachments

  • Untitled-1.jpg
    Untitled-1.jpg
    161.8 KB · Views: 165

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Ok, now explain what the load is and where it is connected. What current does the load draw? Is it inductive?
 
T

tehtehteh

Jan 1, 1970
0
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
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
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?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
This looks like the general specs.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
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?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Yeah, that's a lot more informative.
 
T

tehtehteh

Jan 1, 1970
0
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
 
T

tehtehteh

Jan 1, 1970
0
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?
 
T

tehtehteh

Jan 1, 1970
0
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?
 
Status
Not open for further replies.
Top