Author Topic: PSU rails out of sync or biased wrong?  (Read 6251 times)

0 Members and 1 Guest are viewing this topic.

Offline ziplock9000Topic starter

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
PSU rails out of sync or biased wrong?
« on: January 25, 2017, 12:21:34 pm »
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 sine
As 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?


« Last Edit: January 25, 2017, 12:44:08 pm by ziplock9000 »
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2085
Re: PSU rails out of sync or biased wrong?
« Reply #1 on: January 25, 2017, 12:27:48 pm »
?
What are we looking at? It doesn't look much like the output of what a DC power supply should!
 

Offline ziplock9000Topic starter

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
Re: PSU rails out of sync or biased wrong?
« Reply #2 on: January 25, 2017, 12:30:30 pm »
?
What are we looking at? It doesn't look much like the output of what a DC power supply should!

I've updated my OP to hopefully make it clearer.
« Last Edit: January 25, 2017, 12:39:06 pm by ziplock9000 »
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: PSU rails out of sync or biased wrong?
« Reply #3 on: January 25, 2017, 01:07:10 pm »
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.)
The easiest person to fool is yourself. -- Richard Feynman
 

Offline ziplock9000Topic starter

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
Re: PSU rails out of sync or biased wrong?
« Reply #4 on: January 25, 2017, 01:15:32 pm »
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.)

1. 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)
« Last Edit: January 25, 2017, 01:19:20 pm by ziplock9000 »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: PSU rails out of sync or biased wrong?
« Reply #5 on: January 25, 2017, 02:36:32 pm »
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 RL of 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
 

Offline ziplock9000Topic starter

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
Re: PSU rails out of sync or biased wrong?
« Reply #6 on: January 25, 2017, 03:04:07 pm »
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 RL of 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

Doesn'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 = 55x

If 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
 

Offline ziplock9000Topic starter

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
Re: PSU rails out of sync or biased wrong?
« Reply #7 on: January 25, 2017, 03:27:28 pm »
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.
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: PSU rails out of sync or biased wrong?
« Reply #8 on: January 25, 2017, 03:31:39 pm »
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.

I 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:

Nandemo wa shiranai wa yo, shitteru koto dake.
 
The following users thanked this post: ziplock9000

Offline grifftech

  • Frequent Contributor
  • **
  • Posts: 369
  • Country: us
    • youtube channel
Re: PSU rails out of sync or biased wrong?
« Reply #9 on: January 25, 2017, 04:08:49 pm »
what image?
 

Offline ziplock9000Topic starter

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
Re: PSU rails out of sync or biased wrong?
« Reply #10 on: January 25, 2017, 04:13:04 pm »
what image?
I'm not sure which one you're referring to. There's one in post #1, post #4 and post #6
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: PSU rails out of sync or biased wrong?
« Reply #11 on: January 25, 2017, 10:40:43 pm »

1. 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.

You 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
 
The following users thanked this post: ziplock9000

Offline ziplock9000Topic starter

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
Re: PSU rails out of sync or biased wrong?
« Reply #12 on: January 26, 2017, 11:58:17 am »
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?
 

Offline grifftech

  • Frequent Contributor
  • **
  • Posts: 369
  • Country: us
    • youtube channel
Re: PSU rails out of sync or biased wrong?
« Reply #13 on: January 27, 2017, 04:16:38 pm »
what image?
I'm not sure which one you're referring to. There's one in post #1, post #4 and post #6
I don't see any at all
 

Offline ziplock9000Topic starter

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
Re: PSU rails out of sync or biased wrong?
« Reply #14 on: January 28, 2017, 04:57:53 pm »
what image?
I'm not sure which one you're referring to. There's one in post #1, post #4 and post #6
I don't see any at all
Dunno what to tell you mate. They are only stored on imgur, nothing weird.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3240
  • Country: gb
Re: PSU rails out of sync or biased wrong?
« Reply #15 on: January 28, 2017, 10:33:15 pm »
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.
 

Offline ziplock9000Topic starter

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
Re: PSU rails out of sync or biased wrong?
« Reply #16 on: January 28, 2017, 10:39:25 pm »
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
« Last Edit: January 28, 2017, 10:44:28 pm by ziplock9000 »
 

Offline grifftech

  • Frequent Contributor
  • **
  • Posts: 369
  • Country: us
    • youtube channel
Re: PSU rails out of sync or biased wrong?
« Reply #17 on: January 31, 2017, 04:11:54 pm »
what image?
I'm not sure which one you're referring to. There's one in post #1, post #4 and post #6
I don't see any at all
Dunno what to tell you mate. They are only stored on imgur, nothing weird.
Blocked by firewall at school
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: PSU rails out of sync or biased wrong?
« Reply #18 on: January 31, 2017, 04:41:07 pm »
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

I 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?
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19520
  • Country: gb
  • 0999
Re: PSU rails out of sync or biased wrong?
« Reply #19 on: January 31, 2017, 06:00:31 pm »
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.

I 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:

I 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf