Switch MOSFET and transistor with one I/O - Page 1
Forum section: electronics / projects

author: T_guttata
author_rank: Regular Contributor
timestamp: November 30, 2021, 10:03:35 pm
content: HiI 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.

author: thm_w
author_rank: Super Contributor
timestamp: November 30, 2021, 10:39:25 pm
content: 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.

author: xavier60
author_rank: Super Contributor
timestamp: November 30, 2021, 11:01:08 pm
content: 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.

author: Peabody
author_rank: Super Contributor
timestamp: December 01, 2021, 04:38:40 am
content: Just out of curiosity, why do you need to switch both the high side and the low side? Typically, switching one would be enough.

author: T_guttata
author_rank: Regular Contributor
timestamp: December 01, 2021, 05:31:24 am
content: Quote from: thm_w on November 30, 2021, 10:39:25 pmI 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?Quote from: xavier60 on November 30, 2021, 11:01:08 pmCan you explain that?Quote from: Peabody on December 01, 2021, 04:38:40 amIn 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?

author: xavier60
author_rank: Super Contributor
timestamp: December 01, 2021, 05:51:54 am
content: Like this,http://electronicsbeliever.com/category/electronics/bjt/andhttps://www.diodes.com/assets/Datasheets/ds30314.pdfThe 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.

author: Terry Bites
author_rank: Super Contributor
timestamp: December 01, 2021, 01:40:29 pm
content: 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%20levelNote that even when switched offallmosfets 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 eghttps://www.analog.com/en/parametricsearch/12830#/sort=546,ascSwitching mosfets quickly requires good gate drive current. For a rough idea of the peak current: Igate=(Cgate*Vgs)/dtR3 limits your gate drive current to 50uA. Way too low.

author: T_guttata
author_rank: Regular Contributor
timestamp: December 01, 2021, 06:50:23 pm
content: 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)?Quote from: Terry Bites on December 01, 2021, 01:40:29 pmCgate = 2360 pFVgs = 5Vdt = 38 ns--> Imax = 0.3AHow much can I lower R4 to be used with an arduino I/O?

author: xavier60
author_rank: Super Contributor
timestamp: December 01, 2021, 09:32:11 pm
content: 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?

author: T_guttata
author_rank: Regular Contributor
timestamp: December 01, 2021, 09:42:49 pm
content: 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?

author: xavier60
author_rank: Super Contributor
timestamp: December 01, 2021, 10:16:03 pm
content: Quote from: T_guttata on December 01, 2021, 09:42:49 pmIt all looks fine the way it is now. When you test, confirm that Q1's Collector pulls down good.

author: LACluc
author_rank: Newbie
timestamp: December 02, 2021, 06:36:28 am
content: Hello,Does your design finish, because I have nearly the same questions inhttps://www.eevblog.com/forum/projects/mosfet-and-uc-fail-with-pwm-motors/msg3844706/#msg3844706but I still get some difficulties to work above 2Amps, mosfets burnt although they are rated 6Amps!!

author: Damianos
author_rank: Frequent Contributor
timestamp: December 02, 2021, 09:50:22 pm
content: The Q2 is wrongly configured, so the circuit will not work. Also it's body diode is shown in reverse.

author: xavier60
author_rank: Super Contributor
timestamp: December 03, 2021, 12:51:22 am
content: If the body diode is a part of the Pch MOSFET symbol, the whole Pch MOSFET symbol is invalid.

author: T_guttata
author_rank: Regular Contributor
timestamp: December 03, 2021, 05:50:22 am
content: Well, the symbolsI 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?

author: gcewing
author_rank: Regular Contributor
timestamp: December 03, 2021, 06:56:30 am
content: Quote from: T_guttata on December 03, 2021, 05:50:22 amYes, 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.