1
\$\begingroup\$

I am building a system which will measure and record the voltage of batteries. There are 8 channels in the system, each channel being capable of measuring 0-35 V. The accuracy we have decided upon is +/- 0.02 V.

The LMV324 op-amp was chosen as it has an input offset voltage of max. 6 mV specified. A 12-bit ADC is being used with a 1.8 V reference voltage.

enter image description here

I have built the circuit, and found that even with no input voltage applied, the output of the op-amp is 0.04 V. I have two of these op-amps on the same PCB, and all output voltages between 0.038 V and 0.04 V with no input.

At first I thought that noise/ripple from my DC-DC converter, which powers the op-amps, may have been the problem, but then I switched over to a linear regulator and the exact same thing happened.

Why is this happening?

\$\endgroup\$
5
  • \$\begingroup\$ The problem is "Low level output voltage" V_ol , the lowest output voltage on op-amp output when VDD=0V \$\endgroup\$
    – M KS
    Commented Dec 4, 2018 at 8:49
  • 2
    \$\begingroup\$ Why would you specifically choose an op-amp with such poor input offset voltage? \$\endgroup\$
    – Andy aka
    Commented Dec 4, 2018 at 9:23
  • \$\begingroup\$ Sorry, I don't have much experience with Opamps. I didn't know that this was poor. What type of input offset voltage would be classified as 'good'? Specifically I have just calculated I need the Opamp output to be within 1mV of the input \$\endgroup\$
    – Russell
    Commented Dec 4, 2018 at 9:25
  • 1
    \$\begingroup\$ Why are you using an op amp, at all? Is there some reason why you don't direct connect? \$\endgroup\$
    – john
    Commented Jul 16, 2021 at 14:07
  • 1
    \$\begingroup\$ Note that this doesn't interfere at all with the task of monitoring batteries \$\endgroup\$ Commented Nov 22, 2021 at 23:35

3 Answers 3

1
\$\begingroup\$

Despite what some op-amps claim, none that I am aware of are able to get their outputs all the way to their positive or negative supply potentials. Furthermore, op-amps all have a limited range of permissible input potentials, often very similar to their output range. In some cases, taking an input outside of that range can cause the output to fly off to the opposite extreme, a phenomenon called phase reversal.

That means both of these situations are always problematic:

schematic

simulate this circuit – Schematic created using CircuitLab

You have to take care not to exceed the limits imposed at the inputs, or expect an output swing extending to either supply. You applied 0V to the non-inverting input, and were surprised to find that the output was above zero, by some 40mV. Now you know why.

The obvious solution, but one that is quite inconvenient, is to provide the op-amp with a negative supply potential, for example \$V_{EE} = -5V\$. This solves two problems. Firstly, the inputs can now be taken all the way to 0V, and the output is able to follow, as expected.

Another inconvenient consequence of this solution is that the op-amp is now able to output negative potentials, which can be harmful to the subsequent ADC, and steps must be taken to protect it.

If you choose not to go that route, then have two issues to address. Firstly, an op-amp input of 0V may not be acceptable. Secondly, even it it were, the corresponding follower output of 0V is not even possible.

The simplest way I can think of to get past these hurdles, without having to obtain a negative supply somehow, is to raise the minimum op-amp input potential to 100mV or so. This would mean that 0V at your input would result in +100mV at the op-amp's non-inverting input, and an input of +35V would apply +1.8V.

Obviously, this means that you will lose some of the lower counts of the ADC, but that's still \$\frac{1.8V-0.1V}{1.8V} = 94\%\$ of full scale. This 100mV offset can be compensated for in software.

To introduce a +100mV offset will require some modification to the potential divider, and some algebra to figure out the resistor values. You will require a low impedance, low noise, stable positive reference potential. If you trust your op-amp's positive supply in these respects then you can use that:

schematic

simulate this circuit

That circuit yields the relationship between input and output you are looking for, as shown in this sweep of input from 0V to +35V:

enter image description here

Your ADC has 12 bits of resolution, which is \$2^{12}=4096\$ distinct values, each representing \$\frac{1.8V}{4096}= 440\mu V\$. Power supply fluctuations will find their way to OUT, attenuated by a factor of \$\frac{R_2}{R_1+R_2}=\frac{1}{20}\$. That means 1 bit corresponds to \$20 \times 440\mu V = 9mV \$ of ripple in the +5V supply.

If your supply has more ripple or variation than this, and you wish to retain the full 12 bits of accuracy, then you'll have to use a precision reference, such as the TL431:

schematic

simulate this circuit

\$\endgroup\$
0
\$\begingroup\$

Input offset means the op amp can see a difference of >6mV between it's inputs. The output can still be over 6mV. You need a rail to rail opamp which goes down to zero volts at its output. I don't know if there's anything cheap which can do that.

Here's a tutorial on input offset voltage https://www.analog.com/media/en/training-seminars/tutorials/MT-037.pdf

The usual way to get a zero output is to use a balanced dual supply. And, then some kind of protection circuit to make sure output is within uC input limits. This makes every single op amp ever made go down to zero volts.

Or, one can add the input with a bias voltage (65mV in this case) and then feed it to the op amp. But, this will likely introduce even more error.

If you can find an opamp that does have 0 V output, but has a high input offset, you can still use the LMV324. Set a gain on the LMV324 and feed it into the other opamp.

[The OP07 is not a rail to rail opamp. From the datasheet, with ±15V supply, output swing is ±12.5V max. That means, if power supply is single rail 5V, output will vary from +1.5V to +3.5V max, instead of 65mV to 4.99V for the LMV324 (typical), or even 5mV to 3.5V for the LM358 (typical)]

added At 3.3V single rail supply for the opamp, for measuring battery voltage, the LM358 is fine. I would try to increase the supply voltage a bit if possible to account for inter chip variations, as 3.3V leaves exactly 3.3-1.8=1.5V headroom (which is the limit for this opamp).

As Doodle and others say below, in reality a battery will never drop to zero volts, so rail to rail opamp is not really required.

Input null would be great for accuracy. However, if the OP is using a uC, the calibration can possibly also be done in software, if the input offset for the particular chip is stable (this is an assumption).

\$\endgroup\$
7
  • \$\begingroup\$ OP hasn't made it clear the supply constraints for the Op Amp. You're operating under the Op Amp using a single supply where as I am suggesting based on a dual supply. \$\endgroup\$
    – user103993
    Commented Dec 5, 2018 at 9:35
  • \$\begingroup\$ @Doodle Well... you are not entirely right. (With dual supply) Low input offset will only ensure output is zero, when input is also zero. That is an ideal op amp, and the OP07 comes close to it. However, on a dual supply, ANY opamp will reach zero volts, even if the input is not exactly zero. Unless one is building a multimeter, the OP07 is overkill. For the OP, 6mV input offset appears to be fine. Therefore the ordinary LM358 with 7mV input offset, and 5mV output with single rail, should also be perfectly fine. \$\endgroup\$
    – Indraneel
    Commented Dec 5, 2018 at 9:44
  • \$\begingroup\$ @Doodle one can also operate the LM358 with dual supply to get exactly 0 V output (but off course that would be kind of stupid). For a thermocouple or multimeter, I would definitely use a OP07 or better with dual supply. But for measuring a battery ...? \$\endgroup\$
    – Indraneel
    Commented Dec 5, 2018 at 9:48
  • \$\begingroup\$ The point of suggesting the OP07 was the null pins that allow for you to make the output zero when the input is zero pretty easily. I'm just working off the OP's stated requirements rather than the application. \$\endgroup\$
    – user103993
    Commented Dec 5, 2018 at 9:52
  • \$\begingroup\$ @Doodle OP has now stated the opamp supply to be 3.3V single rail. You are not wrong, just a bit off the mark. I don't hold a grudge. Yes, you are right about the irrelevant part too. We are just banging our heads here. \$\endgroup\$
    – Indraneel
    Commented Dec 5, 2018 at 9:54
0
\$\begingroup\$

The accuracy is determined by the linearity and drift errors of the resistive divider, op-amp and the ADC. Such circuits are typically calibrated using an external voltage source on the production line or during test/commissioning, and you don’t need to use precision resistor networks nor low-offset op-amps.

If you can, it’s always an option to use some electronic switches on each input to allow for self-calibration on power-up and periodically thereafter if you want to completely cancel out thermal drift.

Don’t forget the EMI filtering on the input, as well as ESD protection!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.