Discussion in 'General Electronics Chat' started by PaulEE, Jan 9, 2012.

1. ### PaulEE Thread Starter Member

Dec 23, 2011
423
32
Hello all,

In a previous post, I discussed the need for a high-resolution PWM scheme. I was greeted with a bunch of great suggestions, which I appreciate.

The next piece of the puzzle is the ADC. Most PICs have 10-bit ADCs, which is so very close to what I need...

I have a 12-bit DAC feeding me a signal between 0v and 5v. Half of this range (0v to +2.5v) is responsible for a "heat" PWM signal, and the +2.5v to +5v range is responsible for "cool" PWM signal.

Before I generate the PWM, I need to digitize each of these ranges.

Since the signal begins at 12 bits and is split into two separate control signals, each signal has half the bits alloted, each signal can be considered an 11-bit quantity.

My question:
If I read the 11-bit range with two ADCs that are spec'd for 10-bits, can I squeeze another bit of resolution to match the original value? I have briefly looked into oversampling and various scaling techniques, but this subject, aside from simple ADC readings, is foreign to me.

2. ### thatoneguy AAC Fanatic!

Feb 19, 2009
6,357
718
Do you need 12 bit accuracy, or 12 bits of data with zero padding to make a 10 bit sample 12 bits long?

3. ### crutschow Expert

Mar 14, 2008
13,496
3,373
If you oversample the voltage and average the value you can improve the resolution by a factor equal to the square-root of the number of oversamples. (See this for further explanation.) Thus to go from 10bits to 11bits resolution you would oversample by a factor of four. Then you average four consecutive 10bit samples to get one 11bit sample.

PaulEE likes this.
4. ### PaulEE Thread Starter Member

Dec 23, 2011
423
32
I need to describe an analog signal with 11 bits of resolution within a microcontroller using 10 bit ADCs in the same microcontroller. It will be two bytes long, LSB on the far right bit, reading the bytes from left to right. The PIC has several ADCs, but I'm not sure what the topology is in order to accomplish this.

5. ### PaulEE Thread Starter Member

Dec 23, 2011
423
32
I was also looking at a Microchip application note on oversampling, but your explanation was a bit more clean-cut than their math-tastic jumble.

Thanks for that.

6. ### davebee Well-Known Member

Oct 22, 2008
539
46
If your signal and ADC switching points are very stable then you'll get the same readings on every measurement regardless of how many measurements you make, and averaging will not help.

This is a case where a little noise in either the signal or the ADC reference voltage actually helps, because the noise will flip the level of the next ADC digit proportionally to how close the signal is to the switching point, and in that case, averaging will be able to extend the digitization to additional bits. Noise used in that way is referred to as "dither".

7. ### crutschow Expert

Mar 14, 2008
13,496
3,373
Most actual systems have enough signal and internal ADC noise to provide the required "dither", often more than you want.

8. ### PaulEE Thread Starter Member

Dec 23, 2011
423
32
Very cool and very helpful. I thank you, kind sir!