Author Topic: Very strange op amp ripple.  (Read 10026 times)

0 Members and 1 Guest are viewing this topic.

Offline OddballTopic starter

  • Contributor
  • Posts: 13
Very strange op amp ripple.
« on: January 07, 2015, 01:47:22 am »
Hello again, I'm using an op amp along with a zener diode and a darlington pair transistor on the output (2n3904 with 2n3055) with negative feedback to make a basic voltage divider. I am having a very strange ripple condition, that is I get the most ripple with light loads (like driving a LED) but if its supplying its full 350mA the ripple is so low I can't see it on my oscilloscope (rigol DS 1102e). This is the circuit:



Now I stumbled upon this fix while trying to actually wire up a bypass cap between +VCC and -VCC of the op-amp. Instead I put it across the ground and the non inverting input like this:



Why exactly does this fix the ripple? I tried a smaller value cap (0.68uF) and it actually increased ripple drastically.

Also please excuse me if this circuit is utter garbage because it probably is but some helpful pointers are welcomed.

Regards -oddball
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Very strange op amp ripple.
« Reply #1 on: January 07, 2015, 02:00:26 am »
Quote
Why exactly does this fix the ripple?

For the ac signal, you are essentially shorting the output.

Driving a reactive load (capacitor or inductor) is a big no-no. If it has to be done, it needs to be done with great care.
================================
https://dannyelectronics.wordpress.com/
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Very strange op amp ripple.
« Reply #2 on: January 07, 2015, 02:03:55 am »
When the voltage rises, the op amp can supply base current to the 2N3055. However, when the voltage falls, the op amp cannot quickly discharge the base to shut it off - this lack of full control over the output leads to instability. Adding a load to the 2N3055 causes its base current to increase, helping to discharge it.

Likely adding some capacitance has the same effect at the parts of the waveform that matter - the changing ones. However, as you found, capacitive loading also tends to severely destabilize a feedback circuit by introducing a delay into the loop.

Canonical way to fix this is to add a resistor between the 2N3055's base and its emitter - enough to conduct near the device's operating base current at all times. (Yes, this reduces the efficiency of the Darlington pair - ideally you'd conduct the full base current, doubling the base current requirements - and allowing the base to be symmetrically discharged; you might find this is too much and not at all necessary for practical purposes.)
« Last Edit: January 07, 2015, 02:11:35 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Very strange op amp ripple.
« Reply #3 on: January 07, 2015, 03:16:18 am »
Lack of proper supply decoupling also leads to instability. So does the OPAMP have at least 100n cap directly on its supply pins, and the whole circuit is decoupled with some electrolytic cap like a hundred micros?

And how did you get that 47k resistor in the base?

And as c4757p adviced, add Rbe resistors. About 100 ohms for 3055, a few kiloohms for the 3904 (not the best choice, BD139 should be more suitable, if you plan to draw more current from the output). The 47k resistor in the base must go out. No need for that, its jus too much big.

If you want to use that as a voltage regulator, you can also add some minimum capacitance on its output to increase stability.

When you get rid of oscillation (try also not to use too long wires to hook the power device), the nex step would be adding capacitance in parallel with the zener diode - it should decrease a little its noise voltage and increase PSRR performance. Also slows down the output voltage slope when powering on (depending on the capacity in parallel with the ZD).

You also wrote something about constant current. What? This circuit is not a current source, it is a voltage source. Placing a big base resistor there does not make it behave like a current source, but like a shit voltage source, because the opamp goes saturate rather quickly, so it cannot supply enough current to the base. So do you need a current or voltage source? This circuit is a voltage source. If you need to power leds directly, you need current source. That requires a little modification for the circuit. And no it is not a garbagge, it just need a little tweak. Also the modification for sroucing current is easy.
 

Offline OddballTopic starter

  • Contributor
  • Posts: 13
Re: Very strange op amp ripple.
« Reply #4 on: January 07, 2015, 03:43:22 am »
Constant current is the wrong term, I mean you can short the output directly to ground and get about 350mA of current max (like the constant current function on most lab power supplys). Changing the value of R2 changes the max current the load can draw. The whole point of the of the darlington pair is because the 2n3055 has a relatively low beta of 20. This means to get 350mA from it I would be drawing 17.5 mA from the op amp. This is fine for this implementation of the circuit but I plan to make it supply 2.5A of max current in the future when I get a proper transformer instead of the salvaged one I'm using right now in the circuit.

So at 2.5A I would be drawing 125 mA from the op amp which is much too high for a 741cn. This is why I made a darlington pair in the first place because the 2n3904 has moderately high beta of 100 and in a darlington transistor the total beta is a product of the two transistor's beta the total beta is 2,000. So then at a 2.5A load the op amp only needs to supply 1.25 mA. R2 was chosen in this case to limit the output to 350mA (actually its more around 380mA) because of power supply limitations. For the final version where the load can draw 2.5A (and yes that 2n3055 will have a big ole heatsink on it) R2 can be calculated by doing a KVL equation from the output of the op amp when its at VCC (or close to it, 741cn is not rail to rail) to the emitter of the 2n3055. With out writing out a bunch of math for the 2.5A version R2 would be 7.2k (or 7.15k for standard 1% resistors).

As for the power supply itself I implement a full wave bridge rectifier with 3400uF filter caps, the op amp has a 220nF capacitor directly on its supply pins and there is also a 4.7uF capacitor feeding this entire circuit (their are other parts which are not shown in the schematic).

Also I admit it is still a pretty poor current regulator (I guess you would call it, most power supplys do call it constant current) but it works for what I need it for which is momentary short circuits and load which may go slightly over the regulator's capability. Again there is a good chance most of what I just said is completely wrong but it does infact work as a current regulator and a voltage regulator.
« Last Edit: January 07, 2015, 12:23:14 pm by Oddball »
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Very strange op amp ripple.
« Reply #5 on: January 07, 2015, 04:03:08 am »
Do you mean R2 instead of R1?

There's a problem with using that to limit current - as transistors heat up, they become more efficient. Under a short circuit condition, the transistor will heat up, and then the current will increase! This often leads to catastrophic failure when not accounted for (see thermal runaway).

It could also contribute to instability, by causing loop delay (when combined with the capacitance of the transistors) in the same way as a capacitor at the output - if you insist on using this method to protect against quick short circuits, you may want to at least place a small capacitor (1nF? 10nF?) in parallel with it to bypass it for AC.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Tube_Dude

  • Regular Contributor
  • *
  • Posts: 115
  • Country: pt
Re: Very strange op amp ripple.
« Reply #6 on: January 07, 2015, 08:48:16 am »
Put a 1k resistor between the node that connect R1 to the Zenner and the OP-AMP non inverting input...
Jorge
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22384
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Very strange op amp ripple.
« Reply #7 on: January 07, 2015, 08:57:58 am »
Likely problems:

1. Make sure the zener is running enough current (it should be, if the supply is much over 7V or so).  Too little current and the zener has noise that resembles a random sawtooth waveform.

2. Add a series resistor to opamp -in, and a capacitor from -in to out.  Typical values would be 10k and 100pF.  (You may have even better results with a resistor also in series with the capacitor, maybe 1k-100k.  To determine, you want to test with an oscilloscope and function generator, replacing the zener source with a small amplitude square wave, superimposed on the same average level.)

3. The transistors are driven very weakly (47k?), and the second one has no turn-off action.  Transistors are voltage driven, not explicitly current driven.  You need a base-emitter resistor to bleed away charge that the first transistor delivers into the second.

Make sure the output has some minimum load current or resistance to ground, or else the voltage will rise up on its own and lose regulation.

If you don't need good regulation, you can run the transistor base directly from the zener diode.  The "softness" in regulation, due to the transistors not having an op-amp outside, is about 200mV of variation (no load to full load range).  Which is about the tolerance of the zener diode, so it's a tiny sacrifice for a big savings in parts count and cost.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline OddballTopic starter

  • Contributor
  • Posts: 13
Re: Very strange op amp ripple.
« Reply #8 on: January 07, 2015, 12:26:24 pm »
Do you mean R2 instead of R1?

There's a problem with using that to limit current - as transistors heat up, they become more efficient. Under a short circuit condition, the transistor will heat up, and then the current will increase! This often leads to catastrophic failure when not accounted for (see thermal runaway).

It could also contribute to instability, by causing loop delay (when combined with the capacitance of the transistors) in the same way as a capacitor at the output - if you insist on using this method to protect against quick short circuits, you may want to at least place a small capacitor (1nF? 10nF?) in parallel with it to bypass it for AC.
Yeah I meant R2 instead of R1.
Would thermal problems not be solved by a heatsink attached to the 2n3055?
 

Offline OddballTopic starter

  • Contributor
  • Posts: 13
Re: Very strange op amp ripple.
« Reply #9 on: January 07, 2015, 12:32:37 pm »
Likely problems:

3. The transistors are driven very weakly (47k?), and the second one has no turn-off action.  Transistors are voltage driven, not explicitly current driven.  You need a base-emitter resistor to bleed away charge that the first transistor delivers into the second.

Make sure the output has some minimum load current or resistance to ground, or else the voltage will rise up on its own and lose regulation.

Tim

The transistors are weakly driven because they are in a darlington configuration which produces a very high beta of 2000. because there is about a 1.4v drop across the base-emitter of the transistors combined the op amp can compensate for this with negative feedback. I'm still confused as the whole point of a emitter-base leg resistor.
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7909
  • Country: nl
  • Current job: ATEX product design
Re: Very strange op amp ripple.
« Reply #10 on: January 07, 2015, 12:36:26 pm »
Make sure the output has some minimum load current or resistance to ground, or else the voltage will rise up on its own and lose regulation.
This.
Your circuit cannot sink current, only source. The output is held at a constant voltage, any noise on the inverting input can close both transistor at light load. With the small cap you had a capacitive load, which made everything worse, because the opamp had to correct the noise much harder, while the bigger cap was working as a snubber (because of the series resistance of the cap), dissipating the noise.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Very strange op amp ripple.
« Reply #11 on: January 07, 2015, 02:25:50 pm »
Likely problems:

3. The transistors are driven very weakly (47k?), and the second one has no turn-off action.  Transistors are voltage driven, not explicitly current driven.  You need a base-emitter resistor to bleed away charge that the first transistor delivers into the second.

Make sure the output has some minimum load current or resistance to ground, or else the voltage will rise up on its own and lose regulation.

Tim

The transistors are weakly driven because they are in a darlington configuration which produces a very high beta of 2000. because there is about a 1.4v drop across the base-emitter of the transistors combined the op amp can compensate for this with negative feedback. I'm still confused as the whole point of a emitter-base leg resistor.

Big beta of the darlington is not an excuse for placing big base resistor there or even to try making a current source out of the circit by placing there base resistor. This is simply wrong. And as you make the modifications with the neccessary BE resistors, the beta will drop.

As it was explained, the BE resistor is needed to bleed away charge from the BE junction.  If you want, imagine the BE being a small capacitance, if it helps you to understand the problem.

Limiting the base current to make output current limit or current sourcing is baaaad idea. As it was also explained, as the transistor heats up, it increases gain so the output current so it is heated even more. In practice this leads to thermal runaway and catastrophic failure.

If you need to implement current limiting capability to your circuit, make it properly by using shunt resistance in the emitter of the power darlington and place there another transistor to sense voltage on the shunt.

 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: Very strange op amp ripple.
« Reply #12 on: January 07, 2015, 07:53:27 pm »
I thought 741 needed symmetric supply. I have built a similar circuit as a dummy load, with a LM358 (well decoupled of course, voltage reference also), but no Q2 base resistor (the ampop will do the current control, no need for the resistor), Q2 is a BD135 (it will be needed for a few A at the 2N3055, also because of power dissipated on Q2) and of course I have a current sensing shunt from Q1's emitter to GND, it's a dummy load (current sink) afterall. I admit I've never put the scope on it, I use it for DC with DMMs and don't see problems on that level but who knows what's really going on in there (been in the TODO list for years).
« Last Edit: January 07, 2015, 07:56:54 pm by nuno »
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Very strange op amp ripple.
« Reply #13 on: January 07, 2015, 08:19:06 pm »
" I thought 741 needed symmetric supply."  - as many things, "it depends". Here it is perfectly fine. Check the "input commonmode voltage range". In this circuit, we are perfectly inside that range.
 

Offline PChi

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: gb
Re: Very strange op amp ripple.
« Reply #14 on: January 07, 2015, 08:49:04 pm »
I am guessing that the problem is instability. Putting extra gain inside a loop that includes an operational amplifier can be a problem. Ok it is only current gain but the resistor R2 along with the capacitance of Q1 is going to add add phase shift. If there is any significant phase shift below 1 MHz then the loop is likely to oscillate.
As it appears you want to keep R2 for a very crude current limit could you add a capacitor across it of a few 100 pF?
The best solution is to use a part designed for the task like an LM723 or possibly an LM317.
 

Offline OddballTopic starter

  • Contributor
  • Posts: 13
Re: Very strange op amp ripple.
« Reply #15 on: January 08, 2015, 02:55:48 am »
Likely problems:

3. The transistors are driven very weakly (47k?), and the second one has no turn-off action.  Transistors are voltage driven, not explicitly current driven.  You need a base-emitter resistor to bleed away charge that the first transistor delivers into the second.

Make sure the output has some minimum load current or resistance to ground, or else the voltage will rise up on its own and lose regulation.

Tim

The transistors are weakly driven because they are in a darlington configuration which produces a very high beta of 2000. because there is about a 1.4v drop across the base-emitter of the transistors combined the op amp can compensate for this with negative feedback. I'm still confused as the whole point of a emitter-base leg resistor.

Big beta of the darlington is not an excuse for placing big base resistor there or even to try making a current source out of the circit by placing there base resistor. This is simply wrong. And as you make the modifications with the neccessary BE resistors, the beta will drop.

As it was explained, the BE resistor is needed to bleed away charge from the BE junction.  If you want, imagine the BE being a small capacitance, if it helps you to understand the problem.

Limiting the base current to make output current limit or current sourcing is baaaad idea. As it was also explained, as the transistor heats up, it increases gain so the output current so it is heated even more. In practice this leads to thermal runaway and catastrophic failure.

If you need to implement current limiting capability to your circuit, make it properly by using shunt resistance in the emitter of the power darlington and place there another transistor to sense voltage on the shunt.
What size does this resistor need to be and more importantly how would you calculate what it needs to be for a given circuit or is it more of a rule of thumb type of thing?
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Very strange op amp ripple.
« Reply #16 on: January 08, 2015, 05:45:10 pm »
The circuit does not need any base resistor. The base current is given by the load current, divided by the effective gain of the darlington pair.

But if you want to design there a proper current limiter with the shunt in emitter of the darl. pair as I've suggested, the resistor will be requred.

So do you want to put there current limiting? Y / N? Do you know what circuit shoud be used or do you need a little help designing that?

Inspiration:


Note: About 100 ohms shoud be in base of Q2! Rbias top end shoud be connected to the OPamp's output. Q1 is your darlington pair (with both transistors having the BE resistors, as we've talked about)
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Very strange op amp ripple.
« Reply #17 on: January 08, 2015, 06:27:49 pm »
Quote
The circuit does not need any base resistor.

The original circuit was to generate a constant current by generating a constant voltage, controlled by a voltage signal.

How would your circuit allow that?
================================
https://dannyelectronics.wordpress.com/
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Very strange op amp ripple.
« Reply #18 on: January 08, 2015, 06:56:14 pm »
That qustion doesn't make much sense. I assume const. voltage supply with current limit. Or does he need voltage controlled const. current supply?

Voltage and current both beeing constat, how would you do that supply?
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Very strange op amp ripple.
« Reply #19 on: January 08, 2015, 08:14:54 pm »
Quote
Or does he need voltage controlled const. current supply?

His very first post in this thread may help answer that question.
================================
https://dannyelectronics.wordpress.com/
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Very strange op amp ripple.
« Reply #20 on: January 08, 2015, 09:35:54 pm »
Then explain me that please, if you know such a supply design being constat both at voltage and current at the same time.  :palm:

Quote
I'm using an op amp along with a zener diode and a darlington pair transistor on the output (2n3904 with 2n3055) with negative feedback to make a basic voltage divider.

What is voltage divider then? How could that circuit divide voltage, if it is wired as weak voltage follower?

You seem to miss a lot of things... I assume you also missed that Oddball interchanged inverting and noninverting inputs of the opamp in his circuit description.

Or if you know better, please explain. (Or reread what I've written, I suspect you only watched pictures but haven't read)
« Last Edit: January 08, 2015, 10:13:37 pm by Yansi »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19920
  • Country: gb
  • 0999
Re: Very strange op amp ripple.
« Reply #21 on: January 09, 2015, 10:14:04 pm »
3. The transistors are driven very weakly (47k?), and the second one has no turn-off action.  Transistors are voltage driven, not explicitly current driven.  You need a base-emitter resistor to bleed away charge that the first transistor delivers into the second.
Oh dear, you'll be jumped on by certain people for saying things like that and we don't want a repeat of the other thread..  :-DD

Yes, the transistors have an intrinsic base-emitter capacitance which needs to be discharged in order to turn off the transistor and adding a resistor will cause this to happen much faster.
« Last Edit: January 09, 2015, 10:47:58 pm by Hero999 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf