I did 10 readings for each of the Min/Max values
That could be anything. The 16 counts you see as fluctuation (no, these are no oscillations) are only 16 milliVolts.
- are you sure the signal you are measuring is really clean (no fluctuations)
- do the voltage you measure and the power supply share a ground line? (then you introduce ground currents)
- how long are the leads - could it be that you get noise coupling?
- use internal ref bypassed with capacitor - this gives best performance (100 kSps is the upper limit for just the internal ref), and bypass it with an external capacitor
Try to get a scope to the inputs as near as possible on the PSoC, and look at the signal there. Is this a Cypress board or did you design it on your own?
You can also try to use the DelSig ADC instead, it has better noise rejection characteristics.
Start with 12 bits, if Vref set to Vssa to Vdda, then 1 LSB = 5 / 4096 = 1.2 mV.
So start with a DSO, look at your Vx, scope on infinite persistance, and measure pk-pk noise.
Then calculate the # LSBs you would get from that, and compare to what SAR is measuring.
If your counts from SAR vary by 4 counts, that is not 8 bit resolution. Your resolution is still
12 bits. Your accuracy though is Vx +/- 2 lsbs.
If you signal average, and the noise is uncorrelated, then you can improve the accuracy.
But this all depends on nosie being uncorrelated, which in a mixed signal environment is
only partially true as UP generates a lot of correlated noise.
You might want to look at AN57821 (http://www.cypress.com/?rID=39677 ) which explains details how how to design PCBs for mixed signal applications - it contains lot of valuable information about potential sources of analog errors.
One further comment, bypassing is critical in systems even at 8 bits.
Polymer tantalums are an order of magnitude better than "normal" tants in
their Z vs freq performance.
Some ref material on board layout and mixed signal design, attached.
Grounding1.zip 3.0 MB
ADC oscillation(Noise) issue will happen several times
But 4 bits is too much, I think
When you measure the ADC accuracy, Notice to that things
1) Place low pass filter at the input pin, for you design, 50KHz around
2) Measure on well grounded Iron table, If you can
3) Do not use fluorescent light
And how would be like this, for a trial
1) Place internal Vref on your ADC input, This might be best effort of your design.
2) Use continuous conversion
3) Use some averaging, If you can
If your input is a DC source, moving average would be OK. Of course, you should try to minmize the noise first.
This is the DC power supply i was using, the oscillations I am seeing are higher than the ratings of the supply. This is not the supply. I also tried a TIA setup as a non-invert opamp configuration with the output of the TIA running directly to the ADC. The oscillations increased.
I am using a USB to power my dev kit from a laptop. Would this cause the vref to jump around?
Not directly, but could easily add system noise to the ground currents.
Put your scope on infinite persistence, and look at supply and SAR inputs.
You will get a pk-pk reading of the worst case noise.