EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: jw on August 16, 2013, 12:06:55 am

Title: non linear voltage amplification
Post by: jw on August 16, 2013, 12:06:55 am
I need to amplify a set of voltages non linearly and have torn my hair out trying to design on op amp circuit to do it.

here's the voltage set
in 0.8v      need to make it 0.5v

more sampling should be done below 1 volt except that the amp meter I'm calibrating to won't read any lower

in 1v       need to make it 1v
in 1.43v  need to make it 2v
in 1.65v  need to make it 3v
in 1.85v  need to make it 4v
in 2.0v    need it make it 5v

since everyone is going to ask what I'm trying to do......

build a 5amp current meter

I've used a 10 amp ac1010 current transformer wrapped twice the loop for double sensitivity and a 200 ohm load resistor.

because I'm measuring complex ac waveforms I pipe the above to an ad637
now the dc output I'm getting form the ad637 is matching the non-linearity of the pickup coil and
I'm trying to correct for it and amplify it with some kind of non-linear amplification circuit.

any simple ideas?
thanks JW
Title: Re: non linear voltage amplification
Post by: JackOfVA on August 16, 2013, 12:54:10 am
If a digital solution is permitted, then a PIC microcontroller or the like, with A/D and D/A conversion. Read the input voltage, run it through whatever in/out algorithm you have created and then output the resultant voltage on the D/A.

If you have to have an analog solution, it's possible to synthesize a non-linear gain curve with an op amp and a feedback network with diodes and resistors--the diodes create breakpoints so that the gain changes with voltage.  Never built one but it's covered in older application notes - I know it's in an old Analog Devices book on op-amp applications in my collection, but I can't put my hands on it the moment.
Title: non linear voltage amplification
Post by: lgbeno on August 16, 2013, 12:54:30 am
Would an anitlog amplifier work?

http://www.electronics.dit.ie/staff/ypanarin/Lecture%20Notes/DT021-4/6LogAntiLogAmplifiers.pdf
Title: non linear voltage amplification
Post by: lgbeno on August 16, 2013, 12:57:02 am
I think your other option is just to scale it linear the best that you can the scale it in the digital domain, use a dac to go back to analog if needed.
Title: Re: non linear voltage amplification
Post by: fcb on August 16, 2013, 06:43:54 pm
You could certainly do it with a transistor/opamp based antilog amplifier, however you'll need to tweak it and you'll get thermal drift (unless you compensate).

I'd probably not bother and just add a couple of extra bits to the ADC you are using (as you don't state what resolution you need, it's possible you already have them spare) and use a LUT to linearise things.
Title: Re: non linear voltage amplification
Post by: JackOfVA on August 16, 2013, 07:17:19 pm
Attached schematic is a non-linear gain op-amp circuit with break points. This is from National Semiconductor's AN-31, which is a collection of schematics without explanation.  But, the schematic should be adequate to convey the theory. Depending on the signal level, the feedback network changes thereby changing the gain. This can give you a piecewise linear approximation to the gain curve you desire.

Title: Re: non linear voltage amplification
Post by: KJDS on August 16, 2013, 08:25:52 pm
The diode resistor feedback solutions usually have significant temperature drift. They often make better thermometers than their intended application..

ADC  --> PROM  --> DAC (if you need to get it back to analogue.
Title: Re: non linear voltage amplification
Post by: MasterOfNone on August 16, 2013, 10:04:31 pm
y=0.9x2.42 isn’t perfect but it’s the best your going to get from me. Sorry if that is no help whatsoever. 
Title: Re: non linear voltage amplification
Post by: TerminalJack505 on August 19, 2013, 12:37:52 am
Here's another piecewise method.  The simulator claims it is temperature compensated.  Use cheap shunt references or additional op amps to set the break-over voltages (V1 - V5.)

This schematic is based on your data.  Note that V2 is effectively disabled as it isn't necessary but included for completeness.
Title: Re: non linear voltage amplification
Post by: TerminalJack505 on August 20, 2013, 06:32:43 pm
It seems the OP has vanished without a trace so I'll leave this for anyone else interested...

I played around with my idea some more and came up with the attached circuit.  It has a couple of advantages over the one I posted earlier.  For one, the break-over voltages using this technique can be set with just resistor dividers.  Another advantage is the diode's non-constant Vf is factored-out.

OP6 is just converting the current flowing into node Is into a voltage.  The other op amps are just acting as precision rectifiers.

The source voltage's ground has to be connected to the virtual ground created by OP6.  If that isn't possible then some minor changes would have to be made.
Title: Re: non linear voltage amplification
Post by: jw on August 29, 2013, 11:48:41 pm
Thank you all for your help,  I have not vanished and have been studying Terminaljack505s work and others.  It appears Terminaljack that you thought those voltages I gave were AC, that's why in the first design you made that precision rectifier op amp circuit?.  Then until you posted the 2nd circuit I was unsure how to make the voltage references from the simulator batteries to that of the real world, I was trying pots.  Also I cannot fully implement the final stage of the second circuit because as you said the source voltage ground must be connected to the terminal voltages ground I cannot do that.  Also which simulator are you using, mine is an old copy of electronics workbench version 5 from college 15 years ago.

The ad637 chip I use converts complex waveforms into DC all those voltages I gave were DC from that chip and reflect the same readings I get from my fluke measuring ac off the pickup coil. 

I messed with antilog amplifiers before posting the question and after reading igbeno's excellent post tried some more of those but they only seemed to amplify the existing problem more the wrong way and in the end temperature would prove to be a big factor.  I also saw that design jackofva posted but could not grasp all the feedback circuitry.

If I took to long replying sorry it's just I put my foot in my mouth lots of times and like to look something over very close before replying.


Also the AtoD and back again is interesting I'm an Atmel fan am good with attiny2313 and 8515 but it looks like I need to break into atmega before I get any AtoD stuff.  Is there an atmega with 8 bit A to D and D to A so I can just use like a prom or mastereofnone's formula.  I need to be able to build a simple programmer for whatever chip you guys recommend since I'm always broke.
Title: Re: non linear voltage amplification
Post by: TerminalJack505 on August 30, 2013, 12:02:55 am
I simulated that with Tina-TI (http://Tina-TI).  It's free from Texas Instruments.

Quote
It appears Terminaljack that you thought those voltages I gave were AC, that's why in the first design you made that precision rectifier op amp circuit?

No, what the precision rectifiers are doing is keeping the resistor from being a factor until the break-over voltage is reached.

The circuit is based on a pattern* called "diode function generator."

*To borrow a software engineering term.
Title: Re: non linear voltage amplification
Post by: TerminalJack505 on August 30, 2013, 01:21:05 am
There are a couple of considerations to be aware of if you intend to use something similar to what I posted.  The circuit I posted is simply converting a current that is dependent on the input voltage into the output voltage.  The circuit adds an additional resistance into the path each time a break-over voltage is reached.  This means the current can only increase as the input voltage increases.

So, basically, 1) the output is monotonic.  And 2) the output's slope must either remain constant or increase as the input voltage increases.  This doesn't actually quite jive with your numbers.  If you were to try to fit a function to your numbers then the slope actually decreases at some point.  This may just be due to measurement error, however.

This video discusses the basics of diode function generators.

Lecture - 3 Diode Characteristics (https://www.youtube.com/watch?v=qEg3DrBe-3U#)
Title: Re: non linear voltage amplification
Post by: jw on August 30, 2013, 07:44:01 pm
Looks like that precision rectifier compensates for the voltage drop of all the diodes used in the next stage, but is that also part of the temperature compensation?

Can't I just remove all those doides and put in zeners close to the voltages I gave and also drop the first stage altogether thereby replacing all the batteries or voltage references?

.8v is close enough to .7 a normal voltage drop for a standard diode
1v not used
1.43 is close enough to a 1.4 volt zener
1.65 is close enough to 1.6 volt zener
1.85 is close enough to 1.8 volt zener
2v is a 2 volt zener
so d3 through d6 become zeners

see pic
Title: Re: non linear voltage amplification
Post by: TerminalJack505 on August 30, 2013, 08:09:18 pm
You can test your theory out by plugging it into the simulator.  The Tina-TI simulator will let you do a parameter sweep on the temperature so you can see if it is going to work over the range of temperatures you  require.  (Although, I'd be a little suspicious of what it tells you regarding temperature since it is relying on all of the models to implement temperature dependance.)

If it were me, I'd try to use the Mk II version rather than the first version.  It should definitely be temperature compensated.  And, like I said, you won't need to fool around with a bunch of voltage references.  All you have to do for that particular circuit is set the voltages with two high tolerance resistors--a voltage divider.  I didn't show this in the schematic since I didn't want to dick around with the necessary resistor values.  And it wasn't necessary to prove the concept.

If you use that circuit then you can use 2 jellybean quad op amp ICs and get 7 data points.