[sdiy] Mixing PWM audio from 2 different devices. Ouch!
Benjamin Tremblay
btremblay at me.com
Fri Jul 21 13:03:49 CEST 2023
No, that makes sense. “Isolation” is the old-time practice of preventing interference long-division-style with estimation and measurement and liberally applying decoupling capacitors.
Thanks!
> On Jul 20, 2023, at 11:22 PM, brianw <brianw at audiobanshee.com> wrote:
>
> Unfortunately, you'll rarely see anything in a schematic to show analog versus digital ground. This is almost always handled in the layout step of designing the PCB. Every once in a while, you'll actually see a schematic with separate digital and analog ground, but it seems very rare.
>
> For a chip that uses a DAC to output sound, you'll see they almost always have a dedicated pin for analog ground that is separate from the other (digital) ground pins. A few chips allow that pin to be used for other functions, so you'd have to choose to assign it to analog ground (and program your firmware to select that pin function) in addition to handling the layout correctly. The analog and digital ground still get connected to each other, it's just that they're maintained separately so that they only connect at one point (usually as close to the DAC chip as possible).
>
> Then the challenge is to place all the analog and digital chips on the PCB such that their ground current return paths do not cross between analog/digital zones. The most advanced PCB layout experts don't even keep analog and digital ground separate because they're so good at controlling the ground current return paths that there's no need to electrically isolate the two.
>
> If your chip uses a PWM output instead of a DAC output, then there probably won't be a dedicated ground pin for the PWM. The assumption there is probably that the PWM will be used to drive a motor via an H-bridge, not audio, so the chip won't be providing significant ground current anyway. If you're using a PWM output for audio, then layout would probably be the only way to control analog ground current paths.
>
> One other thing that helps keep digital switching noise out of analog signals on a PCB is to follow all of the recommendations for (digital & analog) power supply bypass capacitors. Lots of hackers skip the bypass caps for every chip because it still works without them, but they suffer from excess noise on the supply rails. Some MPU / CPU chips actually have several power supply pins, each with a nearby ground pin, and if you read the design documents for those chips then you'll see that they might suggest a dozen bypass caps in total, spread all around the processor. Those can help, because the high current needed during clock transitions is provided locally by the cap, rather than running for a long distance through the power supply rail that might be feeding an op-amp that carries analog signals. High current means high voltage drops on the trace. Although most op-amps are great at rejecting power supply rail noise, it's still better to have as little power supply rail noise as possible.
>
> But, nope, you don't want to create a virtual ground. That wouldn't work anyway, because the DAC output will be referenced to the chip's analog ground, and you can't change that. By "reference" I'm referring to the fact that all circuits are a literal "circuit" - in that current pretty much must return from whence it came, i.e., the DAC voltage output will cause a current to flow that is referenced to (and the current returns to) the DAC analog ground.
>
> Virtual ground is useful when you're stuck with positive supply voltages only, but need analog signals to swing above and below some middle voltage. It might even make sense in part of your circuit, but not for controlling noise.
>
> Sorry if my descriptions are too short or confusing. Hope this helps at least a bit.
>
> Brian
>
>
> On Jul 20, 2023, at 6:17 PM, Benjamin Tremblay wrote:
>> Okay, one more question.
>> How do I isolate the analog ground from the digital ground? Does that mean they do not connect at all?
>> If so, do I make a “virtual” ground with a (not-too-high impedance) voltage divider and attach the audio jack’s ground to this?
>>
>> I never really have understood the practice. I see a voltage divider pseudo-ground used in the Teensy Audio Shield.
>>
>> Thanks,
>> Benjamin
>
More information about the Synth-diy
mailing list