I have a circuit driving a speaker that's super noisy. I have used this same circuit+speaker before in a different building with a different power supply and had no problems with it.
Now when I plug it in, there is a continuous hum. Either the mains power or my 9v power supply is introducing noise.
Do you have any simple suggestions on how to fix this? Can I just add a capacitor between Vcc and GND of the power supply?
I don't think its a circuit problem so the typical noise-reduction tutorials that discuss decoupling capacitor placement etc. don't apply directly to my problem, I think.
Any suggestions on how to go about this would be welcome
I think you might be confusing the term "noise" as used to denote electrical spikes (like from a motor) with 60 Hz hum, which , being 60 hz , can only be removed with a 60 Hz Notch filter
If you combine a HP filter with a fcLP < fcHP, what you wind up with is a Notch filter because fcHP - fcLP = the Notch filter "width" .
Typically a 3rd order filter is needed to eliminate that hum. There are filters sold just for that, called (strangely enough) "60 Hz Hum Filter".
Or 50Hz in most territories.
Properly regulated supplies shouldn't have noticable hum unless this is a microphone amplifier (you
haven't really said what you circuit is). There are variousl sources of EMI that might be involved too
such as digital electronics.
So is this 9V supply a properly regulated supply? Measure with a multimeter under DC and AC - DC
should read 9.0V and AC should read zero basically...
A capacitor across the 9V supply might help (try 1000uF or more) but the best solution is a better power supply. Regulated power supplies tend to be quieter because the regulator filters-out fluctuations including AC hum. But, a cheap switching-regulator supply my generate it's own higher-frequency noise.
Is there a volume control? If turning-down the volume turns-down the noise, it's probably not coming from the power supply.
In high impedance and/or unshielded circuits (or with unshielded cables),power line hum can be picked-up through the air. And, it can be caused by a ground loop. Or, it could be coming from whatever is plugged-into the amp.
I think you might be confusing the term "noise"...
Hum is also noise. Anything "unwanted" is noise.
NOTE: OP has yet to post a schematic of "the circuit".
I don't have an exact schematic. Part of it is a microphone amp scavenged out of a cheap set of speakers, so I don't know exactly whats going on. I'm using that to drive a custom self-made solenoid type device. The problem is reproducible though when connecting a speaker instead.
Yeah, turning down the volume does not remove the hum, that's why I suspect its coming from the power supply. As the power supply works better in a different building, I suspect something funky is going on with my mains power.
I'll start out with just throwing in the capacitor and if that doesn't work, I'll give a low-pass filter a shot (I don't think I need to implement the high pass part of the notch filter, as I won't be switching stuff or doing anything else the might require fast response times). Based on my region it could be a 50hz hum. (It sounds as if it were a broader spectrum and slightly higher though (80 to 120hz?). I don't have anything to measure it though, so who knows.)
Thanks for the suggestions - I've never done anything like this before, so I was just curious how more experienced people would approach it.
Installing a ferrite core may help. Perhaps installing one on the DC side would work best (wrap both DC power wires through it a few turns or more).
Not that it applies here but just for the sake of discussion,
If it was made in the USA and had a 60 Hum filter built in and you took it to the UK where they use 50 Hz then you would expect the filter not to work right ?
Interesting thought. I did initially use this setup in Canada, so this might very well be (also) the case. Definitively something to keep in mind!
Yes, good point. Something worse would be the internal magnetics overheating and producing distorted signals (especially if designed for 60Hz but connected to 50Hz mains). The other way around isn't so bad, just lower power output but no overheating and distortion.
I asked the question because my understanding of 60 Hz Hum filters is that they are designed to be narrow Notch filters , passing everything above and below the center frequency but blocking the center frequency. A 3rd or 4th order op amp active filter could probably be very accurate but the higher cost of precision components (like 1% or better resistors and 5% or better caps would make the design cost prohibitive unless it was a high end product. I have made op amp active filters (10-band audio equalizer) using LM307H high performance op amps and an certified audio engineer friend of mine tested it and declared it studio quality.