5
\$\begingroup\$

What precautions should I take when mixing analog audio and digital (uC control) on the same board? I don't want to hear the I2C bus in my speakers. I'm thinking about

  1. Separate power supplies
  2. Separate ground planes, with each part within its own ground plane
  3. A single connection over a ferrite bead between ground planes
  4. Lots of decoupling, preferably by RC instead of simply a C
  5. Slew rate control, esp. on serial buses (lots of edges!)
  6. Physical distance between both world

The RC decoupling may or may not be overkill, but it costs only a resistor.
Other suggestions?

\$\endgroup\$
  • \$\begingroup\$ I think you've killed it. Best not to fix it 'til you know it's broken, anyway. \$\endgroup\$ – tyblu Dec 5 '10 at 12:09
  • \$\begingroup\$ @tyblu: I'm sure there are other measures I haven't thought of. Anyway, comments are welcome too. For instance, am I exaggerating when I decouple via RCs? \$\endgroup\$ – stevenvh Dec 5 '10 at 13:08
  • \$\begingroup\$ Later I will try to make an answer that links to all of the good answers I have seen strew about in relation to this. \$\endgroup\$ – Kortuk Dec 5 '10 at 15:46
6
\$\begingroup\$

I've never had an issue with I2C being audible in a circuit including using I2C adjustable resistors in a 60dB gain microphone pre-amp so i doubt you'll have much issue but here are some thoughts.

Avoid using multiple ground planes unless you really need it. You can easily cause more noise problems than you solve if your not very careful to avoid routing any signal over the split in the plane. Unless your goal is very high fidelity, use a single solid ground plane. In general you will find almost every mixed signal IC will call for separate analog and digital grounds/supplies. While this is great in an ideal world, if you don't have the space to do this properly, you will cause more noise problems than you will solve. For instance your better off using a single power supply with an LC filter in front of the analog input than you are running a separate supply across the board on a 15mil trace.

Other thoughts:

  • Use an I2C clock above the audio range, 40khz or higher. Use the largest pull up resistors you can given your bus speed. This limits the current and hence noise generation. Also make sure the I2C bus isn't ringing, if it is use series termination at all devices (40-50ohm resistor should be fine). Match the I2C traces to 50ohm if you can and make 1 long run through all devices rather than T-ing off the bus.
  • A single, solid ground plane. Remember that high frequency signals will follow the path of least inductance to ground, not the path of least resistance. With this in mind lay out the PCB such that ground currents from the digital portions are not traveling under the analog portions.
  • Proper decoupling, do not use resistors. You have to calculate this for your particular design but a 0.1uF and a 10nF ceramic cap per power pin and larger, 10uF caps per major IC or section is generally a safe bet. Always place caps as close as possible to the power pin and get to ground ASAP. Don't be stingy with the vias, even using multiple vias to ground for each decoupling cap is not a bad idea if you have the space.
  • Use either a separate regulated power supply or use an LC filter to segment off an analog supply from the digital supply. If you use a split plane, you again can't cross this split on an adjacent layer with ANY traces.
  • Use protection around any sensitive analog components or pins. Ground rings around op amp inputs, etc. In fact a ground pour on the surface of the analog section is not a bad idea as long as its properly coupled to the ground plane (lots of vias) and doesn't have orphaned copper.
\$\endgroup\$
5
\$\begingroup\$

Those all sound like excellent ideas. A few comments:

"Do not split the ground plane. Use one solid plane under both analog and digital sections of the board." -- Henry W. Ott (EMI consultant), in "Partitioning and Layout of a Mixed Signal PCB" printed circuit design magazine (June 2001). The Massmind has some more information on the split vs unsplit ground plane controversy.

"Slew rate control" Yes, as long as you do this by adding a series resistor right at the source output pin. (Too many misguided individuals add a "smoothing capacitor" near the destination input pin, which only makes things worse).

There's a few more mixed-signal PCB design techniques at the Open Circuits wiki and the Practical Electronics Wikibook. They are wiki -- feel free to make further improvements.

\$\endgroup\$
2
\$\begingroup\$

Those look pretty good. The only other thing you may want to consider is if any audio cables are shielded you'll want to make sure the shielding gets grounded intelligently. I think that's usually that's best done to the chassis but I'm no expert on the subject. I suppose if you really want to be thorough and you have a metal chassis you can create a third ground just for it and make sure that the shields get shorted to it.

\$\endgroup\$
  • 1
    \$\begingroup\$ I remember to ground only on one side, to avoid ground loops. \$\endgroup\$ – stevenvh Dec 5 '10 at 17:10
  • \$\begingroup\$ Ooh that's good 'gotcha' to watch out for. \$\endgroup\$ – AngryEE Dec 5 '10 at 18:22
  • 1
    \$\begingroup\$ actually the "ground one side" must be qualified. There are benefits to grounding the "transmit" side, the "receive" side and sometimes both; it had to do with the relationship between the signal frequency and the length of the cable, but I can't for the life of me find the reference now. I'll update my comment if I can find it, I think it was in one of my old EDN magazines. \$\endgroup\$ – akohlsmith Dec 5 '10 at 20:17
  • 1
    \$\begingroup\$ You want both sides grounded to act as a continuous enclosure for RF though. rane.com/note165.html \$\endgroup\$ – endolith Dec 7 '10 at 16:25
  • 1
    \$\begingroup\$ Grounding one side of a cable provides electric field shielding (but not magnetic). Grounding both sides provides electric and magnetic protection by "closing the loop" and allowing current flow in the shield (to cancel the magnetically induced noise. It also introduces the possibility of ground loops, which can increase noise. This probably isn't a problem for home audio equipment though. \$\endgroup\$ – bt2 Jan 16 '11 at 0:29
0
\$\begingroup\$

Star grounds.

Connect both grounds at only one point to avoid ground loops and other nasty things.

Use power layers only for power or ground.

It might seem sensible but try to avoid putting signal traces on the ground or power layers.

Separate analog supplies.

Sometimes it's just enough to isolate two supplies using a bead or resistor-capacitor network. For example most microcontroller manufacturers suggest a 10 ohm or so resistor between analog and digital supplies, as well as a separate 100n capacitor. Other times you'll need a completely separate supply. It really depends on the application.

\$\endgroup\$
  • 1
    \$\begingroup\$ Star grounds are actually very uncommon on PCBs of this type. Having a single good ground plane eliminates this need. In high power applications there can be a need for separate grounds connected at one point, but that isn't what he has here. \$\endgroup\$ – Kellenjb Dec 5 '10 at 18:26
  • \$\begingroup\$ @kellenjb, I've seen it on some smaller applications, like sound cards, where space is at a premium. \$\endgroup\$ – Thomas O Dec 5 '10 at 18:47
  • 1
    \$\begingroup\$ No stars - single ground plane! \$\endgroup\$ – Martin Thompson Dec 6 '10 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.