How many pots can I write to an LM4040 voltage reference?

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
alexdry
 
Posts: 16
Joined: Sun Aug 16, 2020 4:51 am

How many pots can I write to an LM4040 voltage reference?

Post by alexdry »

How many pots can I wire to an LM4040 voltage reference before I'll have to use an op amp? The pots are 10K and I want to use them with the ADS1115 breakout.

Thanks,
Alexandros

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: How many pots can I write to an LM4040 voltage reference

Post by adafruit_support_mike »

There's no limit.

The LM4040 is a shunt regulator: if you connect it to a pull-up resistor, it draws whatever current is necessary to hold its cathode at the specified voltage. It needs at least 45uA to operate, and its upper limit is 15mA. The current flowing through the LM4040 doesn't flow through anything in parallel with it, so fixed parallel loads have no effect on it.

Assuming you have a 4.096V LM4040, each parallel 10k pot would draw 409.6uA. A thousand of them in parallel would draw 409.6mA, so connecting them to a well-regulated 500mA @ 5V power supply would leave 1.4mA for the LM4040. That's within the 45uA to 15mA range, so the LM4040 would hold the whole batch at 4.096V.

The main challenge for shunt regulators is parallel loads that change suddenly, like PWM'd LEDs. That forces the LM4040 to change its own current to keep up with the changing load. The LM4040's dynamic resistance is nominally 0.3 Ohms but can go as high as 0.8 Ohms, so a change of 10mA would cause the LM4040's output voltage to change by 3mV to 8mV.

User avatar
alexdry
 
Posts: 16
Joined: Sun Aug 16, 2020 4:51 am

Re: How many pots can I write to an LM4040 voltage reference

Post by alexdry »

Your detailed answer is quite clear, thanks! Still, I notice that if I use four pots with two ADS1115 breakouts (differential mode) and one LM4040 breakout, the total resolution is reduced and the maximum value I get from the pots is about 55,000. If I use only one ADS1115 with two pots and one LM4040, then the maximum value I get is about 62,000, much closer to 16-bits.
Here's the circuit:
Image
I guess, since my circuit works this way, I should use one LM4040 for every couple of pots and one ADS1115. If you have more advice I'd be more than happy to read it.

Thanks!

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: How many pots can I write to an LM4040 voltage reference

Post by adafruit_support_mike »

Ah.. the breakout is a slightly different situation. Everything above still applies, but the breakout has a 750-Ohm pull-up and a 10k load already connected to the output.

Assuming a 5V supply, the voltage across the 750R pull-up is 904mV and the current through it is a shade over 1.2mA.

409.6uA of that 1.2mA goes through the 10k load, and at least 45uA goes through the LM4040, leaving 745.4uA for additional load. The maximum load you can connect and still get 4.096V output is about 5.5k.

That isn't a limit of the LM4040 though. If you replace the 750R pull-up, or connect another resistor in parallel with it, you'll be able to connect more load resistance.

User avatar
alexdry
 
Posts: 16
Joined: Sun Aug 16, 2020 4:51 am

Re: How many pots can I write to an LM4040 voltage reference

Post by alexdry »

adafruit_support_mike wrote:Ah.. the breakout is a slightly different situation. Everything above still applies, but the breakout has a 750-Ohm pull-up and a 10k load already connected to the output.

Assuming a 5V supply, the voltage across the 750R pull-up is 904mV and the current through it is a shade over 1.2mA.

409.6uA of that 1.2mA goes through the 10k load, and at least 45uA goes through the LM4040, leaving 745.4uA for additional load. The maximum load you can connect and still get 4.096V output is about 5.5k.

That isn't a limit of the LM4040 though. If you replace the 750R pull-up, or connect another resistor in parallel with it, you'll be able to connect more load resistance.
That's probably a bit too much for me to grasp. Is there a specific circuit based on the LM4040 (not the breakout) you would recommend for a setup with a variable number of pots, from a couple up to about 100? It's about a modular project where the number of pots cannot be known beforehand.

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: How many pots can I write to an LM4040 voltage reference

Post by adafruit_support_mike »

There are a bunch of numbers, but it's mostly Ohm's Law (which I prefer to write as V/IR=1 because that makes it a little easier to derive specific variables: V=IR, V/I=R, V/R=I):

Getting 4.096V across a 10k resistor takes I=V/R=4.096/10e3=409.6e-6 Amps of current, or 409.6uA.

If you want 100 10k pots, each using 409.6e-6A of current, their total current will be 409.6e-4A, or since I'm an engineer and prefer exponents in multiples of 3, 40.96e-3A.. about 41mA.

If you have a 5V supply and want 4.096V output, you have 5-4.096=0.904V of headroom.

If you want a resistor that gives you 41mA when the voltage across it is 0.904V, its resistance will be R=V/I=0.904/41e-3= about 22 Ohms.

The LM4040 needs current to operate, and you want that value to be between 45uA and 15mA.

0.904V/22R=41.09mA, and we have 40.96mA going through the 100 10k pots, and the difference is 41.09mA-40.96mA=0.13mA or 130uA. That's between 45uA and 15mA, so in theory that should work.

Resistor values are never perfect though, and we have to deal with the tolerances. I'd rather see a few milliamps of current for the LM4040 to leave some wiggle room.

If we change the pull-up resistance to 20 Ohms, the current becomes 0.904V/20R=45.3e-3 or about 45mA. Subtracting 41mA for the 10k pots leaves about 4mA for the LM4040, which looks better.


You can go through the same basic process for any number of pots, but no single pull-up resistor will work for 1 pot and 100 pots. The difference in current (about 40mA) is too much for the LM4040 to handle.

User avatar
alexdry
 
Posts: 16
Joined: Sun Aug 16, 2020 4:51 am

Re: How many pots can I write to an LM4040 voltage reference

Post by alexdry »

Thanks a lot for the lesson! I really appreciate it!

User avatar
alexdry
 
Posts: 16
Joined: Sun Aug 16, 2020 4:51 am

Re: How many pots can I write to an LM4040 voltage reference

Post by alexdry »

Trying to get my head around it, I thought of constraining my setup to a variable number of pots between 1 and 32, which seems more reasonable than 1 and 100. If I get the info you provided correct, for 32 10K pots I calculated a resistor value of about 60ohms. Does this make any sense? If so, would that resistance be good for one pot as well?

For this project I need to use the 2.048V reference of LM4040 as a reference voltage for the ADS1115 in order to get a differential output. I guess the same formula should apply for this purpose too, but what sort of information should I be looking for in the ADS1115 datasheet to extract the value similar to the 409.6uA, which is the current each 10K pot is taking?

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: How many pots can I write to an LM4040 voltage reference

Post by adafruit_support_mike »

32 10k pots in parallel have a combined resistance of about 313 Ohms.

For a regulated voltage of 2.048V, the pots will use about 6.6mA.

If you’re using a 3.3V supply, the upstream resistor will have 3.3V - 2.048V = 1.252V across it.

If you put 1.252V across a 60 Ohm resistor, you get about 21mA through the resistor. Subtracting the 6.6mA for the 32 10k pots leaves about 14.4mA for the LM4040 to absorb.

The LM4040 can do that, but its upper limit is 15mA. You can’t remove too many 10k pots before hitting the 15mA limit.

A more effective approach is to figure the current for a single 10k pot with 2.048V across it: 204.8uA.

Then we set a couple ground rules: the LM4040 will always have at least 1mA flowing through it, but will never have more than 14mA flowing through it. Both of those numbers are comfortably inside the LM4040’s limits.

14mA - 1mA = 13mA, which means we never want more than 13mA flowing through a bunch of 10k pots in parallel.

13mA / 204.8uA = = 63.5. So the LM4040 can handle any number between 1 and 63 10k pots in parallel without breaking the ground rules.. there will always be at least 1mA through the LM4040, and there will never be more than 14mA through it.

Then we find the value for the resistor above the LM4040 by choosing the amount of voltage that will be across it.. 5V - 2.048V = 2.952V for a 5V supply, and 3.3V - 2.048V = 1.252V for a 3.3V supply.. and finding the resistor whose current will be 14mA at that voltage.

For a 5V supply, 2.952V / 14mA = 211 Ohms.

For a 3.3V supply, 1.252V / 14mA = 89 Ohms.

Then we do a reality check: you can get resistors in lots of values, but the values aren’t arbitrary. There’s a mathematical sequence where each value is a fixed multiple of the previous one. If each value is about 1.5X the previous one, you get what’s known as the E6 Series: 10, 15, 22, 33, 47, 68, 100, … If each value is 1.2X the previous one, we get the E12 Series: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82. If you look carefully, every other value of the E12 Series is a value from the E6 Series. Then every other value of the E24 Series is a member of the E12 Series, every other member of the E48 Series is a member of the E24 Series, and so on.

Collectively they’re known as the Preferred Numbers.

In general, you want to stick to values from the E12 Series unless you have a good reason to go to a higher series.

The nearest E12 value to 211 Ohms is 220 Ohms. If you put 2.952V across a 220 Ohm resistor, you get 13.4 mA. Taking 1mA out for the LM4040 leaves 12.4mA for the 10k pots, and 12.4mA / 204.8uA = 60.5. Instead of being able to put 63 10k pots in parallel, you can only have 60.. not a huge difference.

The nearest E12 value to 89 Ohms is 82 Ohms. If you put 1.252V across an 82 Ohm resistor you get 15.26mA.. a little too much for the LM4040 to handle, and about 1.25mA more than our 14mA ground rule.

We can work around that by saying 1.25mA / 204.8uA = 6.1, and adding another rule to say there must always be at least 6 10k pots in parallel with the LM4040, making the working range 6 to 69 pots.

We can also play it safe and go to the next E12 value above 82: 100. That will give us 12.52mA at 1.252V. Subtracting 1mA for the LM4040 leaves 11.52mA, which is enough for 11.52mA / 204.8uA = 56 10k pots.

We can also go up to the E24 Series and choose 91 Ohms. At 1.252V the current through a 91 Ohm resistor will be 13.8mA, which is about 200uA less that our 14mA target, and about the same as the current through a 10k pot. So instead of getting 1-to-63 pots, we get 1-to-62.
alexdry wrote:but what sort of information should I be looking for in the ADS1115 datasheet to extract the value similar to the 409.6uA, which is the current each 10K pot is taking?
That won’t be in the LM4040 datasheet.. it’s a value you calculate based on the LM4040’s regulated voltage and a resistor value you’ve chosen yourself.

The only trick in all this is to do the Ohm’s Law calculations enough to get comfortable with them, so you can think of a bunch of 10k pots in parallel as ‘so much current per pot, multiplied by the number of pots’.

The chain of reasoning always gives you two values, and makes you look for the third. There’s also some logic on the order of, “I don’t want more than 14mA here, so how do I create that limit?” And some of it is just familiarity.. a handful of common approaches like, “set an upper limt, take a certain amount for this piece, then figure out what to do with the rest” tend to show up over and over. Once you’ve gone through them a few times you’ll start to recognize the places to use them.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”