Can I implement a negative offset with single supply OP amp? - Page 1
Forum section: electronics / beginners

author: BeBuLamar
author_rank: Super Contributor
timestamp: February 19, 2024, 01:01:36 pm
content: I want to use a single supply OP amp for scaling a meter and it needs some negative offset. The output = a*input -b but the resulting output is always positive. I don't think I can do it but just ask.

author: MrAl
author_rank: Super Contributor
timestamp: February 19, 2024, 01:04:18 pm
content: Quote from: BeBuLamar on February 19, 2024, 01:01:36 pmHi,Yes there are a number of ways to do this. It depends how much offset you need.A small offset can be done with a diode, a larger offset with another op amp section that creates and artificial ground.How much neg offset do you need, and what is your positive supply voltage??

author: BeBuLamar
author_rank: Super Contributor
timestamp: February 19, 2024, 04:51:40 pm
content: I have to go home and check my equation. But it's like 0.3V or so. I want to power it with 9V battery. The gain is 0.7

author: magic
author_rank: Super Contributor
timestamp: February 19, 2024, 06:04:16 pm
content: The standard noninverting amplifier circuit with Rf between OUT and IN- and Rg between IN- and GND is also an inverting amplifier if you disconnect Rg from ground and apply a signal to it. For each 1V applied to Rg, the output shifts by -1V·Rf/Rg. So you can get a negative offset by lifting Rg above ground.This type of amplifier has positive gain, but it can be only slightly more than unity and the trick still works. To get 0.7 gain you will need to divide the signal at the input.

author: MrAl
author_rank: Super Contributor
timestamp: February 20, 2024, 12:54:22 am
content: Quote from: BeBuLamar on February 19, 2024, 04:51:40 pmCan you put up with 0.5 volts instead of 0.3 volts?If so, you can bias a Schottky diode with a resistor from +Vcc and that will give you an offset, then use that as the system ground and the cathode of the diode becomes the negative supply.You could also bias a non inverting op amp with two resistors and create an offset of around 0.5 volts too.Either way, that positive offset becomes the ground and the battery negative terminal becomes the negative supply voltage.In the schematic if you make R1=100k then the offset will be 0.8 volts for example.If you increase R2 to 100k and make R1=1Meg then the offset will be about the same but draw less current from the battery.

author: BeBuLamar
author_rank: Super Contributor
timestamp: February 21, 2024, 01:55:59 am
content: The function is Output=0.702714*Input - 0.02607I am thinking of ignoring the -0.02607

author: Ian.M
author_rank: Super Contributor
timestamp: February 21, 2024, 06:44:52 am
content: Quote from: BeBuLamar on February 21, 2024, 01:55:59 amIf you are going to ignore the offset, then there's no point in having better than three figure precision for the scaling factor, and, provided the meter has a constant input resistance, the circuit reduces to a single resistor!OTOH, its certainly technically possible to do the scaling and subtract the offset in the same single OPAMP circuit, but your six digit precision on the scaling factor and single digit microvolt precision on the offset are at least two digits past where sane engineers worry about the cost, and well into high end metrology territory, so will certainly bite you in the ass (right over the pocket your wallet is in)!

author: BeBuLamar
author_rank: Super Contributor
timestamp: February 21, 2024, 10:53:11 am
content: I worked out the equation with 6 digit precision but I only need 2 digits accuracy. But ignoring the offset I can't get 2 digits accuracy.

author: MrAl
author_rank: Super Contributor
timestamp: February 21, 2024, 10:06:49 pm
content: Quote from: BeBuLamar on February 21, 2024, 01:55:59 amHi,Oh, that is different. It sounds like what you want is a "subtractor" circuit.This can be made with a "difference amplifier". You do not need an "offset" per se.With a difference amplifier, you would supply your normal input to one input, and your offset to the other terminal, adjusted for the gain or with different value resistors than used for the other input. Then your output becomes:Vout=(V1-V2)*Gwhere G is the gain.In this case you would supply your normal input as V1 and the 'offset' as V2 adjusted for the gain if the gain G is not 1.If the gain is 1, then it is justVout=V1-V2since the gain will be less than one (it sounds like) then you could adjust V2 as the desired offset divided by G, or maybe set the resistors to allow the V2 input to have a different gain than for the input V1. You would loose some common mode rejection functionality though but that may not be a problem.A difference amplifier is made with just 4 resistors, so it's pretty simple. See the attachment.If all the resistors are the same, the output is V1-V2.Note: sometimes it is called a "differential amplifier".

author: Ian.M
author_rank: Super Contributor
timestamp: February 21, 2024, 10:33:57 pm
content: Quote from: MrAl on February 21, 2024, 10:06:49 pmIts frequently called a differential amplifier, (not to be confused with a differentiator). The term difference amplifier is a lot rarer even though it far more accurately describes its function.You can also do the job with an instrumentation amplifier, which is basically a difference amplifier with input buffers, and often have built in laser trimmed resistor networks such that you only need to add one external resistor to set the gain or link some pins to select one of its preset gain options.See my reply #6 above for a fairly impractical implementation of the concept - no one in their right mind specifies matched arbitrary value resistors with six digit precision unless the DoD or similar state funded organisation is paying, and if you think the 5V rail is going to be stable enough to divide down to give a four significant digit offset, you are simply delusional!

author: magic
author_rank: Super Contributor
timestamp: February 22, 2024, 06:30:09 am
content: Integrated instrumentation amps generally don't support gains lower than unity. They also force gain of the offset adjustment input to be the same as signal gain, which may or may not be convenient.There is no need for matched resistors if one of the inputs is constant. Just select whatever values that work.

author: Ian.M
author_rank: Super Contributor
timestamp: February 22, 2024, 07:31:35 am
content: Quote from: magic on February 22, 2024, 06:30:09 amGood point, though having gain and offset adjustments interact to a significant degree *sucks*, but probably not enough to justify precision matched resistors.

author: MrAl
author_rank: Super Contributor
timestamp: February 22, 2024, 12:14:52 pm
content: Quote from: BeBuLamar on February 21, 2024, 01:55:59 amHi,Here is one such solution (see drawing). V1 is the input. G is the gain 0.7 or whatever, and it's made positive not negative even though it subtracts from the main input V1.

author: Terry Bites
author_rank: Super Contributor
timestamp: February 23, 2024, 12:12:20 pm
content: Get this article from TI.Its really good info on designing single supply opamp circuits.I'll post my speadsheet for it when I find it..

author: MrAl
author_rank: Super Contributor
timestamp: February 24, 2024, 03:35:39 am
content: Quote from: Terry Bites on February 23, 2024, 12:12:20 pmFYI, post #12 is a complete solution, just plug in the desired gain.