[sdiy] Mixing PWM audio from 2 different devices. Ouch!

brianw brianw at audiobanshee.com
Thu Jul 20 17:21:05 CEST 2023


Some randoms thoughts:

It seems possible that this could be a grounding issue, and/or your two digital synths might have noise on their power rails that isn't problematic until you connect the two.

You might need to ensure that the digital rails are separated from the analog rails, so you get as little bleed of digital switching noise in the analog sections.

Are your analog signals AC-coupled to the mixer? ... or DC-coupled?

As for the PWM, seems like you should lowpass filter each one individually, and then buffer with an op-amp so that connecting it to your mixer won't affect the lowpass.

Brian

On Jul 20, 2023, at 7:49 AM, Benjamin Tremblay wrote:
> I had this idea I would use one of my dusty old DSP-G1 synth-on-a-chip modules as a mono synth engine for the shell of my Muppet Babies EP-10 keyboard.
> I desoldered the original CPU chip and used an Arduino Mega Pro (the tiny one) to scan the matrix. I can get decent-ish synth sounds of the DSP synth.
> 
> Then I got ambitious. I added the Mozzi library and put in a sample player to play back the legacy Casio VL-style rhythm sounds (po, pi, sha). 
> Everything in theory works. I can run Mozzi at a decent rate, scan the keyboard, and control the DSP chip with TTL-level MIDI. I chose Mozzi HIFI mode and it does sound a little better. I don’t want it to sound too good, it’s a Casio.
> 
> However, I am getting a loud high frequency tone when I try to mix the outputs of Mozzi PWM and the DSP G1 PWM. I suppose this is a beat frequency. It is present when both devices are idle. 
> 
> Adding oversized lowpass capacitors (47nF) to the inputs of my opamp take the squeal down, but it’s still there.  Fading down either signal stops the squeal. 
> 
> Is there anything I can do about this? Add individual buffers to both? Lower the gain on my opamp (I am using a 100K resistor in the loop and 15K mixer inputs capacitively coupled) ? The opamp is an LM324 running off the 5V supply, so I certainly can improve its power supply. 
> 
> I am hoping I can get this combination to work and move onto refinement of the firmware. Otherwise I will just punt and use a Teensy. But that would be too easy.
> 
> The take-away from this seems to be, do not combine 2 different PWM audio sources running at 2 different clock speeds from 2 different MCUs. (Or don’t use PWM audio at all if you can avoid it!)




More information about the Synth-diy mailing list