Designing audio circuits remains a challenge and aspects of it are still often considered a bit of a black art. Even the best designers often have to build more than 1 PCB to produce a high quality noise free design. Below are some tips from our experiences…
Power Supplies & Grounds
Transformers are great for powering audio circuits, especially because you can use separate windings to power different parts of your overall circuit with each winding being completely isolated from each other. Its not that you should never use switch mode power supplies, but if you are designing a product that could use a transformer don't just blindly use a switch mode PSU because that's what you always use. Also remember that its often not expensive to have transformers wound to your own specifications for a particular product.
Use a separate ground connection for audio and run important ground connections back to a single ground point. Ground planes for audio circuitry sometimes work but can often cause more problems than they solve.
In these notes by GND we mean 0V, not literally mains GND. However if you can, include a connection from Audio GND to mains earth from the audio GND star point as this can often help for mains powered devices.
Keep power supplies, transformers and noisy digital devices away from analog circuitry. Its easy to ignore this obvious point but try and do it – its really important when you suddenly find you have a noise problem!
The GND connection of audio amplifiers is very important compared with GND of other IC's etc – if there is GND noise between the two then the amp is going to output it.
Consider powering important IC's and anything sensitive using a 100R resistor between them and +V. Include a decent sized (e.g. 220uF) elect capacitor on the IC side of the resistor. If IC will pull a lot of power then ensure resistor can handle it (select a high enough wattage and provide PCB copper heat sinking if necessary) and bear in mind there will be voltage drop across the resistor.
For transformer based designs you want the rectifier capacitors to be as near to the rectifier pins as possible, and connected via their own thick tracks due to the large charging currents at the very peek of the rectified sin wave. As the output voltage of the rectifier exceeds the decaying voltage of the capacitor, impulse noise is produced in the charging circuit which can get transferred into the audio circuit if they share the same piece of copper in either of the power lines. You can't get rid of the pulse charging current so its much better to keep the capacitor local to the bridge rectifier to minimise these high current pulses of energy. If a audio amplifier is near the rectifier then don't locate a large capacitor next to the amp to avoid this capacitor causing this problem, but if there is a bit of distance then its fine to give the amplifier is own capacitor as it gets float charged from the power supply and ends up having a relatively high impedance due to the length of the copper.
Connect the amplifier 0V and +V via their own connections directly to the rectifier output / power supply input. If you are using a large capacitor local to the amplifier then run the power tracks via it to the amplifier, not to the amplifier and them back out to it (this can avoid issues where the capacitor tracks become aerials for RF interference). View the current flow as a route, via PSU capacitors to the amplifier and then out to the other audio circuits with the amplifier typically as the ideal GND star point.
Locate and voltage regulators which are used by the audio circuitry near to rectifiers / PSU input and connect with their own connections also.
Where possible avoid in and out audio signals to and from IC's running in parallel on the PCB as this can cause oscillations which feed from output back to input. Remember just 5mV can cause plenty of hum!
Keep digital ground planes away from audio GND and audio circuitry generally. Hum can be introduced into audio simply from tracks being too near digital planes.
When interfacing to other equipment, if powering some other board that includes audio circuitry (going to give or receive an audio signal) ensure there is only 1 point at which GND connects between the 2 boards and this should ideally be at the audio analog signal connection point. Can you power the other board using a floating supply and just connect GND without supply power through it (for example by using separate output of a transformer)?
For signal IO connections to other devices / the outside world its a good ideal to use a 100R resistor between the circuits GND and the outside world GND for everything (including digital parts of the circuit) to stop ground loops being created.
Audio signal series capacitors:-
Use them wherever you want to isolate sections from each other. Values to use:- 220nF is typical, 100nF is fine if you want to reduce size / cost, best not to go below 100nF.
Do not use ceramic capacitors. The reason is that ceramic capacitors will give a piezoelectric effect to an AC signal which causes noise. Use a Poly of some type – Polypropylene is best but any will do. True audio heads also say don't use electrolytics in-line but many designers do without issue – this is likely for high purity applications not general standard audio design.
Do not use tantalum capacitors anywhere within audio signal paths (some designers may disagree but they can cause horrible problems)
When designing op amp circuitry you often find you need to invert an audio signal to achieve the simplest circuit. This is fine and is only an issue where you have one signal inverted and another not as this would cause them to be out of phase when heard.
Fast OpAmps are not necessarily good for audio. We've had issues in the past with devices like the LMV722 which is a 10MHz OpAmp oscillating wildly when used with digital pots that add a bit of propogation delay to the feedback resistor. Changing to a LMV358 which is a 1MHz OpAmp solves the issue.