Author Topic: Why does my Op Amp circuit need a Capacitor?  (Read 4930 times)

0 Members and 1 Guest are viewing this topic.

Offline Galaxyrise

  • Frequent Contributor
  • **
  • Posts: 527
  • Country: us
Why does my Op Amp circuit need a Capacitor?
« on: July 22, 2013, 05:14:01 pm »
Since repairing a Keithley 2000, I've been poking at ways to generate a stable 100V to calibrate it with.  I have a DMMCheck from Voltagestandard.com, and the 5V out is quite stable over a short time (hours), so I designed the following circuit to turn that stable low voltage into a stable 100V.  (the opamp was actually a 258 not a 358.)  When I tested it on a breadboard, putting the capacitor in there was a bit of an accident.  But when I pulled it out, the circuit stopped working! The opamp output -0.7V instead of the 4V needed.  I didn't even think < V- was possible! Probing the output with a scope, it's not oscillating; twas just -0.7V dc. I played around with other capacitor values, and 1nF was the smallest that fixed the problem.  Smaller capacitors didn't seem to have any effect.  What's happening here?

Switching to a LM6132 also fixed the problem (and had less drift; hooray for a 10x pricier opamp.)  But without understanding what was happening above, I don't know if C1 would still be better or not.

Thinking, "Oh hey, capacitors make everything better!" I put a filter cap in parallel with the voltmeter, but this cooked the LM258.  Is a filter cap there a good idea? How do I put a cap there without frying the opamp when the capacitor initially charges up to 100V?  I'd rather be told the answer to this one rather than burning through my 258's trying things out :)
I am but an egg
 

Offline jimmc

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: gb
Re: Why does my Op Amp circuit need a Capacitor?
« Reply #1 on: July 22, 2013, 06:52:13 pm »
I suspect that this is a start-up problem, if current from the battery drives the output of the 358 below ground, even momentarily,  the substrate isolation diodes start to conduct and the Op-Amp no longer functions correctly.
The 10nF probably holds the output up for just long enough for things to settle, however if a cap is connected across the 100v output the OP-Amp will suffer while it charges.

Try adding Schottky diode from the output (K) to ground (A) to prevent this.
Something like a 1N5818 (or bigger) should make things bulletproof as long as the battery current is limited to <1A using a 100 ohm series R.

Jim
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1345
  • Country: us
Re: Why does my Op Amp circuit need a Capacitor?
« Reply #2 on: July 24, 2013, 02:01:13 pm »
You simple circuit has many problems.

The difference in the order of Three supples powering up and how fast.
the huge changes that happen across OA2 on power up is taking OA2 well out side it's safe limits. If it is still working after a power up or power down cycle, you are just lucky that what little protection the OA2 has was enough this time.   

You should add two reverse connected diodes across each of OA2's inputs and outputs.
negative supply pin of OA2 to anode of diode. the cathode of this diode connects to a QA2 input or output and also to a second diode's anode. this second diode's cathode to positive supply pin of QA2.

With the added diodes any time the pin of QA2 tries to go out of range a diode will conduct protecting QA2.


 

Offline Galaxyrise

  • Frequent Contributor
  • **
  • Posts: 527
  • Country: us
Re: Why does my Op Amp circuit need a Capacitor?
« Reply #3 on: July 24, 2013, 05:30:15 pm »
I suspect that this is a start-up problem, if current from the battery drives the output of the 358 below ground, even momentarily,  the substrate isolation diodes start to conduct and the Op-Amp no longer functions correctly.
The 10nF probably holds the output up for just long enough for things to settle, however if a cap is connected across the 100v output the OP-Amp will suffer while it charges.

Try adding Schottky diode from the output (K) to ground (A) to prevent this.
Something like a 1N5818 (or bigger) should make things bulletproof as long as the battery current is limited to <1A using a 100 ohm series R.

Thanks for the help! Got some time to play with this last night, and putting a diode there does also allow the circuit to function.

Going on your hunch, I rigged my scope to watch the output pin and -Input as the 96V is applied to the circuit.  -Input has a little noise but otherwise ramps up smoothly to 4.7V. The output pin is at its max output before the 96V is attached (makes sense, since there's no feedback until then), and then overshoots all the way to -10V or so, setting rapidly at -0.7 (<1us.)  With the diode, it still overshoots and still settles at -0.7V after the overshoot... but then recovers after a few dozen us.  Adding resistance between the diode and negative supply makes it take longer to recover.  I also watched the +15 input, which gets noise but never goes below ground.
« Last Edit: July 24, 2013, 07:53:35 pm by Galaxyrise »
I am but an egg
 

Offline Galaxyrise

  • Frequent Contributor
  • **
  • Posts: 527
  • Country: us
Re: Why does my Op Amp circuit need a Capacitor?
« Reply #4 on: July 24, 2013, 05:49:10 pm »
You simple circuit has many problems.

The difference in the order of Three supples powering up and how fast.
the huge changes that happen across OA2 on power up is taking OA2 well out side it's safe limits. If it is still working after a power up or power down cycle, you are just lucky that what little protection the OA2 has was enough this time.   

I was wondering just how "naked through the woods" I was running every time I would shut down and start up the circuit, asking myself which I should disconnect first, etc.  I did eventually cook the LM6132 after a couple dozen startups. :(  Definitely a testament to the 258 that it has survived so many power cycles!

Quote
You should add two reverse connected diodes across each of OA2's inputs and outputs.
negative supply pin of OA2 to anode of diode. the cathode of this diode connects to a QA2 input or output and also to a second diode's anode. this second diode's cathode to positive supply pin of QA2.

With the added diodes any time the pin of QA2 tries to go out of range a diode will conduct protecting QA2.
Thanks for the tips! I'll play with your suggestion this weekend, and I think I'll add a filter capacitor to +supply, too.
I am but an egg
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1345
  • Country: us
Re: Why does my Op Amp circuit need a Capacitor?
« Reply #5 on: July 24, 2013, 06:44:03 pm »
Note: some diodes are very slow, you want fast diodes so that they turn on faster keeping the spike smaller when the spike goes past the power rails.
A shockley diode

I have found that the best idea is to never count on the protection of a chip. Using a chips protection or taking chip close to it's max results in shorter chip life or death. With added protection and a little thought, you can have the on chip protection as a backup for what get through the first level.

You may want to add some series resistors to the outside of the diode protection. When the diode conducts the resistor supplies a place to dump energy.

C
 

Offline Galaxyrise

  • Frequent Contributor
  • **
  • Posts: 527
  • Country: us
Re: Why does my Op Amp circuit need a Capacitor?
« Reply #6 on: August 14, 2013, 06:34:34 pm »
Finally got some time to put this back on the breadboard and play with it.  Attached is what I ended up with.  By having SW1 at the positive supply when the battery is attached, the opamp doesn't freak out and swing wildly negative.  It just gets some very short transient spikes on the output, which hopefully the diodes help with.  Then I flip the switch to the voltage divider and everything adjusts nicely, giving a stable 100V output.  I guess that would be a uC-controlled relay in a "real" product, but I'm not making one of those :P

Thanks again for your input!
I am but an egg
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf