[sdiy] Digital delay - whine from serial RAM access

Tom Wiltshire tom at electricdruid.net
Mon May 9 00:20:05 CEST 2016


Hi Jay,

Well, I'm seeing the noise in the audio output, but I've traced it back as far as the dsPIC's DAC output. It could well be produced internally by the dsPIC when the current spikes when the SPI kicks in.

I've done as you suggested to find the noise (scope on AC, low level), and it amounts to about 20mV p-p on the DAC output. Can't believe how annoying it is for a signal at that level, but it's right in the part of the spectrum where you really notice, and where the filters that come after have *no* effect.

I'll have a dig through the datasheet and errata to see if there's anything I'm missing, but this (or the 128K version, anyway) is one of my favourite chips, so I'm pretty up on that stuff.

The resistors to limit SPI current is an interesting idea. I'll see how I go on, and maybe give it a try.

Thanks for all the suggestions,
Tom
 

On 8 May 2016, at 20:41, "Jay Schwichtenberg" <jays at aracnet.com> wrote:

> You don't say where you are seeing the noise: power supply, DAC filter,
> DAC.... You should be able to see where the noise is being injected into the
> system with the scope. I'd look at the power supplies and then the DAC
> output from the dsPIC, DAC filter.... When measuring noise with a scope put
> the scope on AC coupling (verses DC) and then turn the volts/div up. This
> will get rid of the DC and you can see the noise better.
> 
> Things I'd try are:
> * Cut ALL traces on the stripboard to as long as they need to be and no
> more. These can act as little antennas that can transmit and receive stuff.
> * Read the data sheet and ERRATA 10 times. Then make sure that all the power
> supply filtering and layout is done right for the analog sections of the
> chip.
> * Some of the DACs and ADCs in MicroChips processors can be ran off separate
> supplies. Might see if that will help if you can do that.
> * Make sure that the power supply isn't stressed (i.e. loaded enough it's
> not filtering correctly).
> * Add some small value resistors (30-50 ohms) in series on the SPI clock and
> data lines as close as possible to the signal source. This will reduce the
> current some and will help on the noise.
> 
> Jay S.
> 
> -----Original Message-----
> From: Synth-diy [mailto:synth-diy-bounces at dropmix.xs4all.nl] On Behalf Of
> Tom Wiltshire
> Sent: Sunday, May 08, 2016 11:36 AM
> To: synthdiy diy
> Subject: [sdiy] Digital delay - whine from serial RAM access
> 
> Hi All,
> 
> I'm currently building a digital delay. The prototype is on stripboard (this
> may be a significant fact). I'm using a dsPIC 33FJ64GP802, which has a
> 12-bit ADC and 16-bit DAC on-chip. I had this working very nicely using the
> on-chip RAM for a short delay. This weekend, I've added an external SRAM
> (the 23L1024 128KB SRAM that Richie B suggested here a while back) and got
> it running with that. This produces a much longer delay, which is great.
> 
> What's not so great is that it also causes a nasty whining sound in the
> output. I've checked on the o'scope and the noise coincides perfectly with
> the periodic block read/writes to the SRAM chip - so it's coming from the
> fast signals of the SPI connection (8MBits in my circuit). I'm using a 32KHz
> sample rate and read/writing blocks of 16 samples (the SRAM memory page is
> 32 bytes, so it's convenient) which gives me a 2KHz block rate, and a whine
> at the same frequency.
> 
> I've got separate analog and digital supplies, and as far as possible I've
> got the analog and digital parts of the circuit separated, electrically and
> in space. The in/out op-amps and filters are all up one end of my board, and
> the uP and SRAM are down at the other, with a line of track breaks dividing
> the two in the middle.
> 
> Given that I can't add a ground plane to a stripboard, is there anything
> else I can do that will help reduce the whining? Any other suggestions for
> reducing digital noise is mixed-signal circuits like this? How does the
> noise get from the SPI connection to the output? What techniques could I use
> to determine that?
> 
> Thanks,
> Tom
> 
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
> 
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy




More information about the Synth-diy mailing list