Can I get usable 15-bit resolution from my PSoC 4's 12-bit ADC? - Page 1
Forum section: electronics / projects

author: microbug
author_rank: Frequent Contributor
timestamp: December 07, 2014, 10:29:40 am
content: Pretty much what the title says. I'm designing a precision DC load. The DAC uses dithering to get from 12 bits to 15 bits at several ksps but from the little I understand about ADC oversampling (it seems much more complex), the oversampling required to get to 15 bits would reduce the sample rate to become unusable: I need to do software-controlled constant-power and constant-resistance modes so I need at least 1ksps.Info:This is running on a PSoC 4200 so there is some analog flexibility.The ADC is a 12-bit SAR which can go up to 1Msps and has 8 channels.The PSoC has an internal 1.024V reference. There is a 4.096V reference and a 3.2768V reference available externally, and the PSoC can use external references.I need to measure voltage and current, but that's all (two channels needed).Is there anything I've missed?

author: MK
author_rank: Regular Contributor
timestamp: December 07, 2014, 10:40:16 am
content: several Q's,what is the linearity of the ADC like?What is the stability of the reference.15 bit stability and linearity, does that need to be 15 bit monotonic?

author: microbug
author_rank: Frequent Contributor
timestamp: December 07, 2014, 10:53:10 am
content: The ADC claims to be monotonic and has 0.1% gain error (with an external reference, it's not specced for the internal one).The internal 1.024V reference isn't great - it can be trimmed to 1%, but I can't find any drift specs other than the fact that it is supposed to be +/- 5mV.The external 4.096V reference comes directly from a REF5040: 8ppm/C drift (3ppm/C for the high-grade version), 0.05% accuracy.The 3.2768V reference comes from a voltage divider on the REF5040. It will use 0.1% (maybe 0.05%) resistors with a fairly low tempco.It does need to be monotonic; this is a precision load. It's not supposed to be better than the BK precision 8500 series or match Agilent/Keysight's ones, but it will be pretty accurate.

author: dannyf
author_rank: Super Contributor
timestamp: December 07, 2014, 12:24:46 pm
content: The typical approach is to combine zooming + amplification. But it is difficult to maintain monotonicity in those cases.Using an external adc is far easier.

author: rob77
author_rank: Super Contributor
timestamp: December 07, 2014, 12:42:53 pm
content: definitely use an external ADC.btw.. just for the sake of curiosity... what will be a use case for such a precision load ?

author: microbug
author_rank: Frequent Contributor
timestamp: December 07, 2014, 12:44:49 pm
content: OK, I'll find an external ADC.I could use it for measuring battery capacity and stuff, but really it's only a precision load because of feature creep

author: dannyf
author_rank: Super Contributor
timestamp: December 07, 2014, 12:46:07 pm
content: You may wish to take a look at AN86 from Linear. The particulars may differ but the basic principle is the same.

author: coppice
author_rank: Super Contributor
timestamp: December 07, 2014, 01:21:03 pm
content: The title says you want 15 bit resolution, but the description of the application suggests you want 15 bit accuracy. Which is it? Dithering, correctly applied, may well give you 15 bits of resolution. 15 bits of accuracy is less likely.

author: microbug
author_rank: Frequent Contributor
timestamp: December 07, 2014, 01:24:00 pm
content: 15 bits of accuracy. That shouldn't be a problem with an external 16 bit ADC.

author: mikerj
author_rank: Super Contributor
timestamp: December 07, 2014, 01:28:16 pm
content: Provided you have sufficient uncorrelated noise in your system you could oversample 4^3 = 64 times and decimate the result to achieve 15bit quantization. This would require an ADC sample rate of 64ksps for your 1ksps requirement. You'd also need to consider the processing requirements; I'm not familiar with the PSOC, does it have a DMA system that would allow you to buffer a suitable number of samples, or would you need to process them on the fly?

author: Marco
author_rank: Super Contributor
timestamp: December 07, 2014, 03:13:34 pm
content: Couldn't you do it with much less samples with a synchronized sawtooth dither? (Assuming it's not too noisy.)

author: microbug
author_rank: Frequent Contributor
timestamp: December 07, 2014, 03:50:42 pm
content: The PSoC 4200 runs a Cortex M0+. There is no DMA system.

author: motters
author_rank: Newbie
timestamp: December 08, 2014, 01:19:35 pm
content: We looked into this at work awhile ago and it's honestly not that easy. It was far easier putting a 16 bit ADC external to the microcontroller for our situation.We tried multiple methods to get the over sampling to give us the accuracy we needed but there were always issues with range. The lower reading were generally off by quite a bit although the upper reading were quite accurate.We got quite good results from generating a 6 order polynomial equation although again lower readings were still off a bit.The best method we found was making a lookup table for the oversampled reading. This worked very well actually, although like i said in the end we just stuck a 16 bit ADC externally lmfao.Whether any of that helps i don't know, its just my experience of over sampling readings to get more accuracy (which is rather small haha).

author: poorchava
author_rank: Super Contributor
timestamp: December 09, 2014, 07:27:12 am
content: As far as I understand the effectivity of oversampling depends on distribution of noise on the input. The more uniform distribution of analog value within 1LSB, the better the oversampling works. I've even seen some application note that showed AC coupling noise from pwm output of a micro into analog signal to improve noise distributon.

author: tszaboo
author_rank: Super Contributor
timestamp: December 09, 2014, 07:35:50 am
content: Quote from: microbug on December 07, 2014, 01:24:00 pmYou would think... In fact 15 bit might not be easy with a 24 bit ADC.The problem is with oversampling, is that your 12 bit ADC will have something like 10 bit TUE, the INL and DNL errors will make it impossible to get better accuracy (not resolution) than that 10 bit.

author: microbug
author_rank: Frequent Contributor
timestamp: December 09, 2014, 07:45:23 am
content: External 16-bit ADC: not oversampled! This thread is quite interesting though, might be useful for other projects.