Author Topic: Improving a TL431 Window Comparator with Hysteresis  (Read 6523 times)

0 Members and 1 Guest are viewing this topic.

Online Echo88Topic starter

  • Frequent Contributor
  • **
  • Posts: 866
  • Country: de
Improving a TL431 Window Comparator with Hysteresis
« on: September 02, 2020, 05:01:25 am »
I needed a cheap circuit which decides wether an input voltage is in an acceptable range and consequently switches a MOSFET to connect the input voltage to a load (Undervoltage/Overvoltage Lockout).
So i decided to adapt some TL431 in window comparator configuration for that task, based on the following circuit suggestion:
https://electronics.stackexchange.com/questions/47154/low-battery-indicator-for-2x-aa-batteries?noredirect=1&lq=1 (second circuit)
However, since the input voltage might vary a bit the circuit needs some hysteresis, which i couldnt successfully implement/the output still shows instability.

I found another TL431 comparator suggestion https://www.edn.com/shunt-regulator-monitors-battery-voltage/ with hysteresis and based on that i cobbled together another circuit, which seems to work and is stable. Might be improved in values or contain problems in real life though.

Both circuits are included in the attached .asc document and id like to know if someone can enlighten me on how to implement hysteresis on the bottom circuit, to get a stable output like the top circuit shows.
Just watch Vout/Vout2 and youll see the mentioned instability at the switching endges in the bottom circuit. The sine voltage source is used to simulate voltage variation.

Or maybe there are other suggestions for low cost/simple UV/OV-LO-circuits, without needing to use more expensive LT4356/LTC4365 for example.

Thanks.  :)
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7458
  • Country: pl
Re: Improving a TL431 Window Comparator with Hysteresis
« Reply #1 on: September 02, 2020, 05:52:34 am »
Since it seems you already need two TL431, not just one...

Dunno, use a normal dual comparator with the usual hysteresis solution and open collector outputs or diodes to NOR the two outputs?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13218
Re: Improving a TL431 Window Comparator with Hysteresis
« Reply #2 on: September 02, 2020, 07:03:59 am »
A TL431 closely resembles an OPAMP with an open collector output, with its +in internally connected to a 2.5V reference and not user accessible.   As the only input you have is the -in, all DC feedback is inherently negative and therefore hysteresis, which requires positive feedback is impossible without another active device acting to invert its output.  If you are using it to pull down a P-MOSFET pass transistor gate, its tempting to tap additional feedback from the drain, but that can result in load dependent instability, so its much safer to use a separate small signal P-MOSFET to bypass part of the upper part of the feedback divider or switch in a high value resistor in parallel to achieve the shift in setpoint required to proviide the required hysteresis band.  The EDN circuit you linked works on the same principle but increases the part count by using a PNP BJT, which needs base resistors.

The StackExchange TL431 window comparator is from a depreciated (2004) copy of the Texas Instruments TL431 datasheet   [here]. The current datasheet (rev. 2018) totally omits any such circuit.  I believe that would be because its fundamentally flawed - depending on tolerances there's no guarantee that the left TL431's output low level is below the reference voltage of the right TL431.  To fix it you need to insert an extra resistor in the middle of the R1B, R2B divider chain with the left TL431 cathode above it and the right TL431 Ref below it.

You can apply hysteresis to the right TL431  for the undervoltage threshold easily enough, but applying hysteresis to the left one for the overvoltage threshold is much trickier.

I'm with Magic on this:  If you want a window function, the TL431 is seriously sub-optimal.  The cheapest option is probably a 'jellybean' dual comparator with push-pull outputs,  fed from a jellybean low power regulator so the reference can be a simple divider from its supply, with its outputs NORed together with a common cathode dual diode.  Three semiconductors and a sprinkling of passives.   

Of course you *CAN* pay boutique prices for dual comparators with a reference in the same package but finding one with adjustable hysteresis for both thresholds isn't easy and you'll probably not be able to easily second source it.
« Last Edit: September 02, 2020, 07:06:37 am by Ian.M »
 

Offline eblc1388

  • Frequent Contributor
  • **
  • Posts: 400
  • Country: gb
Re: Improving a TL431 Window Comparator with Hysteresis
« Reply #3 on: September 02, 2020, 08:30:30 am »
Well for discussion and comment, the following is my feeble attempt to put hysteresis to the circuit. Without them the Vout oscillate both at the low and high level limit. The output seem clean after adding the hysteresis. So it is for your reference only.




 
 

Offline Alti

  • Frequent Contributor
  • **
  • Posts: 404
  • Country: 00
Re: Improving a TL431 Window Comparator with Hysteresis
« Reply #4 on: September 02, 2020, 10:10:25 am »
LM339 is around $36 for 1k, LM339 from ST, LCSC
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Improving a TL431 Window Comparator with Hysteresis
« Reply #5 on: September 02, 2020, 10:13:43 am »
depending on tolerances there's no guarantee that the left TL431's output low level is below the reference voltage of the right TL431.

Actually, the output saturates down to a diode drop below Vref -- review the internal diagram to see why. :-+

Also underappreciated is the subthreshold region of these devices -- leakage is low below 2.1 or 2.2V, gradually turning on up to 2.5V.  The 1mA minimum bias spec (or less for improved versions) is for meeting the 2.50V spec, but there are one-sided or clamping use cases where this is less important. :)

Also FYI, it's feasible to add positive feedback by adding a resistor divider to the anode (ground return).

Mind that none of these approaches are acceptable for battery management; the leakage is way, way too high (fractional mA even for the best 431-style parts).  For that, use a proper battery management chip, or one of those micropower ref+comp chips.  Single microamperes is very reasonable here.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: Ian.M

Online Echo88Topic starter

  • Frequent Contributor
  • **
  • Posts: 866
  • Country: de
Re: Improving a TL431 Window Comparator with Hysteresis
« Reply #6 on: September 02, 2020, 07:34:49 pm »
Thanks for the suggestions :)
In this case it might indeed be the best to go with a LM393 and a small shunt regulator, while the cost and partcount are about the same.
 

Offline eblc1388

  • Frequent Contributor
  • **
  • Posts: 400
  • Country: gb
Re: Improving a TL431 Window Comparator with Hysteresis
« Reply #7 on: September 04, 2020, 06:08:16 am »
Don't forget to show us how the new circuit performs with a 1V ripple riding on the input voltage, as per the TL431 simulation shown above.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf