Power Supply design advice - Page 1
Forum section: electronics / projects

author: Saitama
author_rank: Contributor
timestamp: February 27, 2021, 05:35:50 pm
content: Hello! I designed this circuit for a bench supply and I ran into a problem:The output of the U2A Op-Amp is somewhere between 14V to 17V even though the pot outputs 2V and the U1A outputs about 3.6V. I have replaced the LM358, thinking it was faulty, but sadly, it didn't fix anything.For the time being, I haven't added the caps because I ran out of them and they are going to come in tomorrow.I didn't add some parts (voltmeter and things like those) to make the main part more "visible".Also, I know that the OP07 isn't a good choice for this application, but I really don't want to wait a week or two to finish the project.If you have any advice, please let me knowThe schematic:

author: gnuarm
author_rank: Super Contributor
timestamp: February 27, 2021, 08:52:04 pm
content: I'm not sure what U2A is supposed to be doing, but running the output voltage to the rail seems right for this circuit. U1 measures the current in R1||R2 by measuring the voltage. Referenced to ground the voltage across them is amplified by 10 at the output pin 6, so 5V/amp. U2A is an open loop op amp with high gain, so the output will be at either rail. The feedback capacitor may be intended to prevent oscillations, not sure. In effect this amp acts as a comparator. When the current in R1||R2 is above a threshold the output of U2A is ground, when below the threshold the output of U2A is near the positive rail. I don't see power connections to U2, so no way to know what that voltage would be.When the output of U2A is low, it steals the output current of U3A removing the drive from Q1 turning off the FET or at least limiting the output current to the threshold level. There is a lot of gain in the circuit so this may or may not oscillate.Ok, now that I understand the circuit... If the inputs to U2A are as you say, the inverting input is 3.6V and the non-inverting input is 2.4V the output should be low. Check the other pins on the chip. Is the ground pin at ground? What is the other op amp in the package doing? Did you measure all 8 pin voltages directly on the pins? This will help find errors in connectivity.

author: Saitama
author_rank: Contributor
timestamp: February 28, 2021, 12:08:58 pm
content: The second Op-Amp in the package is regulating the voltage from Vin to 1/2 Vin (to give me some extra resolution). I have not checked the voltages directly on the pins, but through some jumper wires.Now that I think about it, my breadboard is very low quality and the jumpers aren't exactly any better, so in theory the weird behavior might be because of a connection, or a bad row on the board. In theory, everything should be fine, so if I build it onto a perfboard, it might work as intended.Thanks for replying and giving me some advice!

author: gnuarm
author_rank: Super Contributor
timestamp: February 28, 2021, 05:40:03 pm
content: Quote from: Saitama on February 28, 2021, 12:08:58 pmThe point of constructing a test rig is to test. If it doesn't work there is no point in ignoring that. Are you using an oscilloscope? A circuit like this with high gain can oscillate which will produce erroneous voltages on a meter. I just helped someone with a power supply design and no scope who had oscillations mucking up his readings.If the voltages on the chip indicate a bad chip, it is almost always something else, typically connections. Check the voltages on the chip pins, but also check every pin on the part. If the other pins are badly driven it can wreak havoc with every pin on the chip. It's almost certainly a connection problem.

author: TimFox
author_rank: Super Contributor
timestamp: February 28, 2021, 06:00:31 pm
content: Typically, when feedback circuits of this general type oscillate, it is not a small sine wave on a normal DC level, but a horribly distorted large-amplitude waveform that shifts the DC (mean) voltage measured on a voltmeter. An oscilloscope is necessary to check for this. One of my first circuits, a discrete transistor RIAA amplifier, oscillated in its first incarnation. Reviewing the design calculations, I found no phase margin at roughly 1 MHz, which I fixed by changing the compensation capacitor that determined the frequency response of the open-loop gain. The actual symptom of the oscillation was an almost rail-to-rail voltage swing, visible on my Simpson 260 analog voltmeter, at roughly 1 Hz—a highly non-linear oscillation whose frequency gave no useful clues to the root problem at much higher frequencies.

author: Saitama
author_rank: Contributor
timestamp: February 28, 2021, 07:47:23 pm
content: I wasn't using a scope.I just finished building the circuit on a perfboard, but I am just too tired to do anything else today.I will write an update if it works.Thanks for all the help!

author: Saitama
author_rank: Contributor
timestamp: February 28, 2021, 07:50:46 pm
content: I have a scope and am planning to probe around, but today I'm just too tired to do so.I have added some caps to the circuit and built it onto a perfboard. I really hope it works, but from my experience, nothing works on the first time lol.Thanks for helping me out and I'll write update you guys soon.

author: Saitama
author_rank: Contributor
timestamp: March 01, 2021, 04:57:15 pm
content: I checked everything and everything works! The voltage regulation is ok and so is the current regulation, or so I thought before checking it with a scope. While limiting the current, output voltage looks awful, it's oscillating really bad. Any suggestions on how I can stop this from happening?

author: kallek
author_rank: Regular Contributor
timestamp: March 01, 2021, 05:46:07 pm
content: For me it looks like current limiter is too slow. Try with smaller c1 value.And maybe try C2 disconnected.

author: gnuarm
author_rank: Super Contributor
timestamp: March 01, 2021, 06:44:30 pm
content: Is the current also oscillating? Is the current close to the threshold? The noise doesn't look like normal oscillations which would be more periodic, but that might be aliasing in your scope. Is there a characteristic frequency? How does it look zoomed in time wise?The thing that bugs me about this is that the voltage drive will be trying to overcome the current drive. So one will max out at the negative rail and the other will max out at the positive rail, no? What do the outputs of U2A and U3A look like on the same display? I'm having trouble picturing this in my mind with a balanced result. I think the anode of D1 should be connected to the reference voltage at the wiper of RV2. The trouble is it would never pull down to ground. This may need another op amp to combine the two controls in a rational way.

author: Saitama
author_rank: Contributor
timestamp: March 03, 2021, 07:14:30 pm
content: Hey guys! Sorry for not posting an update soon.I've tried everything and it seems like the Op-Amp's low speed was the problem, which was caused by the capacitors.I have removed the caps, but while testing, I fried the transistor and I don't have a suitable replacement.Since I have no other option, I'll buy a new one and a proper differential amplifier while at it.Thanks for all your help!

author: xavier60
author_rank: Super Contributor
timestamp: March 03, 2021, 11:26:29 pm
content: For C1 to function as a compensation capacitor, there needs to be a resistor in series with U2A's input.

author: gnuarm
author_rank: Super Contributor
timestamp: March 04, 2021, 06:50:36 am
content: How did you determine the op amp low speed was to blame? It is usually the high speed devices that oscillate. The capacitor you removed is there to slow the response so it won't oscillate.

author: Saitama
author_rank: Contributor
timestamp: March 04, 2021, 12:36:25 pm
content: Oh, yeah I got it backwards lol.