Trying to work out how overprotection circuit works with a TL431 + mosfet design - Page 1
Forum section: electronics / beginners

author: gmc
author_rank: Regular Contributor
timestamp: July 02, 2023, 03:52:16 pm
content: I've got a schematic from a github page that is supposed to protect retro computers from bad power supplies if the input voltage from the power supply goes bad.A few people have built the circuit so I'm thinking the schematic is sound (Probably my first mistake there)It's a fairly simple circuit which is supposed to disable the output if the input voltage exceeds some voltage.The input voltage is normally supposed to be 5V but what determines what the input voltage voltage should be for the protection circuit to kick in? 6? 10V 20? How is this determined?I've build the circuit and can't get get it working and now trying to work through the schematic to try and work out how this thing is supposed to work and have more questions than answersRead up about TL431's and mosfets and have a basic understanding but for the life of me I can't work out how this circuit shuts off the output if the voltage exceeds some value.First tested inputting 5V and get 5V on the output - yay.But then I increased the input to 7V and still get 7V on the output. I've repalce the TL431, and transistor and mosfet so I don't think it's a damaged component.Trying to analyse the circuit but can't figure out what some of the voltage are what they are.When applying 7V input power, the reference voltage on TL431 is determined by ratio of R1/R2 and R7+R4 in parallel which gives 1.86V. Using (1+R1/R2) on the TL431 outputs 2.7V on the cathode.Voltage on base of Q5 is determined by R5/R6 divider which is 610mV. This turns on Q5If Q5 is on then why is there 4.86V on the collector? Shouldn't it be zero?What is the purpose of the D4 Zener? It will clamp the voltage to 6.8V - is this incase a high input voltage is applied?I've attached the same schematic with 5V input and the corresponsing voltages. I can't figure out how this is supposed to disable the output voltage. On the P channel mosfet from my reading up, to disable the output you need to put a negative voltage to the gate.

author: ArdWar
author_rank: Frequent Contributor
timestamp: July 02, 2023, 04:39:45 pm
content: IRF5305 is a PMOS, and the circuit do need a PMOS on Q6. It should be obvious but the wrong symbol used there can lead to wild goose chase.The idea here is (apparently) TL431 working simply as reference comparator.Trip point is set by the usual equation Vin=Vref(1+R2/R1). Below that voltage the voltage at R1-R2 junction is below Vref, U1 does not conduct so bias current flows from R3 -> R5 -> Q5.(R3+R5)/R6 voltage divider actually sets an UVLO. Below Vbe it doesnt cause Q5 to turn on, keeping Q6 off. But at about Vbe(R6+R3+R5)/R6 or about 3.3v Q5 turns on and causing Q6 to turn on.When the voltage at R1-R2 junction get above Vref, U1 conduct shunting Q5's base current and turning it off causing Q6 to turn off too.R4 is there to give a slight hysteresis to the Vref(1+R2/R1) setpoint.R7 -> R8 is PMOS gate driveD4 keeps VGSdrive within breakdown limit when Vin goes wild.

author: Kim Christensen
author_rank: Super Contributor
timestamp: July 02, 2023, 04:40:58 pm
content: At first glance it looks like it should work... But looking at your 7V example SIM...The problem with the TL431 is that it's "output" (Cathode) doesn't go to zero volts when it is on in open-loop mode... It'll only go down to around 2V or so (Your SIM says 2.7V).. The problem is the resistive divider (R5 & R6) will reduce the 2.7V to 628mV (SIM says 610mV) which is still enough to turn on Q5, and thus keeping Q6 on...But maybe some TL431 will go all the way down to 2V... Then the voltage on Q5's base would be 465mV and Q5 would turn off. It's a marginal design.The other problem I see is that Q6 won't have enough gate-source voltage to fully turn on, so when the output is loaded the output voltage will drop and Q6 will get hot. (Gate Threshold Voltage is between 2-4V for a IRFR5305)

author: ArdWar
author_rank: Frequent Contributor
timestamp: July 02, 2023, 04:52:52 pm
content: Quote from: Kim Christensen on July 02, 2023, 04:40:58 pmYeah, VKAis only guaranteed down to Vref. TI does mention open loop/reference comparator mode in its datasheet but doesn't actually give output characteristics hmm....

author: gmc
author_rank: Regular Contributor
timestamp: July 02, 2023, 05:53:33 pm
content: Thanks for this info. Just a note, this is not from a SIM but from actual hardware. I build the circuit but can't get it to disable the output.Maybe I need to play with the resistor divider R5/R6 values as it's clearly not working as per the original design.

author: magic
author_rank: Super Contributor
timestamp: July 02, 2023, 05:57:38 pm
content: This makes no sense. It looks like your TL431 may be reversed, i.e. cathode and reference pins swapped around.Also, I think you will get faster reaction time and a simpler circuit if you use PNP to turn-off the FET when TL431 triggers and a passive resistor from gate to ground to keep it turned on otherwise. (Don't forget 470Ω from PNP emitter to base to give TL431 some idle bias).

author: ArdWar
author_rank: Frequent Contributor
timestamp: July 02, 2023, 06:01:30 pm
content: Your Vref and Vk voltages don't make sense tbf, are you sure your TL431 actually works?

author: gmc
author_rank: Regular Contributor
timestamp: July 02, 2023, 06:26:05 pm
content: I've checked the footprint against the datasheet and it's all good. I've also swapped out the TL431 and get the same readings.Will do some testing with another TL431 I have (TO92). The ones I have been using are SOT23-3 (Maybe they are all faulty?)

author: magic
author_rank: Super Contributor
timestamp: July 02, 2023, 06:36:33 pm
content: There is a TL432 in SOT23 package, which is same thing but with these two pins swapped.Make sure you are looking at the right footprint in the datasheet (mind top/bottom view) and that you have the right chip.editTry also lower R3, like 2k2 or 1k. Its current value is marginal - it meets the "typical" specs, but not the guaranteed ones. Could be relevant if you are using some dodgy chips.Or throw it all out and use PNP.edit editI'm retarded, am I not?Fixed the schematic.

author: gmc
author_rank: Regular Contributor
timestamp: July 02, 2023, 06:44:32 pm
content: SMD's are marked 431 so am sure components is correct. Have also confirmed it with a DMM and compared footprint to the TL431Will run some tests using 2k2 and 1k

author: Terry Bites
author_rank: Super Contributor
timestamp: July 02, 2023, 07:53:20 pm
content: The TL431 can be made to operate as a decent comparator with built in Ref. see 10.2.1 in the TL431 datasheet and the applciation note on TL431 over and undervolt detectors. AttachedThe circuit shown shuts off nicely when the input goes above 5.5V.You'd wan to be damn sure its good over temp and component tolerances befor trusting your precious logic to it.You'd only be dead FET away from disaster. I'd still put my money on a good old crowbar.I can see that this Zener is there protect the FET from big over volt dramas. Else it all pretty straight forward.Where they get that 4.86V is a mystery though.Forget R4 to begin with, its there to add some overall hysteresis.If a hub isn't in the middle of a wheel, then I assume there's some serious bullshit going on and I just ignore it.

author: ArdWar
author_rank: Frequent Contributor
timestamp: July 02, 2023, 08:30:15 pm
content: Or just use TPS2521 or similar (if you can find one on stock). Designed and qualified for all the protection you need and probably some more

author: MrAl
author_rank: Super Contributor
timestamp: July 02, 2023, 09:04:38 pm
content: Quote from: gmc on July 02, 2023, 03:52:16 pmHello there,There are some questionable things there with your original circuit. Some others here have mentioned some of the problems i'll add to that.First, why go with a TL431. They make perfectly good comparators that are spec'd for speed, and their outputs go all the way to zero or at least down to 0.2v when the output transistor turns on. I would not use the 431 for a comparator unless i was forced to, i would use a comparator for a comparator, and you can get really, really, really fast ones if you feel the need, down to 5ns maybe lower now. I would guess that the 431 chip is in the microseconds range.Second, if you want to use a MOSFET as the series switch element, you need to have a low impedance path when it has to turn off. That's because MOSFETs are only fast when they have a low impedance driver, meaning some decent current like 500ma or more. With the 3.9k there it's going to be a fairly slow turn off most likely.Third, someone else mentioned that fact that they make special chips for this purpose now and they would be guaranteed to work the first time.In spite of the fact that i would not use a 431 for a comparator, i should at least point out the circuit that is in the applications section for that chip. The circuit is attached for your convenience.

author: gmc
author_rank: Regular Contributor
timestamp: July 02, 2023, 09:18:21 pm
content: @magic Thanks, things are looking a lot more promising with that circuit. It's kicking in at about 8V so will play around with the 470R/1k values.I will also look into the specialised chips. It might be easier in the long run

author: Terry Bites
author_rank: Super Contributor
timestamp: July 03, 2023, 06:25:36 am
content: It sims ok, cutting off at 5.5V. The misdrawn pfet can withstand ±20V of Vgs. The Zener is only there to clamp that to -6.8V/ +0.7V.That 4.86V, I make it 6.9V, just a typo? Ignore R4 to start with. It adds some over all hysteresis ~70mVSee 10.2.1 "Comparator With Integrated Reference" in the attached datasheet and slva987I'd be wanting an angry red status LED slapped across D1 and a cool green indicator on the load side.Github, the clue is in the name surely....

author: magic
author_rank: Super Contributor
timestamp: July 03, 2023, 07:25:49 am
content: Quote from: MrAl on July 02, 2023, 09:04:38 pmUsing TL431 as an anode follower is something I haven't seen before, TI really worked hard to invent reasons for us to buy more of themQuote from: gmc on July 02, 2023, 09:18:21 pmReally? It should be 5.5V, that's when REF pin gets 2.5V on it. The cathode should then be ~2V and 1k/470 should provide easily enough voltage on the PNP base to turn it on.Quote from: Terry Bites on July 03, 2023, 06:25:36 amMaybe you are onto something

author: gmc
author_rank: Regular Contributor
timestamp: July 03, 2023, 12:23:10 pm
content: I think it's time to give up with the inconsistant readings on the TL431. Started from scratch and will use a comparitor.

author: Kim Christensen
author_rank: Super Contributor
timestamp: July 03, 2023, 02:59:07 pm
content: Well, at least you should be able to use the TL431 as a 2.5V reference for the comparator. Unless it's completely knackered.

author: MrAl
author_rank: Super Contributor
timestamp: July 03, 2023, 07:55:25 pm
content: Hello again,I could not find any specs on the TL431 as to the speed of operation. They dont seem to publish that information. You'd have to test that yourself.The kind of circuit used in a lot of home computer power supplies (12v, -12,v, +5v, etc.) uses an LM339 or similar IC for the over/under voltage protection sensing. They must be fast enough although there are even faster comparators out there.