Mixed Signal Digital Noise

Started by Gobotak, August 14, 2023, 01:26:26 PM

Previous topic - Next topic

Gobotak

I'm trying to get into controlling analog circuits with a microcontroller and having issues with noise.  For my current setup I have VCAs (SSI2164) being controlled by an 8 bit DAC(BH2226).  There is an analog circuit board and digital circuit board that are connected by wires.  I didn't put enough thought into layout design and am researching methods to do that much better.  That being said, if I control the VCAs on my audio board with a potentiometer voltage divider instead of my DAC I do not get the noise.  I am wondering if anyone has suggestions for reducing noise in additional to careful PCB layout?

ElectricDruid

How often are you updating the DAC, and is there any filtering after the DAC?

If the DAC isn't updated very frequently, a smoothly changing voltage comes out as a series of little steps, and you'll hear that. Note that this *isn't* improved by having more DAC resolution - all that does is make the little steps more accurate!
It can help to add digital filtering to smooth the output to the DAC, essentially making sure that the DAC doesn't just jump from one value to another, but rather passes through lots of intermediate values on the way there. Similarly, adding a simple RC (at minimum - feel free to use better filters!) after the DAC will smooth any residual steps and prevent those high frequencies from modulating the audio going through the VCA.

But if the layout isn't right, then that's quite likely to overwhelm whatever else might be going on. Mixed-signal boards are hard to get right, but the best-of-both-worlds of digitally-controlled analog is where it's at, and really worth the pain when you get it going!!

Rob Strand

For DACs it's better if you put the caps of the RC filter at the analog board end - it can filter/hide a good deal of noise due to layout.  Lower cut-off = better noise rejection but slower dynamic response.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Gobotak

The DAC is updated whenever the microcontroller receives a new value from the ADC which is smoothed in the code to prevent jitters in that regard.  Since my VCA has a virtual ground at 4.5V I have to scale the output of my DAC.  I am using an inverting op amp to scale it to the correct range and that also serves as a low pass filter.  I didn't want my response time to get slowed down too much so the cutoff frequency is fairly high but I'll try to adjust that to see if that helps.  All of that is on my control board though so in my next revision I'll try changing the filtering to be on the audio board.