Author Topic: OpAmp oscillation  (Read 2366 times)

0 Members and 1 Guest are viewing this topic.

Offline DubbieTopic starter

  • Supporter
  • ****
  • Posts: 1115
  • Country: nz
OpAmp oscillation
« on: August 09, 2018, 03:19:30 am »
I needed a low power, relatively precise electronic load for some small battery testing I am doing, so I thought it would be good practice to design one.

Because this is just a one off, I wanted to keep things simple.

I have attached the design I came up with. I simmed it and everything seemed to be fine.
Problem is, now that I have made it on a 3M breadboard, It oscillates like crazy at about 400Khz
besides the oscillation it does actually work... I get the right average current. I'd just rather have it without the crazy oscillation.

I have decoupled the LMC6482 opamp well.

Where do I start to calculate a way to kill the oscillation?

« Last Edit: August 09, 2018, 03:23:23 am by Dubbie »
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 6987
  • Country: ca
Re: OpAmp oscillation
« Reply #1 on: August 09, 2018, 03:35:03 am »
Good practice would be a capacitor to GND on the setpoint (+) input to prevent noise on 5V from getting in, and a comp cap from op-amp output to its (-) input- but after adding an additional 1k-10k to the sense-resistor. The 10R resistor is pretty low impedance there.

The sense resistor 10R at 70mA = 0.7V, plus the mosfet VGS losses likely a couple volts. What mosfet are you using? You might not be able to maintain constant current below several volts, which is not the greatest for battery work.
 
The following users thanked this post: Dubbie

Offline DubbieTopic starter

  • Supporter
  • ****
  • Posts: 1115
  • Country: nz
Re: OpAmp oscillation
« Reply #2 on: August 09, 2018, 03:44:03 am »
I had tried a 10nF in there Blueskull, and it didn't really do anything. However I put a 100nF in there and it worked perfectly.

Everything seems good now!

I am using a 30N06L mosfet which is working fine down to 2.4V which is below where I need.

Thanks Floobydust for the tip regarding the cap to decouple the 5V rail noise. Hadn't occurred to me.

Thanks for the advice guys!

R
« Last Edit: August 09, 2018, 04:13:31 am by Dubbie »
 

Online AndersJ

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: se
Re: OpAmp oscillation
« Reply #3 on: August 09, 2018, 02:50:51 pm »
To me,
the cap is a quick and dirty fix to another primary problem.
What is the reasoning behind the cap?
What problem does it fix?
"It should work"
R.N.Naidoo
 

Offline Alex Nikitin

  • Super Contributor
  • ***
  • Posts: 1177
  • Country: gb
  • Femtoampnut and Tapehead.
    • A.N.T. Audio
Re: OpAmp oscillation
« Reply #4 on: August 09, 2018, 03:26:20 pm »
The LMC6482 is not very tolerant to capacitive loads, something like 1nF (which is roughly the input capacitance of the 30N06L) on the output could easily make it unstable (and it is well documented in the datasheet for LMC6482). So, RTFM!

Cheers

Alex
 

Online AndersJ

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: se
Re: OpAmp oscillation
« Reply #5 on: August 09, 2018, 04:29:45 pm »
Isn't 100 Ohm enough to buffer the gate capacitance?
"It should work"
R.N.Naidoo
 

Offline Wolfgang

  • Super Contributor
  • ***
  • Posts: 1775
  • Country: de
  • Its great if it finally works !
    • Electronic Projects for Fun
Re: OpAmp oscillation
« Reply #6 on: August 09, 2018, 04:47:43 pm »
I have some advice on this:

- Get an opamp that can drive capacitive loads (LT1363, e.g.)
- Define what bandwidth your current source should have
- decouple the gate drive, and provide a minimum op amp load
- Compensate the op amp so this bandwidth is reached
- Simulate the whole thing using SPICE
- Make a prototype (you did that anyway)

- Dont go too low with the voltage across the FET

much luck !





 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar
Re: OpAmp oscillation
« Reply #7 on: August 09, 2018, 05:25:09 pm »
To decrease the feedback capacitance you could add a resistor between the sense resistor and the inverting input, you have 10Ω and it works with 100nF, use a 10kΩ as I said and you can probably get away with 100pF, that way the capacitive load is much smaller, I think the 100Ω should be fine for the gate.

Here is my attempt to build one, CC and CV modes, the first version worked nice, I have a second one with a more stable config but I haven't build that one yet, I would like to add constant resistance as well to provide extra flexibility, right now the project is in the drawer as I have ton of work but I'd need to finish that eventually. If you like I could send you the PCB design for it or eagle files, pretty self etch friendly.

https://www.eevblog.com/forum/projects/cccv-dummy-load/msg1589761/#msg1589761

JS
If I don't know how it works, I prefer not to turn it on.
 

Offline DubbieTopic starter

  • Supporter
  • ****
  • Posts: 1115
  • Country: nz
Re: OpAmp oscillation
« Reply #8 on: August 10, 2018, 08:00:35 am »
Thanks for all the tips. Food for thought. I will try the extra resistor when I get the chance.

My component choice was not deliberate, just what I had to hand.
 

Offline rdl

  • Super Contributor
  • ***
  • Posts: 3667
  • Country: us
Re: OpAmp oscillation
« Reply #9 on: August 10, 2018, 08:25:59 am »
Maybe this will help.
I built a copy of Dave's circuit and it oscillated madly, but I did finally get it working.

470 ohm between op amp output and the gate of the FET.
150 nf between op amp output and inverting input
27 ohm between FET source and op amp inverting input

Figuring that out was pretty much just trial and error.

 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2548
  • Country: us
Re: OpAmp oscillation
« Reply #10 on: August 10, 2018, 05:30:25 pm »
Here is what I did based on a design by Peter Oakes:
0 to 1.5A @ 20V max with internal control or a 0 to 5V external input.





   
« Last Edit: June 05, 2019, 09:41:44 pm by MarkF »
 

Offline exe

  • Supporter
  • ****
  • Posts: 2562
  • Country: nl
  • self-educated hobbyist
Re: OpAmp oscillation
« Reply #11 on: August 10, 2018, 05:49:35 pm »
Unfortunately, the most common approach to solve stability issues is to randomly put resistors and caps.

Fortunately, one of forum members designed an electronic load with stability in mind: https://www.eevblog.com/forum/projects/dynamic-electronic-load-project/ . You can follow his design procedures.

PS it can be more tricky than it looks. I spent quite some time to figure out how to stabilize my own circuits. And I ended up empirically increase capacitor in negative feedback (Miller compensation). The downside of this approach is circuit becomes slow. But for battery testing this can be fine.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf