back to back MOSFET's as a switch - Page 1
Forum section: electronics / projects

author: Simon
author_rank: Unknown
timestamp: September 30, 2021, 08:03:08 am
content: I have a design where I need to control a point that has power in to one point of the circuit and power out of another. So the power out point has MOSFET's back to back Q15 and 16 in the attached. Individually each behaves as expected but if I put a meter in diode mode across each end of the pair when the drain of Q15 is more negative than the drain of Q16 I get 2.4V. How is this so?I have another pair in the circuit that don't do this.

author: fourtytwo42
author_rank: Super Contributor
timestamp: September 30, 2021, 09:00:13 am
content: Hi, I have a few observations1/ Are you using the dvm in diode mode with the circuit powered ? if so I don't think that will work.2/ I don't understand the circuit, is VDC an input or output ? and what is B3+F ?

author: Simon
author_rank: Unknown
timestamp: September 30, 2021, 09:17:38 am
content: B3+F us a battery terminal, VDC is the controlled output. This is also connected to a charging circuit. I am measuring with the circuit unpowered. Another identical pair does not do this so I am thinking maybe the current sense chip IS+ and IS- go to is creating something. I am considering moving the current shunt to the common terminal to take it away from there.

author: timenutgoblin
author_rank: Regular Contributor
timestamp: September 30, 2021, 09:35:47 am
content: Quote from: Simon on September 30, 2021, 08:03:08 amHere's my theory:Q15 and Q16 are P-channel MOSFETs that need a positive voltage on the source terminal with respect to the gate terminal to turn on. When the DMM is connected with +ve to drain Q16 and -ve to drain Q15 then leakage current flows through Q15 drain-source allowing Q16 diode to forward bias sufficiently to raise the source voltage at Q15 turning it on slightly creating a mid-high resistance path between Q15 and Q16. Hence, you're measuring 2.4V on diode test. V = I x R where I is the DMM test current and R is the 'artifact' resistance.

author: Simon
author_rank: Unknown
timestamp: September 30, 2021, 10:00:16 am
content: well the test current is mere mA, in 15V diode test mode I get 3.6V the current is a few mA say 6 (15V/(2.2k + PTC)), so that is 600 ohms.It feels more like this is down to it being unpowered There is another route around for the current leaking through various things. I think I should swap the MOSFET's around and tie the gate resistor to the source of the power that will turn them on.

author: Peabody
author_rank: Super Contributor
timestamp: September 30, 2021, 02:15:07 pm
content: Yes, I think the gate resistor is in an odd place. Current can flow through either body diode to the gates. It seems it should be tied to a positive rail.Can you explain why you need the back-to-back mosfets?

author: Simon
author_rank: Unknown
timestamp: September 30, 2021, 05:22:58 pm
content: The back to back mosfets are to stop current going either way. With one mosfet the body diode can conduct the other way. I have seen lots of examples of this configuration online but I'm not sure it's right and I came to it by myself.

author: Peabody
author_rank: Super Contributor
timestamp: September 30, 2021, 09:42:38 pm
content: The only official circuit I know of like this is the DW01 battery protection IC. The datasheet shows two N-channel mosfets. While the gates are controlled separately, the circuit shows the drains connected together, not the sources. I think that makes sense because the voltage between the two mosfets is a bit undefined because of the body diodes. But if the sources are on the outside, you can control the GS voltage, and keep them turned off. And I'll repeat that I think the gate pullup resistor should be tied to some more defined voltage source.So basically, I think your instincts as posted a couple posts back were correct - switch the mosfets, and tie the gate resistor somewhere else.

author: langwadt
author_rank: Super Contributor
timestamp: September 30, 2021, 09:54:49 pm
content: Quote from: Simon on September 30, 2021, 05:22:58 pmit should work, the drains are either VDC or B3+F via the bodydiodes, pulling the gates down puts (VDC or B3+F) * ~2/3on the gates so you less voltage on gate than source have turning the P mosfets on

author: MadScientist
author_rank: Frequent Contributor
timestamp: September 30, 2021, 10:01:45 pm
content: Does the circuit work, I would t rely on in circuit unpowered tests.

author: szan
author_rank: Regular Contributor
timestamp: September 30, 2021, 10:20:29 pm
content: My guess is you ar e looking for AC mosfet switch?Basic SSR Theory page 5:Low-CostAC Solid-StateRelayWithMOSFETshttps://www.ti.com/lit/ug/tiduc87a/tiduc87a.pdf

author: Simon
author_rank: Unknown
timestamp: October 01, 2021, 07:42:38 am
content: Quote from: MadScientist on September 30, 2021, 10:01:45 pmI have noted voltage showing on the output after turning it off with 400k Ohm of load on the output. It would drop from 36V to something like 1.4V and then gradually go down. Reducing the load resistance on the output did get this down quicker so I'm not overly confident. I do want to move the current sensing to the ground side which would probably take away the thing that I think is causing the problem. I'm not sure if reducing the mosfet drive resistors would help as it's down to leakage somewhere else.

author: Simon
author_rank: Unknown
timestamp: October 01, 2021, 09:23:30 am
content: Turns out my TVS diode is a bidirectional one. I changed that on the basis that the input and output would take a reverse polarity. Maybe if I do use a reverse diode or unidirectional TVS it will help keep the circuit correctly biased.

author: Simon
author_rank: Unknown
timestamp: October 01, 2021, 10:30:55 am
content: I moved the resistor point and still nothing. I'll apply power and see if that helps once it has some bias.

author: Simon
author_rank: Unknown
timestamp: October 01, 2021, 12:25:45 pm
content: So rather than power it up and risk it I swapped the MOSFET's around, erm, same thing happens unpowered. If I put the meter in resistance mode I see the 37k Ohm's I have on the output. I get 4.something volts on the output in diode mode, the 37k Ohm would create something like a 14V drop so it's going somewhere else.

author: Simon
author_rank: Unknown
timestamp: October 01, 2021, 01:02:25 pm
content: I think I have it.Attached is the "model" of my circuit. If I make the output side positive with respect to the battery side current can flow through the 36k and 1k resistors through the body diode of the level shifting N mosfet and back through the 10k on the gate, the other one is actually 22k not 10k but still 1/3 the voltage can be enough to trigger the gate of the battery side mosfet. but no that makes the gate positive with respect to the source.This is really confusing. The battery side has a current sense amp input on it so that could be doing something or current in the microcontroller pin might be triggering something but that just takes it in even bigger circles of investigation. I think it's time to cut my losses and use a diode in place of the outermost mosfet and rev 2 will have to be quite different.

author: coppercone2
author_rank: Super Contributor
timestamp: October 01, 2021, 02:53:22 pm
content: I have this problem right now kind of with a diode near a small resistor. I read the solution is to just pump more current through it until you get a differential thats obvious to check if the diode is at least directional (snubbers), i.e. 100mA test. But since you have high Z FET you are gonna have a problem testing that in circuitwhen I was new I had some stupid simple circuit I designed that did not work unless I put a transistor in backwards. when I showed it to someone experienced they said be careful doing that but it might be OK lol.. i forgot / lost the PCB to figure out what was going on there, it was like a window comparator made with a few transistorsin circuit tests other then voltage/current suck

author: langwadt
author_rank: Super Contributor
timestamp: October 01, 2021, 05:05:16 pm
content: Quote from: Simon on October 01, 2021, 01:02:25 pmflip the two fets so they are common source and put the top 10k to the common source, it is gate-source and keeps the fets off when the third fet is off

author: Simon
author_rank: Unknown
timestamp: October 01, 2021, 05:09:09 pm
content: It sounds like you are talking about some years ago, was it BJT' you were using?Back to back mosfet's seem to be common. For example every lithium battery protection board must have them back to back as it has to stop current both ways, in and out of the battery.I have an identical setup of back to back mosfet's elsewhere in the circuit and those work fine. I can't help but think that it's one of the other unpowered componens that is giving it bias. This may resolve itself once I power it. My problem is that I will be in a place where I have 12V of battery one side and a 28V supply the other. It looks like the circuit will only work when there is voltage behind it, but if there is more voltage in front of it - maybe woops.It's a shame I will have to use a diode as that will loose 1.5W, the mosfet would dissipate less than 300mW.

author: Simon
author_rank: Unknown
timestamp: October 01, 2021, 05:10:24 pm
content: Basically given the mosfet shortage I am loosing interest in this problem as swapping to a DT relay will do it all in one with 10m Ohm contact resistance which is less than the mosfet.

author: langwadt
author_rank: Super Contributor
timestamp: October 01, 2021, 05:25:53 pm
content: Quote from: Simon on October 01, 2021, 05:09:09 pmif you are not sure it'll work stick a diode in series with the battery and supply when you first power it up

author: szan
author_rank: Regular Contributor
timestamp: October 01, 2021, 07:49:53 pm
content: Quote from: Simon on September 30, 2021, 08:03:08 amThis is not AC mosfet switch configuration of Q15 and Q16 mosfets - in your design you have common drains, in SSR AC mosfets are tied by its source, than this 10k resistor could pull down its gates to its source, and SRR is then in closed state - when you apply gate voltage between its tied source to those two gates AC mosfet switch is turned ON and AC current can flow via such SRR - in closed state mosfets body diodes block even AC current flow.As simple as it is.So, to have AC mosfet switch used in SRR's you need change from common drain to common source, than 10k gate resistor is fine, but how to power up this SRR is another storyBest option is to use gate driver and make this design easier to understand and test.I've made already many AC mosfets switches and it works when you have those mosfets tied with its sources - here is strange design with mosfets drains tied - by mistake or just to make this thing to work... I do not know ...

author: Simon
author_rank: Unknown
timestamp: October 01, 2021, 08:15:45 pm
content: I am not trying to make an "AC solid relay" I am trying to create an output switch that will also withstand voltage being applied on the outside.

author: langwadt
author_rank: Super Contributor
timestamp: October 01, 2021, 10:57:42 pm
content: Quote from: Simon on October 01, 2021, 08:15:45 pmso what you need is just a single ideal diode?https://electronics.stackexchange.com/questions/223935/understanding-an-ideal-diode-made-from-a-p-channel-mosfet-and-pnp-transistors

author: Simon
author_rank: Unknown
timestamp: October 02, 2021, 07:52:19 am
content: Well maybe you are sort of right. But then how do the battery managers do it. I need to turn the output on and off and prevent power being fed back. In my case it is not as hard as the battery manager as I only want power going one way. So I could have a single output mosfet followed by an ideal diode using a mosfet. but then I am still intrigued as to how the battery managers that take power both ways do it. Maybe as suggested the two mosfets are controlled separately.

author: Simon
author_rank: Unknown
timestamp: October 02, 2021, 08:16:31 am
content: OK, so I have it, each mosfet needs it's own gate resistor and it's own drive transistor.

author: szan
author_rank: Regular Contributor
timestamp: October 02, 2021, 09:02:41 am
content: Quote from: langwadt on October 01, 2021, 10:57:42 pmMaybe by adding hall effect current sensor to detect unwanted current flow into battery to drive AC mosfet switch to close and open AC mosfet switch when battery is discharged with given outpuit current.This could also allow to make more triclky things like allow flow to battery very limited small current eg. for balancing purposes, and limit output current when needed because of we have current sensor capable to measure positive and negative current flow ?!

author: DavidAlfa
author_rank: Super Contributor
timestamp: October 02, 2021, 09:29:49 am
content: Try this. It allows bidirectional current flow. So you can either source current (power from the battery) and sink (From external power, to charge the battery)

author: Simon
author_rank: Unknown
timestamp: October 02, 2021, 09:48:41 am
content: Quote from: DavidAlfa on October 02, 2021, 09:29:49 amYea, I did some paper sketching and came to the conclusion that this is what I need. The problem is that I have a device on the battery side that when unpowered pulls the gate down and allows backflow. I do not want bidirectional flow through this switch but it is the same function. The problem is that the batter could be at 12V with 36V on the outside, this could bias the mosfets which is bad news. The charging is done by an onboard switch-mode converter that will accept up to 40V and charge the batteries.

author: DavidAlfa
author_rank: Super Contributor
timestamp: October 02, 2021, 10:57:45 am
content: Well, everything is possible. This is for best efficiency, almost zero loses:If you don't mind losing some power, you can simply use a schotkky diode to prevent current flowing back.Ex. Schottky diodes drop ~0.25V, so at 10Amps it would drop only 2.5W.

author: langwadt
author_rank: Super Contributor
timestamp: October 02, 2021, 09:02:51 pm
content: Quote from: Simon on October 02, 2021, 09:48:41 amif you don't want bidirectional flow through the switch you need the ideal diode circuit, the switch will happily conduct in both direction once it is on

author: Simon
author_rank: Unknown
timestamp: October 03, 2021, 08:09:25 am
content: Quote from: DavidAlfa on October 02, 2021, 10:57:45 amIf you can recommend a diode that will drop 0.25V at 10A I would be very grateful and you would be sitting on a gold mine. My experience is that all Schottky diodes drop 0.6-0.7V at any sensible current flow. Just as silicone diodes claimed to be 0.7V actually drop 1-1.1V at normal flow. The headline datasheet figures are just for when you perform a test with a really small current compared to their nominal. When I was a kid I discovered 0V drop 1N4007 diodes. I put several in series with a 9V battery to reduce the voltage to 5V but my multimeter still measured 9V!

author: DavidAlfa
author_rank: Super Contributor
timestamp: October 03, 2021, 11:38:00 am
content: Yep, my bad, definitely not at 10amps.I've seen them dropping 90-120mv at the mA range.However there're still pretty decent diodes, like STPS10L60, 0.48V@10A typical.

author: Peabody
author_rank: Super Contributor
timestamp: October 03, 2021, 02:48:16 pm
content: I've tried to follow this thread, but have never understood your circuit or what you want to accomplish. Do you want current to flow in either direction or not? Could you possibly post a simplified version of the whole circuit showing where the charger is and which part you're concerned about when it's powered down? If that part pulls down the gate, does it not also pull down the source? Also, if a gate is controlled through an N- part, it could not be pulled down unless the part controlling it is powered up.And finally, if current is really only going to flow in one direction, is it not possible to use a single mosfet with its body diode oriented to block the undesired back flow? That may seem to be a "backwards" orientation, but current will flow in either direction when the mosfet is turned on.

author: Simon
author_rank: Unknown
timestamp: October 03, 2021, 05:45:32 pm
content: Basically there is a battery with built in charger. The charger has a mosfet that will block power coming in when not enabled. The battery output is controlled by this double mosfet, both output and charger input are on the same pin. It needs to be a double one because there should not be any output if it has not been asked for and when external power is applied to be put through the charger it must not enter directly to the battery so current must be blocked going both ways. The last schematic is as generic as it gets ignoring another mosfet that feeds the charger.The issue seems to be that there in unpowered circuitry that is pulling one source or drain down and it doing so will activate the other mosfet.

author: BrianHG
author_rank: Super Contributor
timestamp: October 04, 2021, 02:53:28 am
content: Looking back on some of Simon's comments and schematics, I'm confused. Simon, is all you want is a super low drop diode, IE an ideal diode?These things exist...Example 1, a solar-panel diode: SM74611KTTR from texas instruments.Up to 15 amps, only a 0.026v drop at 8 amps.This is nothing more than a mosfet with a built in ideal diode gate driver with charge pump for the gate drive.Note that the charge pump means that at around 32Khz, for a tiny fraction of time, the Mosfet auto-turns off to check for a voltage drop and to build charge to drive the gate. The 0.026v drop is the total average voltage drop over the 32KHz time. So this guy's drop is actually less and it makes almost no heat at full load.Note that ICs exists specially to drive a mosfet to do the same as the TI solar-panel ideal diode. I don't remember who, but you would need to Google along the lines of 'mosfet ideal diode controller'.Also, have you searched FERD diodes. I bet if not 1, 2 to 4 in parallel will get below 0.25v drop at 10 amps.

author: BrianHG
author_rank: Super Contributor
timestamp: October 04, 2021, 02:58:55 am
content: Here is an 'Ideal Diode Controller' from linear technology:LTC4357

author: dietert1
author_rank: Super Contributor
timestamp: October 04, 2021, 06:26:07 am
content: Often the two back to back mosfets are wired with sources and gates in common. Combine that with a photovoltaic optocoupler like PVI1050 to drive the mosfets. Very simple circuit with isolation between drive and output - a perfect replacement for a relay contact.About 10 years ago i found that circuit is a nice mod for output relays in audio amplifiers and active speakers, for reliable operation and better sound.Regards, Dieter

author: Simon
author_rank: Unknown
timestamp: October 04, 2021, 07:39:52 am
content: Yes such an ideal diode could work I need to look into this more. As things stand with parts supply I'll be using relay's that look like they are cheaper and less resistance.

author: BrianHG
author_rank: Super Contributor
timestamp: October 04, 2021, 08:06:40 am
content: Quote from: Simon on October 04, 2021, 07:39:52 amYes, relay is cheaper.Look at the last page of the LTC4357 datasheet. They have others in the same family which may replace microcontroller control, or control 2 mosfets from 2 power sources with built in logic and status flag outputs including 20v versions designed for heavier currents.

author: Simon
author_rank: Unknown
timestamp: October 04, 2021, 08:16:12 am
content: I think if I use mosfets I need something like the attached.

author: langwadt
author_rank: Super Contributor
timestamp: October 04, 2021, 08:58:01 am
content: Quote from: Simon on October 04, 2021, 08:16:12 amkeep in mind that the right fet will not work like a diode once it has been turned on. So if you turn on the left fet and then add a supply to output it'll feed the battery and you have no way to stop that

author: dietert1
author_rank: Super Contributor
timestamp: October 04, 2021, 09:35:16 am
content: The back-to-back mosfet relay is lower resistance, if you select the right parts. Typical contact resistance of a new relay often is 10 or 20 milliOhm, easy to beat with mosfets if you keep them cool. While a new relay may perform well, after some time contacts will deteriorate. Mosfets always switch the same.Regards, Dieter

author: Simon
author_rank: Unknown
timestamp: October 04, 2021, 09:38:45 am
content: Quote from: dietert1 on October 04, 2021, 09:35:16 amHave you tried to buy mosfet's recently?

author: Simon
author_rank: Unknown
timestamp: October 04, 2021, 09:41:03 am
content: Quote from: langwadt on October 04, 2021, 08:58:01 amYes. What I am doing is measuring current consumption. as soon as it drops below the known loads idle current the output goes off so you cannot backfeed. If there is voltage on the output already the output will not turn on. Yes I have states galore in the code.

author: langwadt
author_rank: Super Contributor
timestamp: October 04, 2021, 10:56:02 am
content: Quote from: Simon on October 04, 2021, 09:41:03 amif you add a supply while the left fet is on it is too late, the right fet will not turn off and the left fet has the body diode int he back feed direction

author: dietert1
author_rank: Super Contributor
timestamp: October 04, 2021, 11:02:23 am
content: Quote from: Simon on October 04, 2021, 09:38:45 amYes i got mosfets and PVI1050 optocouplers from Digikey, a similar use for input protection of nanovoltmeter. To get a start, you could try IRFB4110:https://www.ebay.com/itm/264780371590?hash=item3da623d686:g:-oIAAOSwhe1e-rCdRegards, Dieter

author: Simon
author_rank: Unknown
timestamp: October 04, 2021, 11:09:02 am
content: This is only 3A, I was looking at SO8 mosfet's, all gone.

author: DavidAlfa
author_rank: Super Contributor
timestamp: October 04, 2021, 11:52:39 am
content: For only 3 amps, I'd use the schottky diode.You have to be careful with that voltage divider at the gate.Under any circunstance the voltage at the gate must be between 12V and 18V.Less and it might overheat, more and will break down.This resistor values will work in the range of 30-48V.I you're absolutely sure the voltage isn't going to exceed 48V, you can remove the zener.If the voltage can go below 30V, then it'll need further tweaks.I'd make an additional security check by reading the external voltage and only turning on the fet if it's within limits.A simple zener and some resistors...

author: Simon
author_rank: Unknown
timestamp: October 04, 2021, 11:55:38 am
content: The battery (with built in charger) will only be connected to it's device or a supplied power supply. If the user wants to mishandle it that is beyond the warranty. I know the voltages I plan to use for the charger so no problem there.

author: DavidAlfa
author_rank: Super Contributor
timestamp: October 04, 2021, 12:31:53 pm
content: It's also your work to try avoiding these things.Suddenly the charger breaks down, outputting lower voltage, and your board burns out?I would only expect that with something from AliExpress.Meh. You'll earn a bad reputation...avoiding a simple voltage detector to save few cents.Specially when playing with batteries, that things can catch fire!You can do it with few resistors, transistors and zeners.That's assuming you want to make it as simple as possible, the best would be a voltage divider, sampling it with the ADC.

author: Simon
author_rank: Unknown
timestamp: October 04, 2021, 07:50:50 pm
content: Uh, OK. The input/ouput is gated by the transistors rated for 60V. The terminal as I call it is indeed connected to an ADC that checks the voltage before it will do anything!!!! As I said I have states galore in the software of this thing as it is either in charge mode or discharge mode which is decided at startup and you cannot go from mode to another. If some idiot wants to fashion their own power supply solution and jamb it on I cannot help that. We supply the power supply, they are not encouraged to use their own, they follow the manual! when did you last buy an appliance with a power supply that said in the manual that you are OK to connect to it anything you like?

author: DavidAlfa
author_rank: Super Contributor
timestamp: October 05, 2021, 10:28:36 am
content: Don't think only on the customer's fault, your own power supply could also fail for whatever reason.It's not a toy or a simple thing that will just make a little bang and end of the story.Batteries must be treated with caution and within safety limits.You could get sued if they find your device was poorly made,avoiding any safety systems, not to mention if it causes personal damage.Why did the battery explode? -I don't know, it's not covered by the warranty. Doesn't sound like a good argument!For the overvoltage protection, you simply put a fuse and a clamp diode.If the voltage is exceeded, the diode shorts the line and burns the fuse. Simple, and safe.The customer will send back the device, you'll see what happened, deny warranty and quote a reparation. Everyone happy.But you know you made a good job by not letting things to the luck.

author: dietert1
author_rank: Super Contributor
timestamp: October 05, 2021, 11:26:00 am
content: Fuses and relays are a bit oldfashioned. Nowadays people use PTC resistors instead of fuses and mosfets instead of relays. Also it will be easier to find a SO8 dual mosfet than a SO8 relay.Regards, Dieter

author: Simon
author_rank: Unknown
timestamp: October 05, 2021, 11:46:50 am
content: Quote from: DavidAlfa on October 05, 2021, 10:28:36 amYes I will be adding those as well. All I am saying is that for normal use the mosfets are already rated and the gate resistors worked out so it is a case of bulk protection from incidents like you mention. I have to protect from an automotive output anyway so will need a TVS. Each battery is also fused on it's own.

author: Simon
author_rank: Unknown
timestamp: October 05, 2021, 11:48:39 am
content: Quote from: dietert1 on October 05, 2021, 11:26:00 amI can look at PTC's but they seem to be harder to get when the current goes over 1 amp. As for SO8 P channel mosfet's when was the last time you tried to get some, not easy right now to get with a channel resistance of 14m Ohm. 55+ yes.Relays are abundant, it's the silicon fabs that are overworked and failing to supply.

author: langwadt
author_rank: Super Contributor
timestamp: October 05, 2021, 12:10:10 pm
content: Quote from: Simon on October 05, 2021, 11:48:39 amwhat voltage? will 40V do?https://www.lcsc.com/product-detail/MOSFETs_Vishay-Intertech-SI4401DDY-T1-GE3_C72317.htmlhttps://www.lcsc.com/product-detail/MOSFETs_Vishay-Intertech-SI4401BDY-T1-E3_C142561.html

author: Simon
author_rank: Unknown
timestamp: October 05, 2021, 12:14:12 pm
content: No, 40V is cutting it a bit fine, I can use 40V in some places but one or two need to be 60V as the maximum battery voltage is 38V.