make an SPDT switch using mosfets - Page 1
Forum section: electronics / projects

author: robint
author_rank: Regular Contributor
timestamp: December 23, 2023, 05:16:07 pm
content: I see this has been asked a few times but answers have been only bits and pieces of the puzzle. Clearly I want to replace a mechanical toggle switch or relay with a solid state equivalent - In all respects of functionality, ie the control sig (your finger or energise solendoid) is isolated, the output is two independant isolated conductive channels that hold their state. There must be no s/c overlap during transition - no momentary short at all across channels - entirely break before make under all cases. On de-energising (power off) the mosfet cct should reset to a known condition.Hope that covers it - but I have a suspicion - not everything.The ccts I have seen tend to trivialise the changeover state and its possible failure (s/c even for usecs). There is the impact of noise and spikes to consider that could trip the state for example.My concern is with switching Lipo cells so for basic SOR use 5Vdc source and 5A switch current with 10A load. Assume that a separate fault interrupt cct exists. Switching frequency <20kHz maybe 5kHz square wave 50% duty.I dont want to resort to a Micro with s/w control the cct. A 555 clock should be fine.I was thinking that an A or B state becoming ON should be enabled first by the other channel being confirmed as OFF with a suitable delay time between.Sorry if this is a bit scrambled, I dont want to over shadow creative thought by fresh mindsYou would think somehow this would obviously be avaiableRobin

author: ajb
author_rank: Super Contributor
timestamp: December 23, 2023, 10:30:36 pm
content: What's the application? Are you looking for a half-bridge configuration, or something like switching between two power sources? Individual MOSFETs can only block current flow in one direction (due to internal body diode), so this matters in terms of what a suitable circuit looks like. And what does "5A switch current with 10A load" mean? Does the switch need to carry 5A or 10A?There are monolithic full- and half-bridge ICs as well as gate drivers that incorporate shoot-through and other protections, so those would be ready-made options if that sort of circuit is what you're after.QuoteYou can certainly add some analog circuitry to protect the switch circuit, including against both sides being on at the same time, and there can be advantages in the speed and determinism provided by an analog solution. But doing that in an MCU is much easier and more flexible once you get above a certain level of complexity. Although realistically, if you're not trying to maximize switching performance and have a relatively limited operating range, some fixed dead time during switch changeover is probably sufficient. Especially at only 5kHz. (As it happens, many modern MCUs have timer peripherals specifically designed for controlling power stages that can easily generate complementary waveforms with programmable deadtime. Some can be configured to use built-in analog comparators as fault signals the timer will directly react to, so you can do waveform gen + protection with just an MCU and some passives, with little/no software in the protection loop.) If one side of the switch has failed short you would still have problems, but at that point the device is already broken, and you say there's some overcurrent protection

author: robint
author_rank: Regular Contributor
timestamp: December 24, 2023, 05:01:08 am
content: @ajbWhat's the application? Are you looking for a half-bridge configuration, or something like switching between two power sources? Individual MOSFETs can only block current flow in one direction (due to internal body diode), so this matters in terms of what a suitable circuit looks like. And what does "5A switch current with 10A load" mean? Does the switch need to carry 5A or 10A?In switching circuits you define, amongst many other things, FL current and breaking current - in dc this is especially important with switchgear.with bridges look carefully at the switchover point - the exact changeover conditions are not defined and there is no delay time gap between ch A and ch B. you dont have break before make. The current in any one channel needs time to decay . That crossover point could result in a large current spikeIf it was as simple as using a bridge I wouldnt be asking this question. The humble toggle switch has very distinct features (and also a bad one in the form of contact bounce which BTW is inherent in every fast mechanical switch - the only exception is a mercury tilting switch AFAIK)

author: ajb
author_rank: Super Contributor
timestamp: December 24, 2023, 08:35:27 am
content: Quote from: robint on December 24, 2023, 05:01:08 amok, but we’re talking about MOSFETs, which have a current rating primarily based on thermal/time limitations. Switching them involves going through the SOA curves, but SOA is SOA, and anything outside that is a dead transistor. If you need the transistor to survive — let alone function under — huge fault currents, then those fault currents need to be under the appropriate line on the SOA chart.QuoteBreak-before-make isn’t complicated or all that ‘distinct’. You just wait for one transistor to turn off before you turn the other one on. “Waiting” is literally all that’s required in many cases. How long to wait can be determined based on characteristics of the transistor and gate drive circuit. You can do more complicated things if you want to minimize that dead time under all conditions, or provide additional protection. Some bridge/driver ICs do indeed have those more complicated things built in, if you read their datasheets. This is something literally every two-transistor power stage has to consider, so there are plenty of solutions on the shelves.But if you need something different, or just want to reinvent the wheel (which is fine, and can be very instructive!), you’re going to need to explain more clearly what you’re trying to *do* with this switch, because that will constrain how you might create a circuit to do what you want. At least which way round the currents and voltages are in the two switch states.

author: David Hess
author_rank: Super Contributor
timestamp: December 25, 2023, 01:51:26 am
content: There are a couple of ways to enforce break-before-make action.A couple of logic gates plus some RC filters can produce non-overlapping drive. This is sometimes found in switching power supply controllers which use push-pull drive.Integrated controllers may implement adaptive switching by measuring the gate voltage of each MOSFET and only switching the other on once it has fallen below some threshold. I have also seen this done with discrete comparators and the same gate circuit described above.

author: Andy Chee
author_rank: Super Contributor
timestamp: December 25, 2023, 02:08:15 am
content: Quote from: robint on December 23, 2023, 05:16:07 pmA synchronous half-bridge gate driver could probably be repurposed to suit your application.Although the output is intended to drive a totem configuration, there's no reason why you couldn't use the outputs with separate MOSFETs in separate switching circuits.The key feature is the single input line that switches between the two MOSFETs, and the internal dead time delay to prevent both MOSFETs from ever turning on at the same time (turning on simultaneously would normally place a direct short across mains!)https://www.infineon.com/dgdl/ir2109.pdf?fileId=5546d462533600a4015355c7e85b1679There are also gate drivers with programmable delays if necessary.