Cute dpot hack for increased resolution

So I'm doing a simplified version of the differential laser noise canceller, which in the spherical cow universe looks like it does very well out to about 10 MHz, thanks to the amazing properties of BFP640s and some new photodiodes with reduced series resistance. (At least according to Hamamatsu.)

One thing I need for this is an adjustable resistance with good bandwidth. The fastest dpot I can find is the AD5273BRJZ1 (1k, 64 steps, ~6 MHz bandwidth at half scale).

The resolution is too coarse for my application, but as it's pretty well set-and-forget, I don't mind some algorithmic complexity.

Turns out that if you make a sort of Darlington connection, with one dpot connected as a rheostat in series with the wiper of the other (which is connected to one end), you can get the approximate resolution of a 10-11 bit dpot.

1k 0-*----R1R1R1---------------0 | A | *-------*-----* | | | | V | 5k *------------R2R2R2--*

It works best if R2 is about 5 times R1, but the bandwidth may be better if I stick with the 1k version.

Neglecting switch resistance, calculating the total resistance as a function of the codes, sorting into a single 1-D array to get a monotonically increasing resistance function, and taking the first finite difference reveals a step size nearly always less than 0.1% except near the low-resistance end, which I don't care much about.

There's a plot at

Fun.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs
Loading thread data ...

Looks like an interesting graph, but I don't see any error bars. Won't the limitations of accuracy of the 6 bit dpots swamp out your monotonicity?

--
  Rick C. 

  - Get 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Ricketty C

Fun.

I'm not expecting it to be monotonic, for sure. The codes are completely scrambled, so just finding them is an issue. I'd expect the main effect of the DNL of the dpots will be to scramble them differently without making huge changes in the general outline of the plot. (The sort order will change, certainly.)

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs

I think my point is more that a 64 step pot is only going to have an accuracy close to that, so that won't go away by adding resolution. Or is resolution all you are looking for?

I guess I'm not following what this gains? You get lots more steps, but you don't know any more about where they are. What am I missing?

--
  Rick C. 

  + Get 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Ricketty C

y

racy close to that, so that won't go away by adding resolution. Or is reso lution all you are looking for?

Clearly.

you don't know any more about where they are. What am I missing?

The steps that correspond to the coarse digital pot changing are going to b e gross, but tolerably well defined.

The trick is to use the fine digital pot to move the final output over a ra nge which is larger than the biggest single change caused by a one bit chan ge in the input to the coarse pot, so that you can be sure that you have o ver-lapping ranges of fine adjustment.

What Phil seems to be talking about doing is mapping all the possible outpu ts for any particular example of the circuit and setting up a look-up table of a monotonic string of desired outputs, and the inputs to the coarse and fine digital pots that get them.

It is an open question whether the outputs are going to be stable enough to let this work.

A twiddling program that knew when it was getting close to running out of r ange on the fine digital pot, and started over from scratch after changing input to the coarse pot might be another possibility, but it does rather de pend on what Phil is actually doing. It wouldn't fit neatly into a simple c ontrol loop.

--
Bill Sloman, Sydney
Reply to
Bill Sloman

y

he

tly

curacy close to that, so that won't go away by adding resolution. Or is re solution all you are looking for?

t you don't know any more about where they are. What am I missing?

be gross, but tolerably well defined.

range which is larger than the biggest single change caused by a one bit ch ange in the input to the coarse pot, so that you can be sure that you have over-lapping ranges of fine adjustment.

puts for any particular example of the circuit and setting up a look-up tab le of a monotonic string of desired outputs, and the inputs to the coarse a nd fine digital pots that get them.

to let this work.

range on the fine digital pot, and started over from scratch after changin g input to the coarse pot might be another possibility, but it does rather depend on what Phil is actually doing. It wouldn't fit neatly into a simple control loop.

For any use of this combination to be useful, there has to be a way of maki ng changes to the combinations that map to a set of points with better erro r than what a single pot achieves. Unless the error of the pots at their d efined values is significantly better than would be expected by the 64 step resolution that won't happen.

Consider the case you describe. The coarse pot is at a setting and the fin e pot reaches the end of it's range. To move to a new coarse setting the u ser/program/magic agent must know which coarse setting to switch to and wha t fine setting will go with that coarse setting to continue a forward adjus tment. If the coarse device has a differential non-linearity that is not m uch better than expected for a 64 step pot, this won't be possible.

It's no different than the problems of combining flash converters to obtain more resolution. One converter measures the coarse bits and the other mea sures the fine bits. But both must be accurate to the same level to be abl e to combine them. There may be fancy techniques used in the flash convert er situation, but they are not in play in Phil's pot setup.

He might be able to get a little more resolution, but I don't see how it wi ll be much unless the pots are very much under specified.

--
  Rick C. 

  -- Get 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Ricketty C

:
e
s

of

64

tty

te

|
e
s
a

st

1%

t.

ur

the

ently

he

accuracy close to that, so that won't go away by adding resolution. Or is resolution all you are looking for?

but you don't know any more about where they are. What am I missing?

to be gross, but tolerably well defined.

a range which is larger than the biggest single change caused by a one bit change in the input to the coarse pot, so that you can be sure that you ha ve over-lapping ranges of fine adjustment.

utputs for any particular example of the circuit and setting up a look-up t able of a monotonic string of desired outputs, and the inputs to the coarse and fine digital pots that get them.

h to let this work.

of range on the fine digital pot, and started over from scratch after chang ing input to the coarse pot might be another possibility, but it does rathe r depend on what Phil is actually doing. It wouldn't fit neatly into a simp le control loop.

king changes to the combinations that map to a set of points with better er ror than what a single pot achieves.

No. All you need is piece-wise monotonicity, and a control procedure that c an deal with the coarse steps between the monotonic pieces.

ter than would be expected by the 64 step resolution that won't happen.

Wrong.

ine pot reaches the end of it's range. To move to a new coarse setting the user/program/magic agent must know which coarse setting to switch to and w hat fine setting will go with that coarse setting to continue a forward adj ustment. If the coarse device has a differential non-linearity that is not much better than expected for a 64 step pot, this won't be possible.

All it needs to know is whether it needs the next coarse step to be the nex t one up or the next one down.

It won't know how far it has moved, but it should be able to work out - onc e it has moved - whether it needs to make fine steps up or down to get clos er to where it needs to be.

in more resolution.

Not correct. All Phil needs is fine adjustment to let him eventually get cl ose enough to where he needs to be. He doesn't care where that actually is

- just that he can eventually get there.

ts. But both must be accurate to the same level to be able to combine them .

Been there, looked at that.

they are not in play in Phil's pot setup.

will be much unless the pots are very much under specified.

You are missing the distinction between resolution and granularity.

He needs to get close enough to the right place (granularity), but he doesn 't need to know exactly where it is (resolution).

--
Bill Sloman, Sydney
Reply to
Bill Sloman

Reminds me of using convergents for improving the resolution of PWMDAC.

For example, allowing the PWM counter's divisor to vary from 2^N - 1 to

2^(N-1), improves the average error by several bits.

A long time ago, I computed, what was it, let me see, I think it was for a

12-bit PWM register (max divisor 8000), when fitting to a 16-bit fractional input (1/65536th per unit), the RMS error was equivalent to a 20 bit counter -- that is, most outputs conform, within about 1/16th of an LSB, to the requested value. (Not that a full and continuous 20 bit equivalent output is necessarily available!)

However, this was sampled over a subset of the total range (fractions 39000 to 43000). Over the whole range, there are of course unlucky codes (near small rational numbers, and especially near 0 and 1) where the error falls back to basic 12-bit accuracy. For example, you simply can't have any more resolution than 1/4000th, 1/6000th, 1/8000th, etc., as the desired fraction goes towards zero. But your only choices are 0 or 1/8000th for these parameters and you have to pick one.

The frequency range doesn't have to be restricted to an octave, of course, but we can always upscale the numerator with simple shifts, and that keeps the ripple, and error due to transitions, more stable.

Big downside: I'm not entirely sure how you'd match such an output to a signal of fixed sample rate...

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Design 
 Click to see the full signature
Reply to
Tim Williams

te:

ise

oes

s of

e.

d

, 64

retty

th

he

mate

-* |

be

as

t a

irst

0.1%

out.

.

your

ct the

erently

(The

n accuracy close to that, so that won't go away by adding resolution. Or i s resolution all you are looking for?

, but you don't know any more about where they are. What am I missing?

g to be gross, but tolerably well defined.

r a range which is larger than the biggest single change caused by a one bi t change in the input to the coarse pot, so that you can be sure that you have over-lapping ranges of fine adjustment.

outputs for any particular example of the circuit and setting up a look-up table of a monotonic string of desired outputs, and the inputs to the coar se and fine digital pots that get them.

ugh to let this work.

t of range on the fine digital pot, and started over from scratch after cha nging input to the coarse pot might be another possibility, but it does rat her depend on what Phil is actually doing. It wouldn't fit neatly into a si mple control loop.

making changes to the combinations that map to a set of points with better error than what a single pot achieves.

can deal with the coarse steps between the monotonic pieces.

If by "piece-wise monotonicity" you mean you need to pick your steps, you h ave no way to do that. Because you don't know where the thresholds are for the coarse pot, you have no idea what to set the fine pot to.

If you think this can be done, you need to explain in detail how to do it. Are you talking about calibrating each part separately?

etter than would be expected by the 64 step resolution that won't happen.

fine pot reaches the end of it's range. To move to a new coarse setting t he user/program/magic agent must know which coarse setting to switch to and what fine setting will go with that coarse setting to continue a forward a djustment. If the coarse device has a differential non-linearity that is n ot much better than expected for a 64 step pot, this won't be possible.

ext one up or the next one down.

Wrong. Unlike you I explain my thinking. The problem is not setting the c oarse pot, it's knowing when to change it and what to set the fine pot to s o as to match the coarse pot. If the error in the coarse pot is large ther e is no way to know where to set the fine pot when you change the coarse po t.

Coarse step of 1/64th of the range, nominally, can be 1/128th of the range or 3/128ths of the range or some such values as determined by the spec shee t. The relatively large error makes it impossible to know where to set the fine pot. It's that simple.

nce it has moved - whether it needs to make fine steps up or down to get cl oser to where it needs to be.

You mean make the coarse step and let your controller algorithm search for the right fine setting??? That means in the mean time the system is out of adjustment which is the point of using the fine adjustment.

So that idea is a fail.

tain more resolution.

close enough to where he needs to be. He doesn't care where that actually i s - just that he can eventually get there.

Eventually? So this is not a real time control loop trying to maintain som e parameter? This is just some setting he wishes to set once and forget?

bits. But both must be accurate to the same level to be able to combine th em.

ut they are not in play in Phil's pot setup.

t will be much unless the pots are very much under specified.

sn't need to know exactly where it is (resolution).

I think you need to check the dictionary. lol

--
  Rick C. 

  -+ Get 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Ricketty C

:

rote:

noise

does

ies of

nce.

ood

1k, 64 steps, ~6 MHz bandwidth at half scale).

pretty well set-and-forget, I don't mind some algorithmic complexity.

with one dpot connected as a rheostat in series with the wiper of the other (which is connected to one end), you can get the approximate resolution of a 10-11 bit dpot.

---* | | | | V | 5k *------------R2R2R2--*

ay be

ce as a function of the codes, sorting into a single 1-D array to get a mo notonically increasing resistance function, and taking the first finite difference reveals a step size nearly always less than 0.1% except near the low-resistance end, which I don't care much about.

rs. Won't the limitations of accuracy of the 6 bit dpots swamp out you monotoni city?

completely scrambled, so just finding them is an issue. I'd expect the ma in effect of the DNL of the dpots will be to scramble them differently with out making huge changes in the general outline of the plot. (The sort orde r will change, certainly.)

an accuracy close to that, so that won't go away by adding resolution. Or is resolution all you are looking for?

ps, but you don't know any more about where they are. What am I missing?

ing to be gross, but tolerably well defined.

ver a range which is larger than the biggest single change caused by a one bit change in the input to the coarse pot, so that you can be sure that yo u have over-lapping ranges of fine adjustment.

le outputs for any particular example of the circuit and setting up a look- up table of a monotonic string of desired outputs, and the inputs to the co arse and fine digital pots that get them.

nough to let this work.

out of range on the fine digital pot, and started over from scratch after c hanging input to the coarse pot might be another possibility, but it does r ather depend on what Phil is actually doing. It wouldn't fit neatly into a simple control loop.

f making changes to the combinations that map to a set of points with bette r error than what a single pot achieves.

at can deal with the coarse steps between the monotonic pieces.

have no way to do that. Because you don't know where the thresholds are f or the coarse pot, you have no idea what to set the fine pot to.

You know when you are changing the inputs to the coarse pot, and when you a re changing the inputs to the fine pot.

. Are you talking about calibrating each part separately?

Doesn't seem to be necessary. You use the coarse pot to get roughly where y ou want to be, and use the fine pot to get closer to where you want to be.

better than would be expected by the 64 step resolution that won't happen.

fine pot reaches the end of it's range. To move to a new coarse setting t he user/program/magic agent must know which coarse setting to switch to.

The next one, up or down (depending on which end of the fine range you hit) .

rward adjustment.

You do have to work out in which direction you need to go with the fine po t (which will have been set back to mid-range when you changed the coarse p ot) but that shouldn't be difficult.

better than expected for a 64 step pot, this won't be possible.

Basically you are starting the fine tuning procedure over again from scratc h, so it's going to be perfectly possible to improve

next one up or the next one down.

coarse pot, it's knowing when to change it and what to set the fine pot to so as to match the coarse pot.

You don't have to set the fine pot to "match the coarse pot". You've just w orked out that fine pot can't move you as far as you need to go, so you cha nge the coarse pot to give you a new starting point, and start over with th e fine pot.

set the fine pot when you change the coarse pot.

You aren't going to get back to where you were after you change the coarse pot - that's obvious - so you are starting the search again, hopefully from a more promising starting point.

e or 3/128ths of the range or some such values as determined by the spec sh eet. The relatively large error makes it impossible to know where to set t he fine pot. It's that simple.

But perfectly irrelevant.

once it has moved - whether it needs to make fine steps up or down to get closer to where it needs to be.

r the right fine setting??? That means in the mean time the system is out of adjustment which is the point of using the fine adjustment.

Actually, it isn't. The system is out of adjustment until you get it set "c lose enough" to the desired operating point.

A coarse search - fine search - strategy isn't as quick as a proportional i ntegral linear trajectory, but it will get you there eventually.

Measured against a criterion you've just invented.

obtain more resolution.

t close enough to where he needs to be. He doesn't care where that actually is - just that he can eventually get there.

ome parameter? This is just some setting he wishes to set once and forget?

Presumably. Once it is "there" - where ever that is - it might be monitored to see if a tweak to fine pot might get it closer to where it ought to be, or you might have an analog control loop for that. I did that once, but th e user just turned it off rather than letting me tune it to get it stable.

e bits. But both must be accurate to the same level to be able to combine them.

but they are not in play in Phil's pot setup.

it will be much unless the pots are very much under specified.

oesn't need to know exactly where it is (resolution).

Regular dictionaries aren't much help in with the technical vocabulary in s pecialist areas, but, here's one definition of "granularity"

technical - the scale or level of detail in a set of data. "the bill data doesn't provide sufficient granularity to answer the questio ns"

--
Bill Sloman, Sydney
Reply to
Bill Sloman

Hi Tim

I did not get your meaning about this:

For example, allowing the PWM counter's divisor to vary from 2^N - 1 to

2^(N-1), improves the average error by several bits.

Is it a delta sigma around the LSB or do you have a link that explains it?

Reply to
klaus.kragelund

fredag den 24. juli 2020 kl. 00.24.45 UTC+2 skrev snipped-for-privacy@gmail.com:

as I understood it, changing the counter max value

so you can do a duty cycle of for example; n/8000 instead instead of n/8191

Reply to
Lasse Langwadt Christensen

Thanks, Lasse ?

Reply to
klaus.kragelund

This kind of thing has been around forever. Fig 6 shows a 6-bit to 12-bit enhancement.

formatting link

Reply to
bloggs.fredbloggs.fred

Sure, there are lots of approaches. The one I described is new to me, and isn't in the app note you cite. Its main disadvantage is that finding the right setting is relatively complicated, but on the plus side it gets you almost 2N bits' resolution and is essentially immune to moderate DNL in the dpots.

The combination of settability and bandwidth exceeds anything available in a single device. That's pretty important to me, because the besetting sin of dpots and MDACs is that they're dog slow.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs

Use a multiplier!

I think there are a few fast MDACs too.

You could have fun combining a few digitally controlled RF attenuator chips.

--
John Larkin         Highland Technology, Inc 

Science teaches us to doubt. 
 Click to see the full signature
Reply to
jlarkin

The problem with multipliers is that they're ~40 dB noisier as well as

20dB more expensive, and their accuracy is only ~1% or thereabouts. Maybe if I knew more about them I could work around that. I'll look at the AD offerings again though.

I'd be super interested in finding them. 6 MHz @ -3dB is the champ AFAIK. Eight or nine bits would be good enough, with a bit of fixing up.

I can probably do better using metal film resistors and TMUX1511 quad SPSTs. I have a couple of VCA products that do that, but at higher resolution it's not that easy to do.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs

The AD5426 series is 10 MHz. Sort of. I recall some faster ones somewhere maybe.

If you don't need gain monotonicity, you could do cheap things with analog switches and resistors.

--
John Larkin         Highland Technology, Inc 

Science teaches us to doubt. 
 Click to see the full signature
Reply to
jlarkin

The AD734 offers 0.1%

formatting link

but it is hideously expensive. Element-14 has 177 in stock globally, but they want $A60 each for small quantities. Digikey has more for $35.26, and also stocks the higher accuracy B grade fro $58.29. I've got a couple.

Good idea,

--
Bill Sloman, Sydney
Reply to
Bill Sloman

y

ell

on

ter

bit enhancement.

I wonder if an R-2R ladder can be used for this with a handful of analog sw itches. I would do the math, but I'm not in the mood at the moment. It wo uld be a fun exercise to work out a spread sheet to calculate results... bu t still not enough energy to do it tonight.

Someone refresh my memory, does he need an actual three terminal pot or jus t a variable resistance?

--
  Rick C. 

  ++ Get 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Ricketty C

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.