# Rail to rail operational amplifier

#### engr_david_ee

Joined Mar 10, 2023
166
I am wondering what is the application of rail to rail operational amplifier ? Application as power rail ?

I am wondering if we have a digital to analog converter that outputs 0 V to 2 V and we need for another circuit 0 V to -2 V. Can we use rail to rail operational amplifier with unity gain in inverting mode ? This way the input voltage polarity will be reversed and we get 0 V to -2 V at the output of the operational amplifier which can serve as a negative power rail to another circuit. Is that an application of rail to rail operational amplifier ?

#### BobTPH

Joined Jun 5, 2013
8,935
No, rail to rail means exactly what it says, the output can go from the negative power rail to the positive power rail. So if you power a rail to rail opamp with ground and +5V, it can output 0 to 5V, never a negative voltage.

#### engr_david_ee

Joined Mar 10, 2023
166
I did not mentioned before if the operational amplifier is powered by + 5 V and -5 V. And we have 0 V to 2 V at the inverting input of the operational amplifier. Will the unity gain inverting operational amplifier reverse the polarity ? which can be used by another circuit requiring negative power supply ?

#### Irving

Joined Jan 30, 2016
3,868
I did not mentioned before if the operational amplifier is powered by + 5 V and -5 V. And we have 0 V to 2 V at the inverting input of the operational amplifier. Will the unity gain inverting operational amplifier reverse the polarity ? which can be used by another circuit requiring negative power supply ?
Yes it could, but opamp generally have little output power so what is the requirement for the -2v rail? Also rail-to-rail means 'close to rail', so typically <250mV off the rail (rather than approx 1v in an non R-R device).

If you mean you need the DAC to provide a variable 0 to 2v AND 0 to -2v simultaneously, then the opamp is a good solution, subject to output requirements. However your use of the terms 'power rail' & 'power supply' to the other circuit is confusing. Power rails are usually fixed voltage, and have higher current sourcing capability than the output of an opamp. Maybe a schematic would clarify?

#### engr_david_ee

Joined Mar 10, 2023
166
Yes, that is true. The requirement is to get 0 V to -2 V variable negative power supply that provide or deliver 50 mA current to the load and we have 0 V to 2 V from DAC.

So the DAC will generate variable voltage from 0 V to 2 V which will be inverted by inverting operational amplifier to get 0 V to -2 V. This negative voltage will be connected to a load that requires 50 mA current. The operational amplifier can be powered up by positive and negative supply voltage. I am not sure which biasing voltage to the operational amplifier would be ok. Can it be powered by +/- 5 V or even +/- 3 V is also fine.

I am sorry, I sill need to understand the rail to rail operational amplifier meaning. The operational amplifier I am using this way is rail to rail ?

Is there any other logic or solution to get variable negative voltage ?

#### Papabravo

Joined Feb 24, 2006
21,225
I did not mentioned before if the operational amplifier is powered by + 5 V and -5 V. And we have 0 V to 2 V at the inverting input of the operational amplifier. Will the unity gain inverting operational amplifier reverse the polarity ? which can be used by another circuit requiring negative power supply ?
It might seem like a good idea, but it has numerous drawbacks which is why you would seldom have occasion to do this. Power supply voltages are regulated, but opamp outputs are not. Limited output current is probably the least of your problems.

#### crutschow

Joined Mar 14, 2008
34,392
I sill need to understand the rail to rail operational amplifier meaning. The operational amplifier I am using this way is rail to rail ?
If you only need 2V with a 5V supplies, then you don't need a rail-rail type op amp.
So the DAC will generate variable voltage from 0 V to 2 V which will be inverted by inverting operational amplifier to get 0 V to -2 V. This negative voltage will be connected to a load that requires 50 mA current. The operational amplifier can be powered up by positive and negative supply voltage.
For the 50mA you can either use a standard op amp with a transistor output buffer, or use a high-current type op amp, so your choice.

Do you have any particular cost constraints for this?
Where do you get your parts?

#### MrChips

Joined Oct 2, 2009
30,790
Let's go back to square one.

You need 0V to -2V output at 50mA max.
Use an op amp powered with +5V and -5V. You don't need rail-to-rail op amp.

#### engr_david_ee

Joined Mar 10, 2023
166
I found an operational
Let's go back to square one.

You need 0V to -2V output at 50mA max.
Use an op amp powered with +5V and -5V. You don't need rail-to-rail op amp.
Yes, this is the requirement. I found an operational amplifier AD8397ARZ with high output current. Is that a suitable choice ?

#### MrChips

Joined Oct 2, 2009
30,790
You can use a low current output op amp and buffer the output for higher current drive.

#### Irving

Joined Jan 30, 2016
3,868
Most rail-to-rail opamps will deliver an output voltage within 250mV of the + or - supply rails, but at low current, typically 5 - 10mA max. A typical opamp has an output impedance of around 50ohm to 200ohm so 50mA isn't directly possible without a specialist device or a different circuit configuration.

What is the DAC you are using?

The 8397 will do the job, but 2 considerations: How accurate must the match from +ve to -ve be? What is the frequency range of your analog output?

#### engr_david_ee

Joined Mar 10, 2023
166
I have not looked at the DAC yet. I was mainly searching op amp with high enough current. Regarding the variable negative voltage, it's basically bias voltage variable between 0 V and -2 V and need to be stable at different select levels. So once it is ramped up or down, it should stay at the same level.

#### engr_david_ee

Joined Mar 10, 2023
166
I guess I don't need two transistor shown in post 10 to buffer the output and get required current. As the selected op amp is already high output current device.

#### engr_david_ee

Joined Mar 10, 2023
166
I understand that I can not use rail to rail configuration because in rail to rail configuration, the output has to be within +/- 250 mV of the input. In my case I will use inverting amplifier with unity gain to invert the voltage.

#### Irving

Joined Jan 30, 2016
3,868
I have not looked at the DAC yet. I was mainly searching op amp with high enough current. Regarding the variable negative voltage, it's basically bias voltage variable between 0 V and -2 V and need to be stable at different select levels. So once it is ramped up or down, it should stay at the same level.
It will stay stable
a) as long as the input is stable;
b) Proper attention is paid to power supply decoupling
c) the output load current is fairly stable

With 1% tolerance resistors the output will be within 0.7% of the magnitude of the input, but opposite sign.

I understand that I can not use rail to rail configuration because in rail to rail configuration, the output has to be within +/- 250 mV of the input. In my case I will use inverting amplifier with unity gain to invert the voltage.
No, Rail-to-rail is not a configuration, its a property of the opamp design. You don't need a rail to rail opamp if you only need -2v from -5v. If you needed 4v out from 5v supply you might need a rail-to-rail design.

Output volts at 2v v load current

Last edited:

#### BobTPH

Joined Jun 5, 2013
8,935
I understand that I can not use rail to rail configuration because in rail to rail configuration, the output has to be within +/- 250 mV of the input. In my case I will use inverting amplifier with unity gain to invert the voltage.
No. A rail to rail op with that spec can have an output of -4.95 to + 4.95. And the input can be -5 to 5V.

Last edited:

#### crutschow

Joined Mar 14, 2008
34,392
I found an operational amplifier AD8397ARZ with high output current. Is that a suitable choice ?
That should work, if the cost is not prohibitive.
It's a little more expensive than using a standard (non rail-rail) op amp, such as an LM324 or LM358 with a 2N3906 transistor (or similar PNP) emitter-follower output buffer (LTspice sim below).
The output (green trace) goes to 0 to -3V for a 0 to +3V input (yellow trace), with the load current (red trace) going to -50mA at -2V out with a 40Ω load.
(It can output over -150mA if needed).

Last edited:

#### WBahn

Joined Mar 31, 2012
30,034
I understand that I can not use rail to rail configuration because in rail to rail configuration, the output has to be within +/- 250 mV of the input. In my case I will use inverting amplifier with unity gain to invert the voltage.
You still do not grasp the concept of what rail-to-rail means.

Original opamps had an active output region that typically only got within a couple of volts of the opamp's supply voltages (the 'rails'). So if you were powering an opamp from +/- 15 V, it could only produce outputs from about -13 V to +13 V.

As supply voltage in circuits were reduced, often to save power, especially for battery-operated devices, it was desirable to have opamps that could output voltages significantly closer to the supply voltages. This is all rail-to-rail means. It does NOT mean that a circuit using such an opamp MUST produce outputs that are close to the rails, only that it is capable of doing so.

Your thinking is along the lines of thinking that someone that someone that buys a scale that has a 350 lb capacity can't use it unless they weigh 350 lb.

#### nsaspook

Joined Aug 27, 2009
13,254
No. A rail to rail op with that spec can have an output of -4.95 to + 4.94. And the input can be -5 to 5V.
It sort of scares me that the OP has EE in the handle.

#### Papabravo

Joined Feb 24, 2006
21,225
It sort of scares me that the OP has EE in the handle.
Yeah - more than a bit sketchy, but it is a broad field and not everybody has the same level of understanding on all of it. I've known crackerjack digital designers who would have trouble understanding how a motor works, as well as power engineers that are flummoxed by a latching shift register. "EE" covers such a wide range of topics that having the letters is almost meaningless. I understand the TS is trying to do something quick and doesn't have the luxury of gaining the necessary understanding. It may or may not come back to bite him, but I wish him well.