# Op-amp circuit....

Discussion in 'Electronic Design' started by FrozenOne, Jan 7, 2005.

1. ### FrozenOneGuest

I am looking to map voltages from one point to another, in a specific
maner. For example:

11.7 to 3.7
12. to 5
12.5 to 12

Can this be done with an op-amp circuit???

2. ### Tim WescottGuest

Yes. This is not a simple y = ax + b -- is that intentional? If so,
what relationship do you really want?

3. ### FrozenOneGuest

Yes it is intentionally a non-linear relationship. If I can get
something close to the above it would be great since it does not have
to be a perfect match as long as I am close.

4. ### Jim ThompsonGuest

Yes, provided the input/output relationship is monotonic.

Surf for piece-wise linear curve-fitting.

...Jim Thompson

5. ### Tim WescottGuest

-- or implement y = a2 * x^2 + a1 * x + a0. It all depends on what
you're after, really. If you only care about those three points and the
rest of your input range simply doesn't matter at all then you can do it
with a few comparators and resistors, and you won't have to mess around
with diodes or multipliers or any stuff like that.

You may also want to consider doing this with a microprocessor, DAC and
ADC. Depending on the precision you need and the complexity of the
curve you may come to a more economical solution that way. Without
knowing your exact requirements between these points I'd consider all
four possible solutions.

6. ### lasnakeGuest

if the relationship is monotonic, could you use a ADC, a lookup table
implemented by memory and a DAC for it?

7. ### gwhiteGuest

yeah, but you only gave spot points, a complete piecewise function would be
nicer.

8. ### Jim ThompsonGuest

See.....

Newsgroups: alt.binaries.schematics.electronic
Subject: Piece-Wise Linear Question (from S.E.D) - PWL-Example.pdf
Message-ID: <>

...Jim Thompson

9. ### Bob EldredGuest

Are there only three points or is it a continuum between 11.7 to 12.5?
Second, what is the precision? I see three significant figures, two
significant figures and one significant figure, which is it? Three
significant figures implies an accuracy and precision of 0.1% while one
significant figure can vary by 10%. This makes a big difference in how you
approach the problem and the precision of the resistors and non-linear
network required. There are also temperature and drift issues as well.

One poster mentioned using a microprocessor with ADC's and DAC's. It could
be a simple look up table to develop the relationship. Beyond that, can the
whole problem be done digitally without ever being in the analog, voltage
domain? That may be the best and simplest. In other words, where do the
voltages come from and how are the results used? It might be easier if those
were digital numbers and not voltages from the get go.

10. ### John LarkinGuest

What about using r-r opamps and letting some of them saturate to
define inflection points? Of course, that will have the same glitch
problems of most of the ideal-diode circuits.

I've done breakpoints with non-ideal (real) diodes to bend the curves,
with some other diodes for tempco. The knees aren't as sharp, but
there are no transient spikes.

John

11. ### Ken SmithGuest

Many "single supply" op-amps will swing very close to the (-) rail. If you
run the op-amp from +15 to +24 and ground, you can make an op-amp's output
stay at ground until you hit the knee in the transfer curve. A second
op-amp can combine the output of this op-amp with your original signal to
make a transfer function with an abrupt change in gains.

Op-amps like the LM324 come 4 to a package. You can make 3 knees in the
transfer function this way.

12. ### budgieGuest

Is this an expanded scale voltmeter for auto/bike use?

13. ### Fred BloggsGuest

Very nice idea.

14. ### Spehro PefhanyGuest

Some op-amps have sharper "knees" close to the negative rails than
others. I used this in a product about 20 years ago for thermocouple
linearization-- the CMOS op-amp I used was nice and sharp. The LMV824
is not so good. WIth the LM324 you may have to keep the current
through the output to a few tens of uA to keep it sharp (there's a
nominal 50uA pulldown internally).

Best regards,
Spehro Pefhany

15. ### Rich GriseGuest

Speaking of PICs, how would one go about selecting one from, say, this
search:
http://www.microchip.com/ParamChartSearch/params.aspx?branchID=1091&mid=10&lang=en&pageId=74

Thanks,
Rich

16. ### FrozenOneGuest

Okay so to answer some of the questions:

1) The voltage has to be continuous between the points; I am not just
looking for those points
2) Precision has to be close, but not exact
3) Do not want to implement digital method
4) I am making the circuit to control the response of an RF attenuator
that I am using to improve on an older system, and as you can see
Analog stuff is not my strong point. The Existing system can change
the output by 6dB by varying the control from 11.7-12.5 volts. These
numbers cannot change. I am attempting to implement a COTS attenuator
to do the same function, but I need to map the existing control voltage
to the COTS attenuator voltages. I hope this makes sense.

I am thinking the PWL approach might be a good way to solve my problem

17. ### Ken SmithGuest

Between the points given, what do you have to be close to?

As I suggested elsewhere, a quad op-amp can give you 3 knees in the curve.
That would be a 5 point PWL curve. This was based on the idea that the
sense of all of the knees were the same way. If the slope does not
monotonically increase, you can get extra knees by using rail to rail
op-amps and having them hit each rail.

You can also fit to curves using X^N sort of functions implemented with
analog multipliers. There are several analog multipliers on the market
and some parts like the LT1228 and some AGCed IF stages that will serve as
multipliers. If you can't stand PWL methods erros, maybe combining PWL
with some non-linear function such as X^2 will do it for you.

18. ### AndyGuest

The slope looks increasing. If you have only 3 reference points, maybe a
an exponential amplifier could suffice?

(Cf. http://www.national.com/an/AN/AN-311.pdf , figure 2.)

19. ### Guest

12.08X² -282X +1649.5

20. ### Jim ThompsonGuest

Did everyone miss my piece-wise linear post....

Newsgroups: alt.binaries.schematics.electronic
Subject: Piece-Wise Linear Question (from S.E.D) - PWL-Example.pdf
Message-ID: <>

...Jim Thompson