Analogue In Noisy - hopefully a bug but could be damage?

08 Aug 2011

Hi,

I've been developing an app on breadboard, but have recently transferred this to a custom made PCB. On doing so, one of my analogue inputs (P17) has become very noisy (gradual drifing around over several seconds period of approx. 5% peak-peak).

Previously, the signal was dead-stable and it's worth stating that the adjacent signal (P18) which I also am using as an analogue input is still dead-stable. It's also worth stating that the inputs to both pins (measured with a DVM) are both dead-stable, as is the supply.

I realise this could be layout related (so will move the device back to breadboard to check), but wonder if this could be due to: a) Some kind of interaction/bug (I'm using lots of serial I/O, pulse measurement etc in the device) or b) ESD (static) damage. Whilst I've been taking precautions, there has been a lot of plugging and unplugging of this device so it's always possible.

Otherwise the part seems to be functioning correctly.

Does anyone have experience of a similar problem with this specific pin, one pin, or experience of ESD leading to such problems?

Any suggestions appreciated.

Steve.

09 Aug 2011

Looks like the device itself is not damaged. Back on breadboard both inputs (P17) and (P18) are awfully noisy when unfiltered, but add a 100nF filter cap and they're both nice and quiet. Next step therefore is to check the filter caps installed on the PCB and beef-up the filtering if necessary.

Steve.

13 Sep 2011

Hi Steve,

100 nf is a big cap on an input to an ADC with a 70uS conversion rate. Depending on your source impedance, it will certainly slow response time. For example, 100nf and 10K give a tc of 1000 uS, a long time for a 70uS ADC. If the board is noisy, you may want to take a look at your pcb layout. There are lots of resources on the web that address mixing high frequency digital and analog on the same board. Then again, if you don't care about response time, a cap will probably work just fine :-)

Another approach is to do some rudimentary filtering in software. On a very noisy breadboard with a pot hanging from 4" flying leads, I get 8 solid usable bits with no capacitance (other than stray+parasitic) from this 12 bit converter. If I do a simple weighted average on the samples I can get to 10 usable bits. Keep in mind that the 10th bit represents only 3.3 mV. Doing any better than that probably requires a low noise board and/or digital filtering.

One last bit. The analog library returns a 16 bit value from what is a 12 bit converter. So if you use the read_u16() function, you will get a return with some 60k missing codes which makes things look worse than they are.