Non-Linear amplifying of a LM358
StefanL38
Posts: 2,292
Hello,
I would like to amplify a voltage 0-35 mV with a factor of 100.
For a first test I took a LM358 because I had no other OpAmps handy.
I'm using the standard non-inverting amplifyer-circuit
like shown f.e. here
Then I adjusted the feedback-resistance (around 1 MOhm, R1 10kOhm) that an inputvoltage of 35mV resulted in an outputvoltage of 3.5V.
So that the amplifying-factor is 100
Even if I supplied the LM358 with +-6V the amplifying factor goes down from 100 to 70 for lower voltages.
Remark through supplying the OpAmp LM358 symmetrical with -6V at PIN4
and +6V at PIN 8 the voltage on the input is way of the lower rail.
Still the amplifying-factor is not constant.
Is this common for the OpAmp LM358?
If yes which OpAmp would you recommend for this use?
Would a rail-to-rail-OpAmp like the OPA 347 deliver better results?
Any help to get this thing linear is greatly appreciated
Thanks in advance
Stefan
I would like to amplify a voltage 0-35 mV with a factor of 100.
For a first test I took a LM358 because I had no other OpAmps handy.
I'm using the standard non-inverting amplifyer-circuit
like shown f.e. here
Then I adjusted the feedback-resistance (around 1 MOhm, R1 10kOhm) that an inputvoltage of 35mV resulted in an outputvoltage of 3.5V.
So that the amplifying-factor is 100
Even if I supplied the LM358 with +-6V the amplifying factor goes down from 100 to 70 for lower voltages.
Remark through supplying the OpAmp LM358 symmetrical with -6V at PIN4
and +6V at PIN 8 the voltage on the input is way of the lower rail.
Still the amplifying-factor is not constant.
Is this common for the OpAmp LM358?
If yes which OpAmp would you recommend for this use?
Would a rail-to-rail-OpAmp like the OPA 347 deliver better results?
Any help to get this thing linear is greatly appreciated
Thanks in advance
Stefan
Comments
A one Meg could produce an offset as big as your signal. The bias current is 100na max.
Are you inputing 35mv dc or a peak to peak 35mv. These amps do not get closer than 2 to 3 volts of the supply rail. 35mv x 100 is 3.5 volts and you would be getting close with a 6 volt rail.
If you are saying you see gain error when you input a dc signal between 0 and 35mv then I would say it is the op offset voltage and offset produced by the bias current flowing thru the resistors adding and subtracting from you signal.
Try a gain of 10 with 9k to 1k and then you make two the part is a dual and get a gain of 100 (10x10)
Tom
thank you very much for your help.
So the example-circuits from the datasheet are to use with care
and have to be tested by me again if they are working good or not.
OK with a gain-factor of 10 the result is better and I understand the
offset-voltage problem. Still through the offsetvoltage of 2mV the
amplifying is not linear yet. I remember dark that some OpAmps have a
offsetvoltage-compensation. Which type of OpAmp would you recommend
if I want to have an adjustable offsetvoltage-compensation.
I know 2mV is already very low. And if I have adjusted my circuit at 20°C
to offsetvoltage 0,0mV. At 32°C it will have some offset-voltage again
but that's ok for me.
best regards
Stefan
Are you inputing dc values and measuring the output with a voltmeter?
with a gain of 10 the linearity is better but because of the offsetvoltage
there is still an error.
Examples:
3mV results in 20 mV (instead of 30 mV)
40 mV results in 390 (instead of 400 mV) etc.
As far as I understand OpAmps know this is because of the offsetvoltage.
I found explanations and a circuit how to compensate the offsetvoltage
which requires a dualsupply or a "virtual ground"
(through a "supplyvoltage-halfing-circuit")
The whole thing is for measuring current and voltage of a LiPo-accu-charger
I want to measure the current at the output of the LiPo-charger
as this charger has also to measure the accu-voltage the error through the voltagedrop across the current-sensing-resistor has to be really small.
So I'm using 0,1 Ohm.
The accu-voltage (up to 4.2V and the current-voltage is feeded into a
MCP3208 ADC which is connected to the propeller-chip for storing current
and voltage-values over time.
So it is not a DMM that is measuring the voltages.
best regards
Stefan
the ADC is working properly. I checked this with two different DMMs.
Sorry for not saying that before. I'm still in the stage of testing the amplifyer. As a single component.
So I have a adjustable voltage-divider connected to a voltage-follower
to create the 0-35mV. And I'm measuring the voltages with two different DMMs. With the same results. From that I'm pretty sure that the measuring itself is correct.
best regards
Stefan
-Phil
thanks for your idea. If it takes not too much effort for you.
Can you provide a circuit (even hand-drawn would be enough) and some more explanation how this works?
best regards
Stefan
The output voltage may be negative w.r.t. ground, depending on the direction of the offset, so you will have to deal with that. Also, you may still need to calibrate for gain (i.e. the slope of the V/I curve).
One advantage to using a micro in a device like this is that each unit could be calibrated post-manufacture, with the calibration data stored in flash or EEPROM.
-Phil
I thought I'm quite good in understanding electronic circuits but here I'm not sure.
Read zero is connected to an IO-pin of the MCU?
Through shortening the sense-resistor the voltage at +Input is zero.
And then I can measure VOut as the Y-interception of the I-V-line?
Is this right?
As R-sense is only 0,1 Ohm. Does the MOS-Fet have a much smaller resistance than 0,1 Ohm that he is able to "shorten" the sense-resistor?
best regards
Stefan
-Phil
The micro will have to raise the gate pin high to enable the charger and take a current reading; lower it to read the zero level.
-Phil
Nevertheless...
It is really a good idea to look for a better op-amp. These days, 2mV is not considered "precision" and what you are looking for is just that. You mentioned the OPA347 for its rail to rail i/o, but that is not a good choice, because it is an FET input device with even worse offset, +/- 6mV. A bipolar op-amp will be better. How about the OPA277 with 20 microVolts of Vos? There are others. You do have to pay for the precision. Another solution, if you have a box full of LM358s, is to go through the box until you find one that happens to have zero or a very small positive offset, and use that particular one.
I would use 10kΩ/100Ω to achieve the x100 ratio, not 1M/10k. There are also bias currents and bias current offsets to consider.
I am wondering if earth isn't really earth. At 2mV you don't need much current in a ground wire to produce that sort of voltage drop - thin wires/thin PCB traces and the current drain of an op amp or a few chips could produce that sort of drop.
So layout becomes important, eg where does earth return current flow from each device.
A photo of your setup might be helpful.
One trick I've found when measuring these sorts of voltages is to have the device you are measuring (eg an ADC) and to treat its local ground and signal as a differential voltage. Run both into a differential op amp circuit with some gain http://www.electronics-tutorials.ws/opamp/opamp_5.html In your case you could start with R1 and R3 1k, and R2 and R4 10k and then if it works try increasing the gain to 100.
Then you don't have to worry so much about whether ground really is ground.
Addit: 0.1uF bypass caps on every chip will be important too with these sorts of voltages.