Author Topic: Noise on audio circuit when powered externally  (Read 7925 times)

0 Members and 1 Guest are viewing this topic.

Offline alexigTopic starter

  • Contributor
  • Posts: 40
  • Country: au
Noise on audio circuit when powered externally
« on: October 23, 2014, 11:42:27 am »
Hi all,

I'm pretty new to audio circuits in general and am working on a simple microphone boost circuit which works well with a 3V coin cell however when I switch to USB to power it (battery removed, of course), there's a bit of noise in the 200Hz to 10KHz range, with a peak at ~2.5KHz and I am at a loss as to how to filter it. I also build a PCB with it but have the same issues.

The USB goes to an 3V LDO and have tried multi-stage 220 ohm/100uF RC filters, 15uH / 47uF LC filters, SMD ferrite beeds (taken from other boards), a thick winded choke (taken from an ATX power supply), all on the USB before the LDO but none seem to work.

I salvaged an isolated DC-DC converter (NMA0505S) and can see the noise has reduced a little bit, but it's really just shifted to a lower frequency now - peak from 2.5KHz to peak at 1KHz now.

Am I asking too much gain on the opamp? Should I add a filter to the opamp itself? Or am I just missing something?

I'm using a program on the iPhone called N-track Tuner, no mic is connected and no filtering are applied to these.
Here's the how it looks with the coin cell which looks good:


With USB:


With isolated DC-DC converter:


Schematic: (0.1uF are ceramics and 10uF are electrolytics)


Thanks,
Alex
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Noise on audio circuit when powered externally
« Reply #1 on: October 23, 2014, 11:58:20 am »
Ferrite beads and small chokes won't have much effect if your noise peak is at a couple of KHz.

You'll need to check your ground plane/traces carefully (especially around the regulators), use bulk capacitance and possibly RC type filters. Look up gyrators too.

Chokes are double-edged sword, whilst an enormous choke will get rid of alot of unwanted's, it is also a great device for picking up and coupling stray magnetic fields onto your rails.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: Noise on audio circuit when powered externally
« Reply #2 on: October 23, 2014, 12:25:25 pm »
You could try a common mode choke (a few mH) directly after the USB connector. If that's not sufficient add a Schottky diode and a large electrolytic cap behind that. The diode keeps the filter and decoupling cap local.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3233
  • Country: gb
Re: Noise on audio circuit when powered externally
« Reply #3 on: October 23, 2014, 12:33:23 pm »
Have you looked at the noise level on the USB power supply?  There are a few potential issues, in order of importance:

1) Your 1/2 Vcc divider (R1,R6,C2) provides only ~10dB attenuation at 1kHz
2) The ripple rejection of the LP2950 drops pretty rapidly above 1KHz
3) The LMV358 doesn't have particularly great power supply rejection.

I'd start by increasing R1, R6 and C2.  Going up by a factor of 10 for all three parts will give around 50dB attenuation at 1k.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4208
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Noise on audio circuit when powered externally
« Reply #4 on: October 23, 2014, 01:00:53 pm »
One beer says the noise is getting in via your phantom power circuit.

Instead of joining the top end of R4 directly to VCC, which is coupling any power supply noise directly into the audio path with no PSRR at all, connect it via an RC filter.

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3233
  • Country: gb
Re: Noise on audio circuit when powered externally
« Reply #5 on: October 23, 2014, 03:03:25 pm »
One beer says the noise is getting in via your phantom power circuit.

Instead of joining the top end of R4 directly to VCC, which is coupling any power supply noise directly into the audio path with no PSRR at all, connect it via an RC filter.

Very good point, didn't even notice R4!
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16272
  • Country: za
Re: Noise on audio circuit when powered externally
« Reply #6 on: October 23, 2014, 08:47:14 pm »
You have about a half volt of allowable headroom on the LDO, so try a RC input filter on it, probably a 2R to 10R resistor and a 100 uf capacitor at the chip input. That will reduce supply noise a lot, and as a plus it provides inrush limiting on the USB line so you can use a 220uF capacitor to provide extra filtering.

With the phantom power as AndyC says, take R4 and split it into 2 resistors, 470R to Vcc with a 1k resistor to the mic, with a 47uf capacitor between the junction of the 2 resistors and ground. That should provide the decoupling you need.
 

Offline Conrad Hoffman

  • Super Contributor
  • ***
  • Posts: 1928
  • Country: us
    • The Messy Basement
Re: Noise on audio circuit when powered externally
« Reply #7 on: October 23, 2014, 08:53:10 pm »
Can you show a layout? Do you have a ground plane or separate traces? A bad ground strategy could cause what you see.
 

Offline TonyStewart

  • Contributor
  • Posts: 44
  • Country: ca
  • just another carbon life form
Re: Noise on audio circuit when powered externally
« Reply #8 on: October 25, 2014, 05:32:38 am »
2 beers says it is lack of grounding in a laptop powered by a SMPS to USB port and the poor CMRR causes differential noise on the preamp.  Ground the USB to earth ground or connect VGA to an external monitor which is already grounded.
Tony Stewart EE in bleeding edge R&D, TE and Mfg since 1975.
 

Offline alexigTopic starter

  • Contributor
  • Posts: 40
  • Country: au
Re: Noise on audio circuit when powered externally
« Reply #9 on: October 25, 2014, 05:41:09 am »
Thanks all for your replies, I've put everything back on the breadboard again.

You could try a common mode choke (a few mH) directly after the USB connector. If that's not sufficient add a Schottky diode and a large electrolytic cap behind that. The diode keeps the filter and decoupling cap local.
I've tried a BAT42 schottky diode with a 470uF cap, but there was no noticeable difference.


Instead of joining the top end of R4 directly to VCC, which is coupling any power supply noise directly into the audio path with no PSRR at all, connect it via an RC filter.
With the phantom power as AndyC says, take R4 and split it into 2 resistors, 470R to Vcc with a 1k resistor to the mic, with a 47uf capacitor between the junction of the 2 resistors and ground. That should provide the decoupling you need.
Thanks Andy and Sean, this has helped a bit, I also added a 470uF to the LDO's output which also helped greatly.

Before on breadboard:


After 470uF:


After 470uF and RC filter on Mic:


And it drops even more if actually touch the phone:


It sounds better now, there is a tiny bit of noise but I can live with that.

Now the next problem is if you plug in the iPhone USB to the PC, it makes everything worst, haha -


I think I'll add the 470uF and Mic RC filter on the PCB and see if anything changes.
Edit - Here's the noise on the PCB now (without phone connected to PC), not as good as on the breadboard for some reason but still passable:


Have you looked at the noise level on the USB power supply?  There are a few potential issues, in order of importance:

1) Your 1/2 Vcc divider (R1,R6,C2) provides only ~10dB attenuation at 1kHz
2) The ripple rejection of the LP2950 drops pretty rapidly above 1KHz
3) The LMV358 doesn't have particularly great power supply rejection.

I'd start by increasing R1, R6 and C2.  Going up by a factor of 10 for all three parts will give around 50dB attenuation at 1k.
2) and 3) - Thanks, noted. With the LMV358, were you looking at the -kSVR or something else?

After I add the 470uF and Mic RC filter, I increased R1, R6 and C2 by 10x except for R6 which only did 5x and it's kind of just increased everything a bit -



You have about a half volt of allowable headroom on the LDO, so try a RC input filter on it, probably a 2R to 10R resistor and a 100 uf capacitor at the chip input. That will reduce supply noise a lot, and as a plus it provides inrush limiting on the USB line so you can use a 220uF capacitor to provide extra filtering.

After I add the 470uF and Mic RC filter, I tried 10R and 100uF at the LDO input but it didn't change it much, however stranglely enough if I try it on the output, it's reduced it by a small amount (compared to the after 470uF and Mic RC filter) though I get waves appearing now -



Can you show a layout? Do you have a ground plane or separate traces? A bad ground strategy could cause what you see.
Sure, the USB connector's isn't connected to ground, I have tried with a wire and it hasn't made any difference.
« Last Edit: October 25, 2014, 07:22:21 am by alexig »
 

Offline TonyStewart

  • Contributor
  • Posts: 44
  • Country: ca
  • just another carbon life form
Re: Noise on audio circuit when powered externally
« Reply #10 on: October 25, 2014, 09:08:21 am »


Quote from: TonyStewart on Today at 04:32:38 PM
2 beers says it is lack of grounding in a laptop powered by a SMPS to USB port and the poor CMRR causes differential noise on the preamp.  Ground the USB to earth ground or connect VGA to an external monitor which is already grounded.


It still looks like common mode noise to me which due to inbalance gets converted into a differential noise.  Touching it only susbtantiates it for me. Grounding it, may not be an option but it will work. The fix is to raise the CM impedance with a large ferrite high mu core around the mic. cable.


Tony Stewart EE in bleeding edge R&D, TE and Mfg since 1975.
 

Offline alexigTopic starter

  • Contributor
  • Posts: 40
  • Country: au
Re: Noise on audio circuit when powered externally
« Reply #11 on: October 25, 2014, 10:17:51 am »
2 beers says it is lack of grounding in a laptop powered by a SMPS to USB port and the poor CMRR causes differential noise on the preamp.  Ground the USB to earth ground or connect VGA to an external monitor which is already grounded.


It still looks like common mode noise to me which due to inbalance gets converted into a differential noise.  Touching it only susbtantiates it for me. Grounding it, may not be an option but it will work. The fix is to raise the CM impedance with a large ferrite high mu core around the mic. cable.


Hmm I tried to replicate it but couldn't, touching it again made no difference.

However what I did notice is that if I used a 220R with 47uF capacitor after the LDO, all the noise is gone - very strange as I was getting the little waves before.

I can now take out the 470R with 47uF capacitor and the 470uF capacitor on the LDO output and it still works great! I made the change on the PCB and it is also working well and even tried it on a laptop with the AC adapter (it's 2 pin) plugged into another socket in the house. I guess I must have had something odd happening on the breadboard.

I just re-testing the 220R with 47uF capacitor this time before the LDO and I get all the noise back, so it must be the LDO generating all the noise!

Here's how it looks now, all good:


And I think it's just a specific USB port on my computer when I also plug in the phone, the front ones that give the worst noise, the ones on the back are better:
« Last Edit: October 26, 2014, 04:04:37 am by alexig »
 

Offline krivx

  • Frequent Contributor
  • **
  • Posts: 765
  • Country: ie
Re: Noise on audio circuit when powered externally
« Reply #12 on: October 25, 2014, 01:37:14 pm »
Front USB ports on desktops are often just extension cables running through the case (can picking up noise as they go)
 

Offline Legit-Design

  • Frequent Contributor
  • **
  • Posts: 562
Re: Noise on audio circuit when powered externally
« Reply #13 on: October 25, 2014, 02:01:26 pm »
So you are powering audio circuit from computer that is running and also have the audio coming from the same computer or phone connected to that computer through usb ground. Audio jacks have ground and computer power supply has ground. What you are getting is a ground loop.
 

Offline Conrad Hoffman

  • Super Contributor
  • ***
  • Posts: 1928
  • Country: us
    • The Messy Basement
Re: Noise on audio circuit when powered externally
« Reply #14 on: October 25, 2014, 07:16:13 pm »
Read the data sheet on the 2950 concerning the output capacitor. It has to be controlled esr, like a tantalum, or a ceramic with a low value series resistor. It sounds like this part can easily oscillate with the wrong output cap. Also, the cap needs to be right at the regulator, not down a trace somewhere. I also suspect the ground loop problem, but fix the reg first.
 

Offline bigsky

  • Regular Contributor
  • *
  • Posts: 134
Re: Noise on audio circuit when powered externally
« Reply #15 on: October 25, 2014, 08:02:02 pm »
One beer says the noise is getting in via your phantom power circuit.
Technically this is not phantom power, but what is termed plug-in power or electret power. It's a rather ill-defined system - there's no standard for the voltage or the source resistor (but 1k5 seems a bit on the low side).

There's an easy way to see if the mic power is contributing noise - remove R4 and connect a dynamic microphone to the input. Or, if you want a higher input level, try it with a condenser mic that has a built in battery.
 

Offline alexigTopic starter

  • Contributor
  • Posts: 40
  • Country: au
Re: Noise on audio circuit when powered externally
« Reply #16 on: October 26, 2014, 04:39:33 am »
So you are powering audio circuit from computer that is running and also have the audio coming from the same computer or phone connected to that computer through usb ground. Audio jacks have ground and computer power supply has ground. What you are getting is a ground loop.

At first I was testing powering the audio circuit by USB and just having the iPhone running from batteries, once the LDO problem was solved, the new problem is now when plugging in the iPhone USB to the PC.

Read the data sheet on the 2950 concerning the output capacitor. It has to be controlled esr, like a tantalum, or a ceramic with a low value series resistor. It sounds like this part can easily oscillate with the wrong output cap. Also, the cap needs to be right at the regulator, not down a trace somewhere. I also suspect the ground loop problem, but fix the reg first.

I've tried a 33uF tantalum with and without a 1R series resistor, the noise is only a little lower than the "Before on breadboard" picture.

I'll start looking into ground loop issues, thanks all.
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Noise on audio circuit when powered externally
« Reply #17 on: October 26, 2014, 04:47:07 am »
10uF seems remarkably small for the power supply bulk filter capacitor.
Of course, you don't need anything larger when operating on the battery.
But when operating on external power, I would find that very suspicious.
 

Offline TonyStewart

  • Contributor
  • Posts: 44
  • Country: ca
  • just another carbon life form
Re: Noise on audio circuit when powered externally
« Reply #18 on: October 27, 2014, 04:38:22 am »
The LP2950 is a very tight stable little 100mA regulator. There are some design constraints, I assumed the designer had already read in the datasheet

 
Code: [Select]
For ceramic capacitors, the low ESR produces a zero at a frequency that is too high to be useful, so meaningful
phase lead does not occur. A ceramic output capacitor can be used if a series resistance is added
(recommended value of resistance about 0.1R to 2R) to simulate the needed ESR. Only X5R, X7R, or better,
MLCC types should be used, and should have a DC voltage rating at least twice the VOUT(NOM) value.

At lower values of output current, less output capacitance is required for stability. The capacitor can be reduced
to 0.33 uF for currents below 10 mA or 0.1 uF for currents below 1 mA. Using the adjustable versions at voltages
below 5V runs the error amplifier at lower gains so that more output capacitance is needed. For the worst-case
situation of a 100 mA load at 1.23V output (Output shorted to Feedback) a 3.3 uF (or greater) capacitor should
be used.


....Stray capacitance to the LP2951-N Feedback terminal can cause instability.

.... more
« Last Edit: October 27, 2014, 04:45:22 am by TonyStewart »
Tony Stewart EE in bleeding edge R&D, TE and Mfg since 1975.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf