PSU rails out of sync or biased wrong? - Page 1
Forum section: electronics / beginners

author: ziplock9000
author_rank: Regular Contributor
timestamp: January 25, 2017, 12:21:34 pm
content: I've converted an old ATX PSU so it can be used for projects along side my proper bench PSU. I've added PTC resettable fuses, banana sockets, an LEDs and a switch into a project box. This is quite convenient as I'm messing around with op-amps and the -ve rails are useful for that.The input signal to the op amp is a pure sine wave around common GND from a signal generator.The input power to the op amp is from the ATX PSU on the -5v rail is rated at 300mA and +5v rail is rated at 35A and GND goes to common GND.The output signal from the opamp is distorted in an unusual way as seen in this image when a small speaker is on the output.But when I remove the speaker and any loads, the op amp output waveform is a perfect sineAs you can see, the input power supply rails are effecting my output signal in an unusual way only when a speaker is present.Looking at the shape, it doesn't seem to be a sync problem. It looks like the +ve rail is biased low and the -ve rail is biased high by maybe a volt.What's going on?

author: Andy Watson
author_rank: Super Contributor
timestamp: January 25, 2017, 12:27:48 pm
content: ?What are we looking at? It doesn't look much like the output of what aDCpower supply should!

author: ziplock9000
author_rank: Regular Contributor
timestamp: January 25, 2017, 12:30:30 pm
content: Quote from: Andy Watson on January 25, 2017, 12:27:48 pmI've updated my OP to hopefully make it clearer.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: January 25, 2017, 01:07:10 pm
content: 1. It might be helpful if you showed the exact schematic for the op-amp part of your test. Part number, feedback resistors if any, etc.2. You can use the other channel (CH1) to monitor the + and - 5v DC supply voltages (one at a time of course) to see if the supply is sagging or has other problems when your circuit is producing the questionable waveform on CH2. (Don't forget to select "DC" input coupling on CH1.)

author: ziplock9000
author_rank: Regular Contributor
timestamp: January 25, 2017, 01:15:32 pm
content: Quote from: alsetalokin4017 on January 25, 2017, 01:07:10 pm1. I'm fairly certain the circuit itself is not the issue, but the rails in the ATX PSU, but I'm obviously not sure. So here goes.As mentioned, the strangeness only occurs when a small speaker is connected to the outputs (not in diagram), otherwise the output waveform is perfect.2. Unfortunately I can't use channel 1 as it's dead (related to another post and looking for a replacement part)

author: rstofer
author_rank: Super Contributor
timestamp: January 25, 2017, 02:36:32 pm
content: Hysteresis in the magnet portion of the speaker?The speaker is probably overloading the op amp. A reasonable output current is < 10 mA.It looks like you are clipping on the negative portion. You need a little less gain.The datasheet seems to imply that you can't get within 2V of the rails. So, your maximum output is +- 3.0V. And that swing is with an RLof 2k ohms.It seems you are trying to get to a gain of 1 but you didn't say much about the input signal voltage.https://www.fairchildsemi.com/datasheets/KA/KA324.pdf

author: ziplock9000
author_rank: Regular Contributor
timestamp: January 25, 2017, 03:04:07 pm
content: Quote from: rstofer on January 25, 2017, 02:36:32 pmDoesn't hysteresis only cause a sync delay.. how would that cause the little lines around 0v?Yeah I was playing around with various resistors, gains, input voltages etc. So there's clipping at the bottom as you mentioned in that specific image. Nothing however seems to remove the output "line" portion of the signal at 0v.In that original screenshot the gain is 150K/2.7K = 55xIf I use 150K/150K=1x gain I still get the line (albeit distorted) as shown in this image. I adjusted the input voltage so no clipping occurs:Tiny speaker is only drawing ~2.2mA

author: ziplock9000
author_rank: Regular Contributor
timestamp: January 25, 2017, 03:27:28 pm
content: I've taken the +5/-5/GND ATX power supply out of the equation and plugged back in my single rail bench power supply +5/GND. Although -ve clipping occurs as you'd expect, the signal is spot on even with the load (speaker).So I'm just going to chalk this up to a weirdly behaving old Dell ATX PSU when you use the different rails at the same time.

author: newbrain
author_rank: Super Contributor
timestamp: January 25, 2017, 03:31:39 pm
content: Quote from: ziplock9000 on January 25, 2017, 03:27:28 pmI imagine that the speaker was connected to GND in your first experiments, and it's now connected to the 0V rail.Maybe this is relevant:

author: grifftech
author_rank: Frequent Contributor
timestamp: January 25, 2017, 04:08:49 pm
content: what image?

author: ziplock9000
author_rank: Regular Contributor
timestamp: January 25, 2017, 04:13:04 pm
content: Quote from: grifftech on January 25, 2017, 04:08:49 pmI'm not sure which one you're referring to. There's one in post #1, post #4 and post #6

author: rstofer
author_rank: Super Contributor
timestamp: January 25, 2017, 10:40:43 pm
content: Quote from: ziplock9000 on January 25, 2017, 01:15:32 pmYou don't show any decoupling capacitors on the power pins of the op amp. I would probably use 0.1 ufd and 1 ufd (maybe more) at each pin.http://electronics.stackexchange.com/questions/237079/how-to-chose-the-right-decoupling-bypass-capacitor-variant-for-opamp-power-rails/237088

author: ziplock9000
author_rank: Regular Contributor
timestamp: January 26, 2017, 11:58:17 am
content: Thanks mate.What's the difference between single rail and dual rail op amps if the single rail versions don't allow -ve output voltages from -ve input voltages? I thought that was the whole point of them?

author: grifftech
author_rank: Frequent Contributor
timestamp: January 27, 2017, 04:16:38 pm
content: Quote from: ziplock9000 on January 25, 2017, 04:13:04 pmI don't see any at all

author: ziplock9000
author_rank: Regular Contributor
timestamp: January 28, 2017, 04:57:53 pm
content: Quote from: grifftech on January 27, 2017, 04:16:38 pmDunno what to tell you mate. They are only stored on imgur, nothing weird.

author: mikerj
author_rank: Super Contributor
timestamp: January 28, 2017, 10:33:15 pm
content: The LM324/KA324 is pretty useless for audio circuits as it has a class B type output which will give exactly the kind of crossover distortion you have observed. By moving to a single rail and tying the speaker to ground you have forced the op-amp output stage to work in class A (it will always be sourcing current, never sinking it) so the distortion is removed. However note that this means there is always a DC current running through the speaker, something that should normally be avoided.The usual workaround for these when used in small signal applications is to use a pull-up resistor on the output to force class A operation, though in this case the output only sinks current, never sources it. This is a better arrangement as the LM/KA324 can sink more current than it can source. The equivalent for your circuit would be returning the speaker to +5v instead of 0v.What impedance is the speaker? If it's a typical 8 ohm speaker then such a low power op-amp can't be expected to drive it directly, you would need high current buffer or better still a proper audio power amp to do this.

author: ziplock9000
author_rank: Regular Contributor
timestamp: January 28, 2017, 10:39:25 pm
content: Yeah it's an 8ohm speaker.Since my original post I've come to the conclusion I need two separate amplifiers. One to take very small voltages to line level and an audio amplifier to take line level up to power a modest speaker.The former will be in a metal project box for shielding with BNC connectors

author: grifftech
author_rank: Frequent Contributor
timestamp: January 31, 2017, 04:11:54 pm
content: Quote from: ziplock9000 on January 28, 2017, 04:57:53 pmBlocked by firewall at school

author: Buriedcode
author_rank: Super Contributor
timestamp: January 31, 2017, 04:41:07 pm
content: Quote from: ziplock9000 on January 28, 2017, 10:39:25 pmI think you've discovered that opamps have limited output power - they can only provide so much current, and speakers can take a fair bit of current, and also they're an inductive load. 'Small-signal' amplifiers do not require high power outputs - they are there to amplify, attenuate an input voltage, not 'drive' anything. Speaker amplifiers are power amplifiers, whilst they can amplify the input signal their main job is to take an input voltage and 'power' the speaker with an output stage that can provide more than a few mA. Power amps can have a gain of 1, so the output signal is the same level as input, the difference being it can take a weak signal as a reference, and have enough current output to power things from it, namely speakers. (not the best explanation!)I think you should google for introduction to opamps. Operation amplifiers have many properties, and for students it can be fruitful to understand the 'ideal opamp', and then find out what makes real-world opamps non-ideal.The difference between a 'single supply' opamp and a 'dual supply' isn't so much about how the opamp operates, but rather the limitations of its inputs and outputs. Some opamps cannot sense inputs close to its power rails, others can sense down to their Negative rail, but only within 1.5-2V of its positive rail. It is a similar deal with outputs.The LM324 is the quad version of the LM358, whose inputs and output can reach '0V' (note, this is the negative rail of the opamp, not necessarily 0V in circuit!) but cannot output voltages higher than its positive rail - ~1.5V. It can be called a 'single supply' opamp, because you can hook its negative power rail to 0V, and positive to say, 5V, then any AC waveform on the input should be biased to above the negative rail - otherwise the negative side of the AC waveform will go below 0V (its negative rail) and so, cannot be sensed. The output similarly, can go from 0V to ~3.5V. So the system only requires a single 5V power supply, but its input and output can only go between 0 and 3.5V and so any AC waveform has to be biased in-between these so it can go above and below this bias point, say 1V to 3V, baised at 2V.Other opamps can have their inputs/outputs hit (or get very close to) the positive rail, but only within 2V of the negative. And then there are 'rail-to-rail' opamps, where either the inputs, or outputs, or both, can get quite close to the power rails - handy for battery powered applications where its powered by lower voltage, say 3V. Often these are specifically designed for low voltage (max power voltage 5-12V), where-as opamps that have IO that can only get within ~2V of either power rail, can operate from +/- 15V supplies.Dual supplies can greatly simplify matters as everything is referenced to 0V/GND. In 'single supply' opamp circuits, everything is referenced to a 'virtual ground' - a biased point somewhere between the power rails, often VCC/2. For Audio, which of course is all AC, having dual rails makes life easier. If you used a single supply to power a speaker (very common) then the output 'sits' at half the power supply voltage, so to drive a speaker, one uses a fairly large output capacitor to block this DC bias - so it sits at 0V/GND.I'm just rambling now, food for thought?

author: Zero999
author_rank: Super Contributor
timestamp: January 31, 2017, 06:00:31 pm
content: Quote from: newbrain on January 25, 2017, 03:31:39 pmI think you're right. It's most likely crossover distortion.Use a power amplifier to drive the speaker, such as the LM386, not the LM358 which was only ever designed to be used to drive small loads at DC.