Author Topic: Correctly stabilize an opamp current source  (Read 3377 times)

0 Members and 1 Guest are viewing this topic.

Offline ZeroResistanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 585
  • Country: gb
Correctly stabilize an opamp current source
« on: April 24, 2019, 07:58:32 am »
The circuit I tried is attached. Its the simple and ubiquitous op amp current source with a BJT.

Except for the op-amp I used a faster one TL072 powered @ 12V and BJT BD139.
The current sense resistor is 1ohm. When I give 1V at the input I was expecting around 1A at he output but I get around 0.5 to 0.6A.
I cannot find the max output current of the TL072, but I beleive the opamp cannot source the base current required for correct operation of the current source.

I tried also with a darlington transistor TIP122 in the same setup but the output oscillates.

I would have loved to use a mosfet and I did try with the STP55NF06 but again the output oscillates. For the mosfet I tried using additional components as given here https://www.electronicsweekly.com/blogs/engineer-in-wonderland/current-sink-stability-2015-10/, an additional resistor(tried 1K and 10K) and capacitor (tried both 100pf and 1nF) but that wouldn't stop the oscillation.

The above circuits all had the drain / collector powered by 12V.

I have assembled the circuit on a breadboard.

My questions are
1. For the BJT version would I just need another transistor stage (like a 2N3904) in between the BD139 and opamp can safely source that amount of base current?
2. For the Mosfet version, how do stabilize the op amp and prevent it from oscillation?
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Correctly stabilize an opamp current source
« Reply #1 on: April 24, 2019, 08:47:16 am »
just need another transistor stage (like a 2N3904) in between the BD139

Yes, making your own emitter follower often works. 2N3904's collector to V+, and add a 820 or 1k, emitter to GND.

TL072 isn't single supply.
« Last Edit: April 24, 2019, 08:48:57 am by StillTrying »
.  That took much longer than I thought it would.
 
The following users thanked this post: ZeroResistance

Offline ZeroResistanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 585
  • Country: gb
Re: Correctly stabilize an opamp current source
« Reply #2 on: April 24, 2019, 09:25:35 am »

TL072 isn't single supply.

Ok, I missed that point! However I had even checked with an MCP602 @ 5V supply. However could not test a Mosfet with his since the Mosfet needs the output to swing higher that 5V. Will try with a Emitter follower stage in between.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5570
  • Country: va
Re: Correctly stabilize an opamp current source
« Reply #3 on: April 24, 2019, 09:39:06 am »
Here is a sim with MCP6001, switching 100mA/1A.
The proper style of wiring is essential in order to suppress the oscillation as well.

PS: even single rail, rail to rail opapms cannot go down to 0V. Thus I would not expect to get something below 30mA current (0.03V).
« Last Edit: April 24, 2019, 09:51:50 am by imo »
Readers discretion is advised..
 
The following users thanked this post: ZeroResistance

Offline ZeroResistanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 585
  • Country: gb
Re: Correctly stabilize an opamp current source
« Reply #4 on: April 24, 2019, 09:59:52 am »
Here is a sim with MCP6001, switching 100mA/1A.
The proper style of wiring is essential in order to suppress the oscillation as well.

PS: even single rail, rail to rail opapms cannot go down to 0V. Thus I would not expect to get something below 30mA current (0.03V).

Great sims! However I can't seem to get it work in a practical setting.
I don't have a MCP6001 so was checking with a MCP602.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5570
  • Country: va
Re: Correctly stabilize an opamp current source
« Reply #5 on: April 24, 2019, 10:22:58 am »
Sure the sim is an ideal situation. We do not know how your actual wiring (the construction) looks like. With long wires, bad grounding, poor decoupling, large parasitic capacitancies/inductancies, etc it could oscillate.
Btw what is the frequency of the oscillation?
« Last Edit: April 24, 2019, 10:31:49 am by imo »
Readers discretion is advised..
 
The following users thanked this post: ZeroResistance

Offline ZeroResistanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 585
  • Country: gb
Re: Correctly stabilize an opamp current source
« Reply #6 on: April 24, 2019, 10:50:09 am »
Sure the sim is an ideal situation. We do not know how your actual wiring (the construction) looks like. With long wires, bad grounding, poor decoupling, large parasitic capacitancies/inductancies, etc it could oscillate.
Btw what is the frequency of the oscillation?
Its between 500Khz to 1Mhz
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Correctly stabilize an opamp current source
« Reply #7 on: April 24, 2019, 11:06:07 am »
I must have been drawing while imo was writing. :)

On these the GND path between the sense resistor and signal is part of the feedback loop, so you have to try and keep the high GND current out of the path of the signal and feedback GND.
If the PSU and SG are both separately GNDed, connect them on their correct side near the sense resistor, and hope.
.  That took much longer than I thought it would.
 
The following users thanked this post: ZeroResistance

Offline ZeroResistanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 585
  • Country: gb
Re: Correctly stabilize an opamp current source
« Reply #8 on: April 24, 2019, 11:08:56 am »
I must have been drawing while imo was writing. :)

On these the GND path between the sense resistor and signal is part of the feedback loop, so you have to try and keep the high GND current out of the path of the signal and feedback GND.
If the PSU and SG are both separately GNDed, connect them on their correct side near the sense resistor, and hope.

Amazing drawing! thanks  for the great effort. Will recheck and do the needful. BTW i forgot to mention that I need output currents as high as 10A.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5570
  • Country: va
Re: Correctly stabilize an opamp current source
« Reply #9 on: April 24, 2019, 11:32:44 am »
I've done a stability analysis and it seems the circuit is stable per se (44deg phase margin).
« Last Edit: April 24, 2019, 11:35:16 am by imo »
Readers discretion is advised..
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: Correctly stabilize an opamp current source
« Reply #10 on: April 24, 2019, 11:33:29 am »
Will recheck and do the needful.


"Do the needful." I thought that was an odd turn of phrase and looked it up. It seems it was a formal expression used over a century ago and which has only survived in India. Interesting. One guy says he uses it to mean "I am going to poop". :)

Quote
Grammarly: Do the needful means do that which is needed. It's mainly used in formal written communication, especially when dealing with bureaucracy. It can be preceded by the words “kindly” or “please.” Ideally, it should follow an explanation of a problem that needs to be fixed or a request that is being made.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline ZeroResistanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 585
  • Country: gb
Re: Correctly stabilize an opamp current source
« Reply #11 on: April 24, 2019, 11:45:20 am »
Will recheck and do the needful.


"Do the needful." I thought that was an odd turn of phrase and looked it up. It seems it was a formal expression used over a century ago and which has only survived in India. Interesting. One guy says he uses it to mean "I am going to poop". :)

Quote
Grammarly: Do the needful means do that which is needed. It's mainly used in formal written communication, especially when dealing with bureaucracy. It can be preceded by the words “kindly” or “please.” Ideally, it should follow an explanation of a problem that needs to be fixed or a request that is being made.

 :-DD Lol good catch and thanks for the explanation!
 

Offline ZeroResistanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 585
  • Country: gb
Re: Correctly stabilize an opamp current source
« Reply #12 on: April 24, 2019, 11:46:22 am »
I've done a stability analysis and it seems the circuit is stable per se (44deg phase margin).

Great going! how on earth did you do that?

In the meanwhile I have got some success with the BJT version (2N3904 + BD139). I tested it upto 2A and it seems OK.

I need a higher current so I'm gonna try a Sziklai pair version next.
Both images attached.
« Last Edit: April 24, 2019, 11:49:13 am by ZeroResistance »
 

Offline ZeroResistanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 585
  • Country: gb
Re: Correctly stabilize an opamp current source
« Reply #13 on: April 24, 2019, 11:55:40 am »


In the meanwhile I have got some success with the BJT version (2N3904 + BD139). I tested it upto 2A and it seems OK.

I had checked it on a meter and it showed ok I will get back with scope results next
 

Offline ZeroResistanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 585
  • Country: gb
Re: Correctly stabilize an opamp current source
« Reply #14 on: April 24, 2019, 02:06:36 pm »
Quote from: ZeroResistance link=topic=182637.msg2365155#msg2365155

I need a higher current so I'm gonna try a Sziklai pair version next.
Both images attached.
[/quote

However in hindsight I don't think it might work without certain modifications, considering that a Sziklai output is a PNP and and we would be putting the collector into the feedback loop. There is a phase shift involved here so it might oscillate.
CorrecT?
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Correctly stabilize an opamp current source
« Reply #15 on: April 27, 2019, 01:27:11 pm »
"Amazing drawing!"
The block fill was actually an accident, I was aiming to colour just the 1 or 2 pixel wide wires but missed and thought that'll do fine!

I use similar arrangements to "test" LEDs, up to 70V and/or 60A, I've only been up to 65V*16A so far because I've only got one 100 (Chinese)Watts COB.
Have you blown anything up yet. :)
« Last Edit: April 27, 2019, 01:33:32 pm by StillTrying »
.  That took much longer than I thought it would.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf