# Help this complete and utter newbie get an op amp voltage follower working

#### EvanPerrine

Joined Feb 3, 2024
11
Hi everybody,

I'm taking a beginners DC circuitry course and I'm trying to learn on my own time about analog circuitry, something which has fascinated me for a while now.

One of the things I'm trying to start with is, as the title states, a voltage follower, since this is (supposed to be) a fairly simple op amp circuit.

I want to use a voltage follower to accurately "copy" the voltage stored in one capacitor to another, without significantly affecting the voltage being copied.

I've managed to pull this off in a simulator (falstad), but the problem is that it only works with an ideal op amp. When I try using a realistic one (that is, one that requires a power source), it becomes completely useless. Falstad offers a 741 and 324 op amps.

I'm trying specifically to copy a stored voltage between 0v and 40v from one capacitor to another. I can provide any voltage source necessary to accomplish this, though I'd like to do this with batteries and a voltage divider.

In case this needs to be specified, I intend for this whole setup to be DC.

Is this doable, and if so, how?

Thanks.

#### tonyStewart

Joined May 8, 2012
131
Some Op Amps work to Vcc+ like LT72xx others work to Vcc- while most CMOS can work Rail to Rail.

So read your datasheets for Vcm vs Vcc and scale your input to the ratio you need on output that fits within the to Vcm range.

#### WBahn

Joined Mar 31, 2012
30,072
Schematics are the language of electronics, so post a schematic of the circuit you are trying to use.

It is possible, but you are going to have to deal with the allowed range of power supply voltages for your opamps. There are also issues associated with stability when driving a capacitive load that you will run into (and that even a good simulator -- and Falstad does NOT qualify -- may not reveal). The easy way to deal with this is to put a series resistor between the opamp output and the second capacitor. How quickly does the second capacitor have to match the voltage on the first?

#### EvanPerrine

Joined Feb 3, 2024
11
Schematics are the language of electronics, so post a schematic of the circuit you are trying to use.

It is possible, but you are going to have to deal with the allowed range of power supply voltages for your opamps. There are also issues associated with stability when driving a capacitive load that you will run into (and that even a good simulator -- and Falstad does NOT qualify -- may not reveal). The easy way to deal with this is to put a series resistor between the opamp output and the second capacitor. How quickly does the second capacitor have to match the voltage on the first?
"Schematics are the language of electronics, so post a schematic of the circuit you are trying to use."

Well, that's the issue, I'm not even sure how the circuit should be. The working circuit I'm using in the simulator looks like this:

The battery/voltage source you can see to the left of the op amp can be any voltage, and the resistors to the right can be any resistance, from further testing it looks as though they can even different resistances. For whatever reason the capacitor storing the copied voltage (on the right) has to be wired in parallel like that for whatever reason. The resistor that feeds directly into the capacitor on the right seems to pretty much entirely control the charging speed of the capacitor.

It does work although I have no clue why, and it only works when I'm using the ideal op amp like that.

If I had to guess, this is a quirk of the simulation and this wouldn't actually work, but IDK.

"It is possible, but you are going to have to deal with the allowed range of power supply voltages for your opamps."

Are there op amps that could handle the voltages I describe?

#### WBahn

Joined Mar 31, 2012
30,072
Your circuit has no way to set the charge on the first capacitor. You'll need to do something to set the voltage and then, if you want, use a switch to separate the cap's positive terminal from whatever is charging it.

The vertical resistor serves no purpose. The horizontal resistor sets the charging rate of the output capacitor, as you've surmised.

There are some opamps that can take the kind of supply voltage you are looking for. Not many, but some.

For simulation purposes, start with a 324 (since you have that model in Falstad) and limit your voltage to what the device can handle.

I'd recommend getting a real simulator, such as LTSpice. There's a learning curve, but not excessive for the basic stuff.

#### EvanPerrine

Joined Feb 3, 2024
11
Your circuit has no way to set the charge on the first capacitor. You'll need to do something to set the voltage and then, if you want, use a switch to separate the cap's positive terminal from whatever is charging it.

The vertical resistor serves no purpose. The horizontal resistor sets the charging rate of the output capacitor, as you've surmised.

There are some opamps that can take the kind of supply voltage you are looking for. Not many, but some.

For simulation purposes, start with a 324 (since you have that model in Falstad) and limit your voltage to what the device can handle.

I'd recommend getting a real simulator, such as LTSpice. There's a learning curve, but not excessive for the basic stuff.
I set the charge on the first capacitor in the circuit before I connected it to the op amp. Realistically there would, of course, be a system by which it is charged. I'll most likely use optocouplers for the switching but that's another story.

I could probably remove the vertical resistor, but falstad gave me an error when I did so iirc, I guess since it needs resistors to properly compute current.

Do you know of any simulators available for Ubuntu Linux? It looks like LTSpice only works for Mac and Windows.

Thanks again

PS: A little update in falstad. I selected the LM324 as you advised and wired the same circuit into it, as you can see here.

(Changed the resistor for C2 to 1m to speed up charge times, it wasn't very helpful)

The battery for the power supply, above the op amp, is set to 15V.

It doesn't charge C2 anymore.

Last edited:

#### ericgibbs

Joined Jan 29, 2010
18,864
hi Evan,
How can you charge up the output capacitor when you have a 1R resistor in parallel with the cap?
Most OPA's have a limited output current capability, in the order of ~20mA

Post a circuit which shows the component values and OPA type and I will create a LTSpice simulation, which shows its performance.

E

#### EvanPerrine

Joined Feb 3, 2024
11
Your circuit has no way to set the charge on the first capacitor. You'll need to do something to set the voltage and then, if you want, use a switch to separate the cap's positive terminal from whatever is charging it.

The vertical resistor serves no purpose. The horizontal resistor sets the charging rate of the output capacitor, as you've surmised.

There are some opamps that can take the kind of supply voltage you are looking for. Not many, but some.

For simulation purposes, start with a 324 (since you have that model in Falstad) and limit your voltage to what the device can handle.

I'd recommend getting a real simulator, such as LTSpice. There's a learning curve, but not excessive for the basic stuff.
This does seem to work:

However, C2 must be empty and C1 must be connected at the same time as C2 or else C2 gets charged to near the voltage of the source.

#### EvanPerrine

Joined Feb 3, 2024
11
hi Evan,
How can you charge up the output capacitor when you have a 1R resistor in parallel with the cap?
Most OPA's have a limited output current capability, in the order of ~20mA

Post a circuit which shows the component values and OPA type and I will create a LTSpice simulation, which shows its performance.

E
Hi,

This is a more recent setup for my circuit

This seems to work (the op amp is a LM324 and the voltage source is 15V). It only functions properly, however, if the capacitor on the left is connected at the same time that the capacitor on the right starts being charged. Otherwise, the capacitor on the right charges to around 13V which I'm guessing comes from the voltage source above the op amp.

Is the wiring for the voltage source correct by the way? The diagrams seem to show that the output needs to be wired so as to connected back with the source's negative end as I have done.

#### ericgibbs

Joined Jan 29, 2010
18,864
Hi Evan,
Initially VC1 is 0V , I then apply a 15V on VC1, this charges VC2 via the OPA.
E

Added 2nd image, shows the exponential rise of VC2

#### Attachments

• 37.9 KB Views: 1

#### EvanPerrine

Joined Feb 3, 2024
11
hi Evan,
How can you charge up the output capacitor when you have a 1R resistor in parallel with the cap?
Most OPA's have a limited output current capability, in the order of ~20mA

Post a circuit which shows the component values and OPA type and I will create a LTSpice simulation, which shows its performance.

E
PS: The current in the circuit reads as 9ma.

#### EvanPerrine

Joined Feb 3, 2024
11
Hi Evan,
Initially VC1 is 0V , I then apply a 15V on VC1, this charges VC2 via the OPA.
E

Added 2nd image, shows the exponential rise of VC2

View attachment 314269
Is AD822 the name of that op amp? If so I will not be able to replicate it, all I have available are 741s and 324s.

#### EvanPerrine

Joined Feb 3, 2024
11
Hi Evan,
Initially VC1 is 0V , I then apply a 15V on VC1, this charges VC2 via the OPA.
E

Added 2nd image, shows the exponential rise of VC2

View attachment 314269
Alrighty, I ran this with the LM324 in falstad and it works beautifully!

#### ericgibbs

Joined Jan 29, 2010
18,864
Hi,
This is with a LM324 it has a lower input impedance than the AD8022, so there is a slight fall in VC1

E

Note, the 470R acts a current limiter, to protect the LM324 output from being damaged.

#### EvanPerrine

Joined Feb 3, 2024
11

#### ericgibbs

Joined Jan 29, 2010
18,864

#### EvanPerrine

Joined Feb 3, 2024
11
So let's see the results.
E

Not only will it charge C2 UP to the needed voltage level, but it also will DISCHARGE it down to C1's voltage level if it's too high.

You're a lifesaver!

#### MisterBill2

Joined Jan 23, 2018
18,568
Interesting discussion I just came across. Certainly it could work with an IDEAL op-amp, which the LM324 is not idea, and the LM741 is even farther from ideal. So pick an amplifier that is much closer to ideal and then use it well within it's limits. (Caution, I deal Op-amps do not have limits) Select one of those FET input devices that draws less than a microamp of bias current, and can be adjusted for zero input offset. At that point your experiment should work better.