Author Topic: Switch MOSFET and transistor with one I/O  (Read 2226 times)

0 Members and 1 Guest are viewing this topic.

Offline T_guttataTopic starter

  • Regular Contributor
  • *
  • Posts: 138
  • Country: 00
Switch MOSFET and transistor with one I/O
« on: November 30, 2021, 10:03:35 pm »
Hi

I would like to switch a NPN transistor and a N-channel MOSFET together with one I/O (5V). What is the requirement for the gate resistor values (R1 and R4) so that this will work? I learned it the hard way, that one resistor alone will not work because the gate voltage is then roughly 0.7V and the MOSFET will not turn on.

Example, see below.

Thanks for your help.

 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 7212
  • Country: ca
  • Non-expert
Re: Switch MOSFET and transistor with one I/O
« Reply #1 on: November 30, 2021, 10:39:25 pm »
R4 is not needed but doesn't hurt. Circuit should work if your source D4 can supply ~8mA, if it cannot then the voltage will drop too much.
What is the source?

I would recommend simulating this circuit.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2985
  • Country: au
Re: Switch MOSFET and transistor with one I/O
« Reply #2 on: November 30, 2021, 11:01:08 pm »
500Ω for R1 might be an unnecessarily high load for the port. 10KΩ would be enough to saturate Q1. But the value of Base drive resistors has an effect on the turn off delay. A 2 resistor divider should improve the turn off time if it's important.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Switch MOSFET and transistor with one I/O
« Reply #3 on: December 01, 2021, 04:38:40 am »
Just out of curiosity, why do you need to switch both the high side and the low side?  Typically, switching one would be enough.
 

Offline T_guttataTopic starter

  • Regular Contributor
  • *
  • Posts: 138
  • Country: 00
Re: Switch MOSFET and transistor with one I/O
« Reply #4 on: December 01, 2021, 05:31:24 am »
R4 is not needed but doesn't hurt. Circuit should work if your source D4 can supply ~8mA, if it cannot then the voltage will drop too much.
What is the source?

I would recommend simulating this circuit.

I want to use an arduino which can supply 20mA. But what's about gate capacitance of the mosfet? Without R4 the initial current might be to high?

A 2 resistor divider should improve the turn off time if it's important.

Can you explain that?

Just out of curiosity, why do you need to switch both the high side and the low side?  Typically, switching one would be enough.


In this specific example: one MOSFET only prevents current flowing in one direction. If it's important, that no current can pass thorugh the load while switched off, even in case of a single failure in the circuit, you could use a combination of high side AND low side MOSFET?
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2985
  • Country: au
Re: Switch MOSFET and transistor with one I/O
« Reply #5 on: December 01, 2021, 05:51:54 am »
Like this, http://electronicsbeliever.com/category/electronics/bjt/
and https://www.diodes.com/assets/Datasheets/ds30314.pdf
The divider lowers the drive résistance which pulls stored charge out of the Base more quickly.
Now I understand that some turn off delay will not be a problem anyway.

« Last Edit: December 01, 2021, 05:57:41 am by xavier60 »
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2523
  • Country: gb
  • Recovering Electrical Engineer
Re: Switch MOSFET and transistor with one I/O
« Reply #6 on: December 01, 2021, 01:40:29 pm »
R1 very low. You're beating that BC847 into an early grave. 10k would work.
You probably need logic level MOSFETS with low Vgsth. https://www.mouser.co.uk/c/semiconductors/discrete-semiconductors/transistors/mosfet/?q=logic%20level

Note that even when switched off all mosfets leak. See datasheet Idss values. Often in the 10's of uA for 10A MOSFET.
All semicondcutor switches leak!
These days you can get low Ron analog switches with very low leakage eg https://www.analog.com/en/parametricsearch/12830#/sort=546,asc

Switching mosfets quickly requires good gate drive current. For a rough idea of the peak current: Igate=(Cgate*Vgs)/dt
R3 limits your gate drive current to 50uA. Way too low.
 

Offline T_guttataTopic starter

  • Regular Contributor
  • *
  • Posts: 138
  • Country: 00
Re: Switch MOSFET and transistor with one I/O
« Reply #7 on: December 01, 2021, 06:50:23 pm »
It's clear, that the n-channel mosfet needs to be logic level.

I made some slight changes. To the better?

If I lower R3 and R5 too much, Q1 will be overloaded (it's rated 0.1A)?

For a rough idea of the peak current: Igate=(Cgate*Vgs)/dt
R3 limits your gate drive current to 50uA. Way too low.

Cgate = 2360 pF
Vgs = 5V
dt = 38 ns
--> Imax = 0.3A

How much can I lower R4 to be used with an arduino I/O?
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2985
  • Country: au
Re: Switch MOSFET and transistor with one I/O
« Reply #8 on: December 01, 2021, 09:32:11 pm »
With the 10 to 20 volts, I'd be concerned about the maximum Gate to Source voltage applied to Q2. If there is any chance of it going near to the MOSFET maximum rating, put a Zener diode between Gate and Source, say 12V.
What is your switching rate going to be?
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline T_guttataTopic starter

  • Regular Contributor
  • *
  • Posts: 138
  • Country: 00
Re: Switch MOSFET and transistor with one I/O
« Reply #9 on: December 01, 2021, 09:42:49 pm »
The maximum rating is 20V, with the voltage divider it will be at maximum VCC/2. Switching frequency will be low, I will not do any PWM.

Are the values for R1 and R4 ok?
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2985
  • Country: au
Re: Switch MOSFET and transistor with one I/O
« Reply #10 on: December 01, 2021, 10:16:03 pm »
The maximum rating is 20V, with the voltage divider it will be at maximum VCC/2. Switching frequency will be low, I will not do any PWM.

Are the values for R1 and R4 ok?
It all looks fine the way it is now. When you test, confirm that Q1's Collector pulls down good.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline LACluc

  • Newbie
  • Posts: 8
  • Country: es
Re: Switch MOSFET and transistor with one I/O
« Reply #11 on: December 02, 2021, 06:36:28 am »
Hello,
Does your design finish, because I have nearly the same questions in https://www.eevblog.com/forum/projects/mosfet-and-uc-fail-with-pwm-motors/msg3844706/#msg3844706 but I still get some difficulties to work above 2Amps, mosfets burnt although they are rated 6Amps!!



 

Offline Damianos

  • Frequent Contributor
  • **
  • Posts: 268
  • Country: gr
Re: Switch MOSFET and transistor with one I/O
« Reply #12 on: December 02, 2021, 09:50:22 pm »
The Q2 is wrongly configured, so the circuit will not work. Also it's body diode is shown in reverse.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2985
  • Country: au
Re: Switch MOSFET and transistor with one I/O
« Reply #13 on: December 03, 2021, 12:51:22 am »
If the body diode is a part of the Pch MOSFET symbol, the whole Pch MOSFET symbol is invalid.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline T_guttataTopic starter

  • Regular Contributor
  • *
  • Posts: 138
  • Country: 00
Re: Switch MOSFET and transistor with one I/O
« Reply #14 on: December 03, 2021, 05:50:22 am »
Well, the symbols |O |O |O
I already lost hours in debugging because I missunderstood the symbols and the pins were swapped.

But this time I checked, if everything is correct, at least physically.

Current flow for N-channel is: Drain to source.
Current flow for P-channel is: Source to drain.

So, the current flow is:

VCC-->Q2 source --> Q2 drain -> LOAD -> Q3 drain -> Q3 source -> GND, correct?

Now as far as I understand, the the arrow of the diode points against the current flow, otherwise you could not control the current flow with the mosfet.

Dou you mean that the small arrow of Q2 should point towards the source and not the drain?
 

Offline gcewing

  • Regular Contributor
  • *
  • Posts: 202
  • Country: nz
Re: Switch MOSFET and transistor with one I/O
« Reply #15 on: December 03, 2021, 06:56:30 am »
Dou you mean that the small arrow of Q2 should point towards the source and not the drain?
Yes, the line with the small arrow always connects to the source in both types of mosfet. That's how you tell which is the source and which is the drain.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf