Author Topic: TL431 With Resistor Divider on REF  (Read 1065 times)

0 Members and 1 Guest are viewing this topic.

Offline DannyxTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: ro
  • CertifiedAxhole
TL431 With Resistor Divider on REF
« on: May 15, 2024, 04:54:32 pm »
Good day folks. I'm messing around with a TL431 on my breadboard trying to build a water leak detector. We'll leave that aside for now, since everyone will instantly jump on me saying how that's already been done to death - that's not the point.

The point is that as I was messing around on my breadboard, trying out different stuff, I accidentally went down a rabbit hole that I could not escape with my humble knowledge about the 431. It's probably something fairly simple and obvious, but the math got too complicated :D

The setup, which doesn't actually serve any practical purpose (yet), is as follows (you'll have to excuse the PaintCAD drawing, I didn't have KiCad installed on the machine):

-Fig.1 shows a typical 431 adjustable regulator. I tested this exact setup and it works. R3 is a random 20k trimmer I had lying on the bench. The wiper of the trimmer is connected to the REF pin and I measure between the cathode (after R1) and GND. I don't have a scope, so I don't know how noisy the result is, but the voltage appears stable on my DMM, unaffected by any variations in the input I create using my bench supply. The formula Vo=[(R1/R2)+1]*2.5v also works out (I don't know much in terms of math, so I may not use the brackets correctly...learning ;D)

-Then, out of curiosity, I tried Fig. 2: I shorted across the potentiometer R3, with the wiper placed in its middle position (10k on either side). Suddenly, the formula no longer matches the reading !

-Thinking there's probably something off in my calculations, I broke down the potentiometer into two identical 10k resistors (R5 and R6) in Fig.3 to make it easier for me to follow. I then realized the two 10k resistors get connected in parallel when I shunt across the potentiometer, so I can simply represent the two 10k resistors as a single 5k one, so I broke it down even more in Fig.4.

Before shunting the potentiometer, the formula still applies, as far as I remember, even when modelling the potentiometer as two extra resistors (even if non-identical): I simply add their values on either side of the REF pin as if they were one, so Vo= {[(R2+R5)/(R4+R6)]+1}*2.5v.

What happens in the last case though ? I assumed the formula would still apply, but the result on paper is 5.5v, while in reality I measure around 7v on the anode - nowhere near close. I thought it should be Vo={[(R2+R3)/(R3+R4)]+1}*2.5v, which DOES give 5.5v, but that's obviously wrong, since the DMM says otherwise.....how do I get 7v there ?

I obviously don't know my basics here and I expect the answer to be of the DUUUH variety, but let's see.....
DannyX
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1569
  • Country: ua
Re: TL431 With Resistor Divider on REF
« Reply #1 on: May 15, 2024, 05:10:20 pm »
5.5V is what you'd expect. V=2.5*(1+R2/R4).

The value of R3 (fig. 4) makes almost no difference, within reason (try to replace it with e.g. a 100k resistor), since it sits between the voltage divider's output and the high impedance REF input of the TL431.

In other words, R3 plays no role in the feedback voltage divider that provides input for the REF pin.
 

Offline DannyxTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: ro
  • CertifiedAxhole
Re: TL431 With Resistor Divider on REF
« Reply #2 on: May 15, 2024, 05:13:39 pm »
Ok, but then why the discrepancy between the math and the 7v on my DMM ? This is what intrigued me in the first place and spent half a day trying to figure it out :D
DannyX
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1569
  • Country: ua
Re: TL431 With Resistor Divider on REF
« Reply #3 on: May 15, 2024, 05:20:30 pm »
Ok, but then why the discrepancy between the math and the 7v on my DMM ? This is what intrigued me in the first place and spent half a day trying to figure it out :D
Ah yes I missed that. Well, it looks strange. However, there is a particular section in the TL431's datasheet which refers to the stability of the output. To avoid oscillation, the capacitor across the output should be either less than 1 uF, or higher than 10 uF.
Yours is 4.7 uF, right in the middle of the unstable range. Is it the same on the actual breadboard? Try to use a cap outside of the not recommended range (or no cap at all) and see if it changes anything.
 

Offline DannyxTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: ro
  • CertifiedAxhole
Re: TL431 With Resistor Divider on REF
« Reply #4 on: May 15, 2024, 05:30:09 pm »
I assume you're referring to THIS https://www.ti.com/lit/an/slva482a/slva482a.pdf?ts=1715776409109&ref_url=https%253A%252F%252Fwww.google.com%252F?
How do you mask hyperlinks behind words, so I don't barf the entire URL there by the way ?
If so, then I assumed 4.7uF is perfectly adequate, since it's past the green dot in the first graph at such low current - at least that's how I interpret that graph.
DannyX
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1569
  • Country: ua
Re: TL431 With Resistor Divider on REF
« Reply #5 on: May 15, 2024, 05:38:23 pm »
All right, nevermind the oscillation (for the time being).

So my math was wrong as well.

The formula was right, but the calculation wasn't: 2.5*(1+2k2/1k) = 8, so you should be getting 8 volts on the output.

Why are you getting 7 volts and not 8 volts? Well, it's because the 431 isn't even active. R1 and (R2+R4) form a resistor divider that creates 7.1V on the node between R1 and R2, and that's what you are measuring.

If you increase the supply voltage to 14-15V, you should start seeing 8V on the 431's cathode, which will stay there if you increase the voltage further.

But it's better to increase the values of R2 and R4, like significantly, an order of magnitude or more. Try e.g. 22k and 10k, respectively, you should get your 8V on the cathode pin then.

Also keep in mind that the 431 requires a certain minimum cathode current for correct operation (min of 1mA is recommended).

p.s. simulation is your friend. After a long day I had to run a quick simulation in kicad/ngspice to understand what was going on :)
« Last Edit: May 15, 2024, 05:40:23 pm by shapirus »
 
The following users thanked this post: Dannyx

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7112
  • Country: ca
Re: TL431 With Resistor Divider on REF
« Reply #6 on: May 15, 2024, 05:59:20 pm »
Different makes of TL431- each have their own stability region for the capacitor. TI max. is 2.2uF
Confirm what you have got and see the graph I posted some here: https://www.eevblog.com/forum/beginners/tl431-not-giving-expected-voltage/msg4417750/#msg4417750

edit: a jumper across a potentiometer's ends effectively makes it do nothing here...
« Last Edit: May 15, 2024, 08:05:59 pm by floobydust »
 

Offline DannyxTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: ro
  • CertifiedAxhole
Re: TL431 With Resistor Divider on REF
« Reply #7 on: May 16, 2024, 03:00:36 pm »
Ok, that explains the result, but then again, why is the 431 not active in that setup ? I assume it's because because the voltage created by divider R1 and (R2+R4) on the REF pin is too close to the desired output, which would be 8v. As far as I know, 2.5v is the minimum difference between the input and the REF pin with the 431, which makes sense, since that what the internal reference is set at.

Also, to keep the noob ball rolling, why is R3 not playing a part here ? It IS in series with the REF pin, so current MUST go through it one way or another....
DannyX
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1569
  • Country: ua
Re: TL431 With Resistor Divider on REF
« Reply #8 on: May 16, 2024, 03:42:18 pm »
Ok, that explains the result, but then again, why is the 431 not active in that setup ? I assume it's because because the voltage created by divider R1 and (R2+R4) on the REF pin is too close to the desired output, which would be 8v.
Because TL431 effectively acts as an adjustable zener diode. If you think of it this way, it becomes clear: if you apply 4V to a 5.1V zener diode, you'll still measure no more than 4V on its cathode.

Also, to keep the noob ball rolling, why is R3 not playing a part here ? It IS in series with the REF pin, so current MUST go through it one way or another....
REF input is high impedance, so current through R3 is very low (microamps, if we look in the datasheet). Try increasing it to several MOhms and see what happens.
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3080
  • Country: us
Re: TL431 With Resistor Divider on REF
« Reply #9 on: May 16, 2024, 04:10:54 pm »
I assume you're referring to THIS https://www.ti.com/lit/an/slva482a/slva482a.pdf?ts=1715776409109&ref_url=https%253A%252F%252Fwww.google.com%252F?
How do you mask hyperlinks behind words, so I don't barf the entire URL there by the way ?

You can use the URL tag like this:
Code: [Select]
[url=https://cnn.com]This is a link to CNN[/url]

In the case of the TI link you can make the URL cleaner by just removing everything after the ?... e.g. https://www.ti.com/lit/an/slva482a/slva482a.pdf
 
The following users thanked this post: Dannyx

Offline DannyxTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: ro
  • CertifiedAxhole
Re: TL431 With Resistor Divider on REF
« Reply #10 on: May 16, 2024, 05:52:14 pm »
Thanks. Like I said, shunting that potentiometer is not of any practical use. It all started as an idea when I was playing around on my breadboard trying to build a liquid detector. I'm probably doing it all wrong OR over-engineering it and although I HAVE consulted some other design ideas beforehand, I thought "hmmm.....I can probably make it better" :D

You'll have to excuse any errors that follow, since this is from memory right now:

Fig.1 in this attachment: I started by using just a comparator IC alone.
I set a reference voltage on its N/I pin using a trimmer R3.
I then used a resistor divider (R1,R2) on its inverting input and adjusted the trimmer R3 so the voltage there is just a hair below the inverting input (can't remember exact values here, so please ignore that for now).
I connected my detector pad/cell between the inverting input and GND, in parallel with the divider I just created.
The idea is that when dry, the cell is open circuit and doesn't interfere at all, since all this is is just two traces zig-zagging close together, but not actually touching. When a liquid falls on the traces, it unavoidably bridges the tiny gaps between the traces, acting as a new resistor to GND, parallel to R2.
Since that input is already sitting just a smidgen below the N/I input, the drop in resistance to GND is just enough to upset the voltage set by the divider, which triggers the comparator.
I adjusted the trimmer R3 so that the cell doesn't cause a reaction when I touch it with my fingers, but reacts when splashed with water for instance.
I used a NPN on the output of the op-amp to switch a relay (not shown).

I then took it one step further and added a resistor from the output back to the inverting input for some hysteresis, as thought by.....you guessed it: Dave himself :D This seemed to work well enough for my purposes, even in this half-arsed manner, but was sub-optimal because using a trimmer to set a reference is anything but stable. Sure enough, if I played around with the input voltage I was feeding this thing, the relay came on when my finger was touching the cell, even though it wasn't doing that before, which makes perfect sense, since I "tuned" my trimmer with a Vcc of 12v, so decreasing Vcc also threw off my reference. The power supply for this project CAN sag considerably, since it can run on battery if mains fails (alarm system), so a voltage as low as 10.5v might be expected, even if pretty unlikely.

I was going to use a zener to set the reference voltage (not sure what voltage would be appropriate), but I learned a 431 might be even more stable, plus it's adjustable and I'm not limited by physical space or part count, so I went with that. I set it up on the breadboard, still using a trimmer to mess with the REF pin, as shown in the first post, Fig.1. It seemed to be very stable, even with my humble DMM. I was going to feed the reference voltage into the comparator and still use the resistor divider idea on the opposite input. I then began thinking how I'd go about attaching my moisture cell and NOW you finally understand how this topic came to be: I thought "what if I connect this here, just across the pot like that ?" and then began speculating what would happen if I just short across my cell entirely.......for some reason - say there's a mercury leak :D - so there you have it...Load of baloney, I know.... ::)

I'll keep experimenting with this, see where it gets me...sky's the limit, ain't it ? :D
DannyX
 

Offline DannyxTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: ro
  • CertifiedAxhole
Re: TL431 With Resistor Divider on REF
« Reply #11 on: May 23, 2024, 08:18:46 am »
Which of the info should I use when it comes to the stability graphs for the capacitive load on TL431A: this REALLY old document from TI, OR the graphs you linked to ? The values seem different.
DannyX
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2451
  • Country: gb
  • Recovering Electrical Engineer
Re: TL431 With Resistor Divider on REF
« Reply #12 on: May 23, 2024, 10:25:21 am »
Dont sweat it. www.ti.com/tool/TL431CALC
BTW you can use a TL431 as a comparator
 

Offline DannyxTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: ro
  • CertifiedAxhole
Re: TL431 With Resistor Divider on REF
« Reply #13 on: May 23, 2024, 10:43:43 am »
Oh, LOL...OK, I actually made my own version of that Excel calculator just a few days ago so it would calculate stuff for me, so I'm not as dumb as I thought :box:
DannyX
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1569
  • Country: ua
Re: TL431 With Resistor Divider on REF
« Reply #14 on: May 23, 2024, 11:04:20 am »
BTW you can use a TL431 as a comparator
Of a rather limited usability, though: its low output doesn't swing to ground, it'll stay at somewhere around 2 volts, unlike normal comparators, so it'll require additional parts to interface with e.g. CMOS logic or whatever.

More details on this: https://www.ti.com/lit/an/slva987a/slva987a.pdf
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21828
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: TL431 With Resistor Divider on REF
« Reply #15 on: May 23, 2024, 01:04:46 pm »
Yeah, works when you don't mind the saturation voltage; notice in the equivalent diagram, there are diodes everywhere, in particular one from REF to K, therefore if the output pulls about 0.6V below REF, REF itself gets pulled down -- so it can't shunt any lower than about 1.9V, give or take tempco.

That's fine for many applications; mind also that the output is only valid "on" when it's drawing more than the minimum regulation current, say 1mA.  A typical case might drive a BJT base, which has a B-E resistor for this reason.  Like so:



Note the 220's to limit current and prevent false turn-on, until Ik is high enough; note also the divider through the SCR's gate voltage, which affords hysteresis (positive feedback), ensuring the TL431 snaps on within a microsecond or so, when it crosses that threshold.  This ensures adequate drive to the SCR, so it isn't being "simmered" in a marginal case, but certainty that it snaps on, crowbarring the supply.



Might as well add the backlink for reference: https://www.eevblog.com/forum/beginners/tl431-not-giving-expected-voltage/msg5512813/#msg5512813

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf