how to optimize for multistage gain selection

I'm trying to design a two stage amplifier for a sensor readout and I would like those stages to be configurable, but I also need to have the overall gain vs. configuration curve to be such that every new step is ~5% increase w.r.t. the previous.

So let's say I have 3 control bits on the first amplifier and 4 for the second, how would I design the set of values those gains need to be at? Is there an algorithm to do that?

I'm currently guesstimating it, but I doubt there's no formal method to do so. Any pointer/comment is appreciated.

Reply to
al.basili
Loading thread data ...

Surely the gains you need depend on your input & required output. And presumably max total gain matches your lowest possible input, min gain matches your max input.

Ad if each gain change gives 5% total gain change, then each gain setting will be 5% different from its neighbour.

So... what are you actually asking?

NT

Reply to
tabbypurr

If you want gain changes to be in 5% steps, pick one amplifier to have the 5% gain steps. Then the other amplifier will have steps of 5% * 2^n where n is the number of control bits in the amplifier with 5% steps.

The gain controls will have the control bits for the 5% stepped amplifier as the lsbs and the control bits for the other amplifier will be the msbs in a single control word.

Is that what you are asking about?

--
  Rick C. 

  - Get a 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
gnuarm.deletethisbit

I might have slightly missed what you meant. If the digital bits controlling gain have a degree of intelligence, one of the amps needn't have 5% gain changes. If amp stage A has 3 bits with each step being 5%, that's 8 settings giving gain from n to n x 1.05^7 = n x 1.41. So amp stage B could have gain increments of 1.05^8 = 1.477 or 47.7% change. And if it is controlled by 4 bits that gives B a possible gain range of 1.477^15 = 347. That gives your amp a gain range of 1 to 1.41x347= 489 times its minimum gain.

NT

Reply to
tabbypurr

You don't give max and min gain specs, only that you want 5% steps. I suggest making both stages increment in 5% steps for a total gain range of 1 to 1.015^(2^7) or 1 to 515. However, I don't suggest counting one stage up from zero to max, then setting it back to zero and incrementing the other stage gain by one since that big gain jump in the first stage will need extra settling time and may cause a click or other distortion. Instead, increment one stage by one, then the other stage by one, then the first stage by one, etc. Kind of like a gray code, that minimizes the maximum gain change for a single step. I wonder if you could interleave the bits like this: 2(4) 1(3) 2(3) 1(2) 2(2) 1(1) 2(1) where 1 and 2 are the 3 and 4 bit control words for the two amps, and (n) is the nth bit, then just treat it like a seven bit word and add and subtract as needed. I'll leave it as an exercise for the reader as to whether that actually works or not, Jeopardy is coming on and I want to watch James Holzhauer :-).

--
Regards, 
Carl Ijames
Reply to
Carl

5%!? That seems tiny.

Opamps have a GBW product that is ~constant. more Gain, less BandWidth. One has to know all the parameters to try and design an amp.

Are you using opamps? Have you read AoE3? there are other good opamp books.

George H.

Reply to
George Herold

Gain is easy; stepped attenuation is easy. Stepped gain is usually a bad idea because it either changes the input impedance or lengthens and adds reactance to the feedback path.

Use fixed gain and stepped attenuation.

Reply to
Clifford Heath

So use a multiplying DA chip to program gain or attenuation.

Reply to
Sjouke Burry

If low noise is a requirement, and in the case of a sensor readout it sounds like it is, then you have to think carefully about how you do your post-gain attenuation - no sense in using a quiet amplifier and input circuit design if you're just going to throw away your SNR in a noisy attenuator.

At a minimum you'd probably want a low impedance attenuation so you don't add self-noise from the attenuator but if the application is low power that can also kill the power budget.

depending on specifics of application we don't know I think it's a toss up as to whether stepped gain or stepped attenuation will be easier. a rule of thumb of low noise measurements is DONT throw away gain cavalierly once you've worked hard to bring a small signal up quietly, that shit is precious.

Reply to
bitrex

Express the gains that you want in decibels, dB.

5.925% gain steps would be 0.5dB, a nice round number in dB. Or you could pick a nice round percentage number and work out what dB steps that corresponds to.

e.g., you could have 3 bits giving 0...7 * 0.5dB for one stage,

0.5dB, 1dB, 1.5dB, 2dB...3.5dB Then the second stage can give you 0...15 * 4dB for example.

You can generate 6.02dB steps with a R:2R ladder in the feedback path of an op-amp: drive the ladder network from the output of the op-amp and just pick off the voltage on one stage with a multiplexer and feed that to the inverting input of the amplifier.

You can similarly generate nice 0.5dB steps with a R:75R ladder iirc., and R-75R could also be made with R/5:15R, with unit resistors - that is nice on a chip because unit resistors match well. For discrete resistors just buy the values you want.

You need to terminate the resistive ladders correctly. After doing the maths you can check if the values are right using LTSpice.

Or, just buy a programmable gain amplifier chip, with the above inside it.

Reply to
Chris Jones

The noise figure of the second amp in a chain is divided by the gain of the first amp in the chain, so assuming 0000000 is unity gain of the cascade, or some fixed total minimum gain, and 1111111 is max you can narrow down your choices by when you need 3 control bits or less worth of gain compared to that there's no sense for the second amp in the chain to be anything but the buffer.

it's not the first amp in the cascade that's just going to sit there with minimum or unity gain doing f*ck all and let the second just amplify its noise!

Reply to
bitrex

If you are working with alternating signals, tapped inductors can be rather nicer dividers than resistor strings.

Properly wound ratio transformers give stable divide ratio to one part in 10^7, the resistive component (and the cosnequent Johnson noise) can be low, and - if the inductance is high enough - they don't have to consume much power.

Getting them wound is a pain - John Larkin (for instance)avoids purpose wound components like the plague - but for tricky jobs it could be worth the trouble.

Absolutely.

--
Bill Sloman, Sydney
Reply to
bill.sloman

snipped-for-privacy@gmail.com wrote in news: snipped-for-privacy@googlegroups.com:

school coursework question?

Reply to
DecadentLinuxUserNumeroUno

+1 ! m
Reply to
makolber

Easy. 3 bits of 5% each is 1.05^1, 1.05^2 and 1.05^3 gain per position. Put those on the first, I suppose. (It doesn't matter which amp gets the LSBs and HSBs, but for noise purposes it is desirable to have at least a modest amount of gain in the first amp, and to use a lower noise amp or architecture there.) Put the rest (1.05^4, etc.) on the other.

If BW per stage is poor, consider even using one more stage, or optimizing the GBW of the two stages and using an attenuator to reach the lowest steps (in which case you'll use steps of 1.05^-1 and so on to undo the base gain, which equals the total attenuation).

Alternately, get a log amp that's analog or digitally controlled; these normally have a generous tempco, but it may be reasonable to compensate that.

Tim

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

I think it makes more sense from a noise perspective to have the first amp have a stage that makes it so the 0b0000001 word ends up with 1.05 total cascade gain.

And then interleave the gains somehow basically so you don't end up with the situation where you have say 0b10000001 and only have 5% gain in the first stage and all the rest in the second. Should be the other way around, the first stage should be the "coarse" control and the second the "fine tune" IMO

Reply to
bitrex

ets

e

her.

o

So what happens when the coarse control is set to minimum gain?

The reality is the OP has not come back to discuss his homework. The profe ssor didn't indicate enough of the problem to bother with considering the n eed to minimize noise.

--
  Rick C. 

  - Get a 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
gnuarm.deletethisbit

idk, what would be wrong with that? why not have the bits of the first amp have a geometric control law starting from 5% gain and the second have a linear starting from unity gain. like maybe 5%, 10%, 20%, 40% in the first and 0%, 5%, 10%, 15%, in the second

there's no rule that I saw that a certain group of bits of a given binary word must map to the control input of a particular amp just that the cascade gain rises in 5% increments as it goes 0b0000001, 0b0000010,

0b0000011...and with the geometric-linear control laws you can find some mapping that gives 5% increase with each step such that the first stage is doing the bulk of the gain.

There are a lot of ways you could do what's requested, even wrt noise but it sounds like the end result is a silly circuit that's hard to find much real-world use for. why does the first amp have to have 3 bits and the second four other than that's some contrived constraint

Reply to
bitrex

maybe being controlled from serial bytes or a single 8 bit port or something.

Reply to
bitrex

n.

gets

ise

other.

to

se

te

th

he

rofessor didn't indicate enough of the problem to bother with considering t he need to minimize noise.

"the first stage should be the "coarse" control "

Not sure what all you are going on about. The point is that regardless of which you put first, it will have some lowest setting that means you get th e maximum noise through it. Designing the first amp so it has the coarse s ettings don't alter that issue.

One way to get around this is to give the first amp some minimum level of g ain and design the second stage so it has either gain or attenuation as req uired.

But... none of this can really be optimized until you have an idea of what gain values are required. It may be that the minimum gain setting already digs the signal out of the noise as much as practical. The level of contro l requested was a range of nearly 500:1. Since this is going into a displa y you would think the result needs to be in a range that can be digitized w ithout much trouble, so call it 5 volts. Then the minimum full scale signa l would be 10 mV. I don't think that needs so much concern with noise in t he electronics. Standard attention to detail should suffice. No need for heroics I think.

BTW, the OP never said the first amp had to have 3 bits. It was a talking point... "So let's say I have 3 control bits on the first amplifier and 4 f or the second"

--
  Rick C. 

  + Get a 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
gnuarm.deletethisbit

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.