Author Topic: PIC vomiting into analogue domain....  (Read 6006 times)

Gurner

PIC vomiting into analogue domain....
« on: April 30, 2011, 10:33:11 AM »
Just wondering how those who do this digital stuff a lot stop all the digital PIC/AVR induced noise spewing into the low level analogue signal paths.

Yeah...I know separate grounds....keep the analogue & digital parts well apart, only join them at one point near the incoming ground etc....but just wondering what those on here have had the most success with, becuase every time I mate up a PIC to guitar related circuits the noise is such that I spontaneously combust.

Hides-His-Eyes

Re: PIC vomiting into analogue domain....
« Reply #1 on: April 30, 2011, 11:12:47 AM »
You've got the 100n across the rails, right?

MetalGuy

Re: PIC vomiting into analogue domain....
« Reply #2 on: April 30, 2011, 04:16:40 PM »
I use pics for switching in tube amps and pedals and I don't hear any noise coming from them. If there's any maybe it should be well above hearing range. Or I just got lucky when designing my PCBs.

cloudscapes

Re: PIC vomiting into analogue domain....
« Reply #3 on: April 30, 2011, 10:33:24 PM »
star ground as much as possible. necissary between digital section and analog section on single PCB even. I star ground even if it means my board is bigger.

caps across the rails. pics/avrs have analog grounds and digital grounds. seperate those. each with their own caps.

don't pass digital traces under analog (analog signal) components unless you absolutelly absolutelly have to

grounded copper fills under pic/avrs
~~~~~~~~~~~~~~~~~~~~~~
{DIY blog}
{www.dronecloud.org}

markseel

Re: PIC vomiting into analogue domain....
« Reply #4 on: May 02, 2011, 03:03:21 PM »
I employed those strategies when I made the PCB for the the 'nextdsp' board.
There's PCB files on this web-site in case you want to see the approaches that I took.
Noise is pretty low, perhaps approaching -85dB or better?

http://sites.google.com/site/nextaudiodsp/

As the others pointed out these are the main points for low-noise PCB design:

1) Separate ground planes for analog and digital sections and joined them one point - usually at the shared source for power/ground.
2) Separate power planes for analog and digital sections - approach same as above
3) Keep the common points for the power and ground (where analog and digital sections are joined) close to each other
4) Bypass caps at the power pins for each IC; use a couple (I use three) for each power pin; values of 100nF and 10uF when using two or values of 10nF,  330nF and 10uF
5) Avoid digital and analog traces crossing paths

That should get you there unless something else is generating the noise.  Could it be something else?

1) My board uses a CODEC and therefor the A/D conversion is not on the same chip as the micro-controller.  Are you using on-board A/D's of the PIC?

2) Is the analog circuitry for the A/D inputs using a clean power source?  Op-amps have good tolerance for power supplies that are a little noisy (supply rejection).

3) Does the analog circuitry rely on biasing or a virtual ground?  The signal conditioning circuits are usually built using transistors or op-amps powered via one supply and therefore they operate in class-A.  If a bias voltage is used (or a virtual ground) then it need's to be really clean since it contributes to the input signal being sampled.

3) I'm reaching on this one; If the on-board A/D's are used then make sure they're sampling synchronously so that the sampling period is constant.  The action of sampling should be driven by a clock rather than source code that may be interrupted or something like that.  Sampling jitter will cause noise.

That's all I can think of at the moment.  Anyone else have more thoughts?

Galego

Re: PIC vomiting into analogue domain....
« Reply #5 on: May 02, 2011, 06:19:50 PM »
A small value resistor (50R for example)  separating the power supply to the digital part from the analog (before the regulator).
A small value resistor (50R for example) and two opposing 1n4148/1n914 diodes separating the grounds.
If you need 5V anywhere on the analog part of the circuit, don't share regulators.

I might be talking out of my ass, but i had some issues with noise in digital circuits, not with frequency noise, it was more due to blinking leds and these three steps worked for me.

Gurner

Re: PIC vomiting into analogue domain....
« Reply #6 on: May 03, 2011, 08:42:02 AM »
Thanks guys....all good points well made.

The stuff I'm observing is not LED clicking (when it comes to LED switching, rather than switch them hard on/off, I ramp up/down all LEDs 'commons' via PWM)...nah this is like a version of white noise  but biased towards high frequencies ....most of the stuff you've all outlined I knew about....I'm inclined to think this is just a proximity thing (my PCB is ludicrously small which puts analogue in close proximity to the PIC itself)

Cheers,
Gurner

MoltenVoltage

Re: PIC vomiting into analogue domain....
« Reply #7 on: May 03, 2011, 12:06:31 PM »
I did a lot of experimenting based on Galego's suggestions in another thread and found that 43 ohm resistor is ideal (at least in my devices), except when it comes to AVSS when I use 10 ohm.

Also, I don't use opposing diodes, I use a single 1N400x diode which allows conduction toward the power ground.

Power Ground -|<|- Digital Ground

I found the single 1N400x works even better than the pair of signal diodes

What you describe sounds like digital hash.  Sometimes a ferrite in series with the PIC's power supply can take care of that.

You might also consider shielding the analog circuit if it is right on top of the digital one.
MoltenVoltage.com for PedalSync audio control chips - make programmable and MIDI-controlled analog pedals!

gena_p1

Re: PIC vomiting into analogue domain....
« Reply #8 on: June 18, 2011, 04:15:52 PM »
No problem with AVR (tiny-mega8), it's a very quiet MCU with low power consumption