[sdiy] Mixed-signal problems (dsPIC digital delay project)

Tom Wiltshire tom at electricdruid.net
Fri Jan 27 16:51:03 CET 2017


Ok, an update. I've taken some measurements:

(1) With the PCB+Firmware running as normal, I have between 5mV and 7mVp-p noise on the audio output (scope probes straight across the jack). Varies a bit depending on the setting of the Delay Level and Repeats pots, as you'd expect. But 5mV is as low as it goes. On a 1Vpp signal, thats 200:1 S/N, which is only about 40-50dB or so. 

(2) With the DAC set to output digital zeros, the noise at the audio output drops a little bit to around 4mVp-p. At the DAC output, it's still 10-12mV, but the subsequent filtering kills it a bit.

I also tried running the chip with the ADC disabled to see if that peripheral were generating any of the noise. No change.

(3) Running the chip with the DAC disabled too didn't help. Without the DAC turned on, the inputs to the differential amp are basically floating outputs from the dsPIC, so there was more noise (20mV) like that than with it outputting zeros.
You say that this kills most of the noise for you, so I'm a little suspicious that I'm not seeing the same thing. Did you need to do anything else?

So, if I take it as given that the DAC is spitting out a good portion of this noise, I've got a slightly different question:

What can I do to the differential amp and/or filters to improve their filtering performance at high frequencies? Looking on the scope still suggests that a good amount of this noise is at RF frequencies, so I'd be interested to see if that helps.

Thanks,
Tom


On 26 Jan 2017, at 19:56, Richie Burnett <rburnett at richieburnett.co.uk> wrote:

> Tom, try this:
> 
> 1. First get some record of how loud the unwanted noise is, and roughly what it sounds like with your dsp system up and running as normal. So you can make comparative judgements.
> 
> ...then...
> 
> 2. Alter the part in your code that writes samples to the DAC so that it writes zeroes instead. (This will be the DAC write ISR if you're handling samples one at a time, or the DAC DMA buffer write routine if you're processing audio in blocks.) But do *everything* else the same. Still perform the ADC, still do your digital filtering, read/writing to external SRAM etc, exactly as before, just throw away the final result and write out zeroes instead. This should give you a nice silent output, except for DAC noise and any noise coupled into the analogue audio output from digital lines that are on the move during operation.
> 
> ...then...
> 
> 3. Change the software to disable the on-board audio DAC peripheral. But try to keep as much as possible of everything else running just the same. Now the DAC is shut down and not doing any of its delta sigma modulating, is the output noise noticeably less? When I've done this test the difference in noise floor between this test and number 2 above was like night and day.
> 
> In my experience when the DAC is running it produces a lot of in-band noise even when it's feed with a constant stream of zeroes (digital silence).
> 
> If you are really looking at pulses that are at 2.7Mhz, you need to use a very short ground lead on your scope to the ground plane of the board, and minimise any loop in the measurement path that could pick up digital noise. Don't go chasing spooks!
> 
> In general digital signals in a DSP system tend to be in some way correlated to the audio being processed or the block processing rate, so when they bleed into analogue audio they typically sound like whining, whistling, buzzing, fizzing, popping, or distortion, etc, but not the white noise description that you gave in your email.
> 
> Hope this helps,
> 
> -Richie,





More information about the Synth-diy mailing list