Noise on audio circuit when powered externally - Page 1
Forum section: electronics / projects

author: alexig
author_rank: Contributor
timestamp: October 23, 2014, 11:42:27 am
content: 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

author: fcb
author_rank: Super Contributor
timestamp: October 23, 2014, 11:58:20 am
content: 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.

author: madires
author_rank: Super Contributor
timestamp: October 23, 2014, 12:25:25 pm
content: 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.

author: mikerj
author_rank: Super Contributor
timestamp: October 23, 2014, 12:33:23 pm
content: 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 1kHz2) The ripple rejection of the LP2950 drops pretty rapidly above 1KHz3) 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.

author: AndyC_772
author_rank: Super Contributor
timestamp: October 23, 2014, 01:00:53 pm
content: 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.

author: mikerj
author_rank: Super Contributor
timestamp: October 23, 2014, 03:03:25 pm
content: Quote from: AndyC_772 on October 23, 2014, 01:00:53 pmVery good point, didn't even notice R4!

author: SeanB
author_rank: Super Contributor
timestamp: October 23, 2014, 08:47:14 pm
content: 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.

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: October 23, 2014, 08:53:10 pm
content: Can you show a layout? Do you have a ground plane or separate traces? A bad ground strategy could cause what you see.

author: TonyStewart
author_rank: Contributor
timestamp: October 25, 2014, 05:32:38 am
content: 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.

author: alexig
author_rank: Contributor
timestamp: October 25, 2014, 05:41:09 am
content: Thanks all for your replies, I've put everything back on the breadboard again.Quote from: madires on October 23, 2014, 12:25:25 pmI've tried a BAT42 schottky diode with a 470uF cap, but there was no noticeable difference.Quote from: AndyC_772 on October 23, 2014, 01:00:53 pmQuote from: SeanB on October 23, 2014, 08:47:14 pmThanks 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:Quote from: mikerj on October 23, 2014, 12:33:23 pm2) 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 -Quote from: SeanB on October 23, 2014, 08:47:14 pmAfter 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 -Quote from: Conrad Hoffman on October 23, 2014, 08:53:10 pmSure, the USB connector's isn't connected to ground, I have tried with a wire and it hasn't made any difference.

author: TonyStewart
author_rank: Contributor
timestamp: October 25, 2014, 09:08:21 am
content: Quote from: TonyStewart onTodayat 04:32:38 PM

author: alexig
author_rank: Contributor
timestamp: October 25, 2014, 10:17:51 am
content: Quote from: TonyStewart on October 25, 2014, 09:08:21 amHmm 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:

author: krivx
author_rank: Frequent Contributor
timestamp: October 25, 2014, 01:37:14 pm
content: Front USB ports on desktops are often just extension cables running through the case (can picking up noise as they go)

author: Legit-Design
author_rank: Frequent Contributor
timestamp: October 25, 2014, 02:01:26 pm
content: 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.

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: October 25, 2014, 07:16:13 pm
content: 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.

author: bigsky
author_rank: Regular Contributor
timestamp: October 25, 2014, 08:02:02 pm
content: Quote from: AndyC_772 on October 23, 2014, 01:00:53 pmTechnically 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.

author: alexig
author_rank: Contributor
timestamp: October 26, 2014, 04:39:33 am
content: Quote from: Legit-Design on October 25, 2014, 02:01:26 pmAt 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.Quote from: Conrad Hoffman on October 25, 2014, 07:16:13 pmI'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.

author: Richard Crowley
author_rank: Super Contributor
timestamp: October 26, 2014, 04:47:07 am
content: 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.

author: TonyStewart
author_rank: Contributor
timestamp: October 27, 2014, 04:38:22 am
content: The LP2950 is a very tight stable little 100mA regulator. There are some design constraints, I assumed the designer had already read in the datasheetCode:For ceramic capacitors, the low ESR produces a zero at a frequency that is too high to be useful, so meaningfulphase 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 reducedto 0.33 uF for currents below 10 mA or 0.1 uF for currents below 1 mA. Using the adjustable versions at voltagesbelow 5V runs the error amplifier at lower gains so that more output capacitance is needed. For the worst-casesituation of a 100 mA load at 1.23V output (Output shorted to Feedback) a 3.3 uF (or greater) capacitor shouldbe used.....Stray capacitance to the LP2951-N Feedback terminal can cause instability..... more