# 16 bit sigma delta ADC question

Hi every one,

I am examining a prototype device that is designed to analyse current from an electrochemical O2 sensor (current source), The sensor will output 1.124 uV per PPM (cross 47 ohms @0.023 uA), and has acuracy of +- 2 PPM, with max 1000 PPM.

it ueses 16 bit Sigma Delta ADC with 2.5 V Vref ( PIC24FJ128GC006 MCU to be exact ) with 47 ohm resistor across sensor inputs.

This is my first time seeing 16 bit ADC let along sigma delta, I only know of the 12 bit successive approximation adcs, my question is, despite all the structural diffrences, is it correct to say the step size of this ADC is Vref/2^15 (bipolar) which is 76 uV, and therefore impossible to convert the O2 sensor signal?

the designer of the devices has used the on chip programable gain to amplify the input by maximum 32 times, which makes it still short of the step size of the ADC.

what is really puzzlig for me is, if my above calcs are correct, the RAW ADC values should only be noise (≈ 2000 counts )when i apply 20 uA ( ≈1000 PPM ), but the ADC value shoots to 5000 counts, as if it is picking up a signal, where according to my logic it really should not move that much. hence my confusion.

really appreciate any bodys help on this.

Baluncore
2021 Award
76uV / 32 = 2.375 uV, but you need 1.124 uV for 1 ppm resolution.
Note that: 2.375 uV / Sqrt(4) = 1.1875 uV which is close.
So, if it averages 4 sequential values it will be very close to meeting a 1ppm specification.

The accumulation will then be done with more bits than the ADC.

My guess is that it accumulates maybe 16 sequential ADC values and produces a 15+4=19 bit total as the result.

1 person
Thanks for the reply, is the 16 bit in the title not indicating the steps of the quantizer? i saw no mentioning of these calculations in the data sheets. can you elaborate why the / 32 and /Sqrt(4) ?

Can't you use the on-board op amps to give you a moderate amount of gain (say x10) before the ADC?

I am not the designer, so i cant change any thing. it was designed initially for larger input, but specs changed and it was hurried for the uA sensors, so I have to make sure it works. so far it is very unstable and i want to pin the cause of it, from my knowledge so far it seems the 16 bit just does not have to resolution for the sensor inputs, but I am not so sure that is how the SD ADC works, can I just assume the LSB of the 16 bit is 76 uV ?

it seems Baluncore is suggesting that is not how it works, and somehow the 16 bit SD ADC is producing 19 bits. I am very confused.

jim hardy
Gold Member
Dearly Missed
wow

starting on page 370 of the pic manual is a very interesting section on its sigma-delta ADC

i had to look up how those things work, and it's not a thing i've ever before run into

i'd start here
http://www.ti.com/lit/an/slyt423/slyt423.pdf
http://www.analog.com/static/imported-files/tutorials/MT-022.pdf
http://www.maximintegrated.com/en/app-notes/index.mvp/id/1870

because that pic manual describes several software controls on resolution (like Baluncore's oversampling ) , and mentions rounding results to 24 bits resolution, see REGISTER 27-2: on page 372 ......

it's painful using today's sophisticated tools for they are so difficult to learn...

i'm awed by you young fellows. You seem to be born with intuitive understanding of all that we old guys struggled to comprehend, and you leap forward from there.

http://blogs.scientificamerican.com...phic-fields-psychic-dogs-and-other-mysteries/

old jim

1 person
Baluncore
2021 Award
ttsky said:
Thanks for the reply, is the 16 bit in the title not indicating the steps of the quantizer? i saw no mentioning of these calculations in the data sheets. can you elaborate why the / 32 and /Sqrt(4) ?
The PIC24FJ128GC is a microcontroller with an embedded sigma-delta ADC.
Sigma-delta converters are inherently noisy, the noise depends on controlled parameters.
I suspect the ADC is being used to produce a huge number of noisy results, see; dithering options.

REGISTER 27-1: SD1CON1: S/D CONTROL REGISTER 1
DITHER<1:0>: Dither Mode Select bits
11 = High dither (preferred with higher Oversampling Ratio (OSR) and positive reference well below SVDD)
10 = Medium dither (preferred for low to medium OSR and positive reference well below SVDD)
01 = Low dither (preferred when the positive reference is at or near SVDD)
00 = No dither

Those dithered results can then be averaged by the microcontroller to produce more accurate estimates.
Where n samples with statistical noise are averaged, the noise will be attenuated to 1/Sqrt(n).
So 4 samples will have half the noise, 16 samples will give one quarter of the noise, etc.
http://en.wikipedia.org/wiki/Signal_averaging

Sampling at 1 kHz, then averaging blocks of 32 samples, will produce 31 estimates per second.
The noise will be attenuated by Sqrt(32) = 5.6, from 2.375uV to about 0.42 uV, which meets the spec.

jim hardy
Gold Member
Dearly Missed
aha !

thanks....

This figure from your link i grasp, from my old control system days..

but how does one know in that continuous bitstream pouring out the right end which bit is the beginning of a reading?

This could work, and in fact bears resemblance to successive approximation

but they say n is just a few bits.

AlephZero
Homework Helper
The easiest way to draw a diagram of how a S-D converter works is to show a relatively low oversampling rate, which leads to apparently high noise levels.

In practice you can make the noise a small as you like with sufficiently high oversampling. The S-D converters used in audio applications (e.g. most consumer-level digital audio equipment) use oversampling factors like 4096x and sample rates of the order of 50 to 100 MHz, which gives S/N levels approaching 100 dB at audio frequencies.

I've no idea how that relates to the OP's device - I couldn't find a nice summary of the spec anywhere in the mountain of documentation on the web site.

jim hardy
Gold Member
Dearly Missed
I couldn't find a nice summary of the spec anywhere in the mountain of documentation on the web site.
page 370 here has an all-too-brief introduction, but presumes a level of familiarity beyond my own.

my question is simpler - how does one construct a binary number out of that bitstream ?
I can see that the closed loop will generate a real time series of one and zero bits
but which nineteen of them do you choose for the number representing the analog value ?

nsaspook
my question is simpler - how does one construct a binary number out of that bitstream ?
I can see that the closed loop will generate a real time series of one and zero bits
but which nineteen of them do you choose for the number representing the analog value ?

That is the job of the low pass digital filter/decimation filter.

Low pass digital filter:
A fancy way to count the number and relative position of high bits during a interval of time (much longer than X bits of time in the bitstream) with a running average counter total that will be the ADC binary digital output of X resolution bits needed.

Decimation: Just tossing out the redundant over-sample results in the binary digital output to reduce the output data rate for the much lower frequency filtered signal.
http://www.ti.com/lit/an/slyt438/slyt438.pdf

analogdesign
page 370 here has an all-too-brief introduction, but presumes a level of familiarity beyond my own.

my question is simpler - how does one construct a binary number out of that bitstream ?
I can see that the closed loop will generate a real time series of one and zero bits
but which nineteen of them do you choose for the number representing the analog value ?

It's your lucky day. Analog Devices markets an isolated sigma-delta modulator (just the modulator without the decimation filter). It goes into some detail on how to implement the decimator and even includes sample Verilog code. This should answer all your questions.

Typically sigma-deltas are not used in situations where you need a tight correspondence between a specific digital output and a specific input sample (because in principle the output code is by definition a combination of a large number of samples). For example, usually in a multiplexed system you would try to choose a SAR converter unless you had a good reason to use sigma-delta (for example a really high dynamic range requirement). It can be done but it's tricky. Sigma-deltas really excel in frequency domain applications or when you are making an essentially DC measurement so the timing spec is loose.

I have over 250 million sigma-delta ADCs out in the wild. (I did the ADC for a very high volume part). Sigma-delta modulation is a truly beautiful idea. One of those ideas that seems like magic until you get your head around it.

1 person
jim hardy
Gold Member
Dearly Missed
One of those ideas that seems like magic until you get your head around it.

i'll say. What's amazing is not that it works, but that somebody thought of it.

My first foray into Verilog. Still a bit of a puzzle, but the pieces are at last shown.
Thanks to both you and nsaspook for those datasheets - i've saved copies.

old jim

I just did some tests on the device and recorded the ADC values and PPM outputs, it really shows the averaging effects talked about previously.

#### Attachments

• ppmUV.JPG
61.7 KB · Views: 572
analogdesign
In case you're interested, Jim, here is an outstanding tutorial article about sigma-delta ADCs. It's incredibly well-written and easy to understand.

http://www.ece.rochester.edu/courses/ECE472/Site/Assignments/Entries/2009/1/15_Week_1_files/Hauser_1991.pdf

Max worked on the first fully integrated CMOS sigma-delta ADC (although obviously he didn't invent the concept). In case you have access to IEEE Xplore or something here's the reference:

Max W. Hauser, Paul J. Hurst, Robert W. Brodersen; MOS ADC-filter combination that does not require precision analog components, IEEE International Solid-State Circuits Conference, vol. XXVIII, pp. 80 - 81, February 1985.

Enjoy!

jim hardy
Gold Member
Dearly Missed
Thanks - i saved that one too.

I'm hung on the decimator i think, doubtless due to my unfamiliarity with dsp basics. This one and the AD7401 should help a lot.

The closed loop analog to bitstream i'm fine with, have used similar technique for analog multiply-divide functions in fluid flow metering.
Somehow that bitstream gets anded with clocks and accumulated to produce a digital word that's orderly, ie progresses from msb to lsb . I'm still working through the verilog code in that AD appnote.... trying to grasp that ultra simple(to you guys) process of changing from a bitstream to an orderly word.. It has to be in the way those 23-wide integrator(accumulator?) and differentiator registers get filled?
Probably some elementary DSP principle.....

Anyhow thanks for investing the time in me. I'm still stumbling up the Verilog curve - it's enough different from Basic that i am very slow at it. Wiki has a Verilog article that's helped with things like the <= symbols that are so different in meaning from Basic. Flow seems different too; and array elements don't seem to be always subscripted?

If i 'get it' this will be a milestone.

old jim, plodding along as usual..

analogdesign
I think what's confusing you about Verilog is that it's a parallel language. The "<=" statements are what are called "non-blocking assignments" which means that all the "<=" statements in an always block are updated simultaneously, not sequentially like in a BASIC program. A great website to learn Verilog is:

http://www.asic-world.com/verilog/index.html

The decimator isn't all that simple so don't feel like it's intuitive. You could use a simple integator to recover the data (accumulator and integrator are synonyms). A first-order sigma-delta modulator is the simplest conceptually. If you had an oversampling ratio of 1024, for example, you would just average 1024 bits and the output of the digital averaging circuit (just the integrator you mentioned, it's that simple) would be orderly progressing from MSB to LSB. People do just this sometimes if you need a medium performance auxiliary ADC internal to an ASIC, for example.

The decimator in the datasheet I posted is more complex that a simple integrator. It's a Sinc^3 integrator which is a DSP circuit.

http://en.wikipedia.org/wiki/Sinc_filter

Why did Analog Devices put a sinc filter in their datasheet? The idea is that the transfer function of a simple first-order integrator (a digital integrator is the same thing as a digital first-order lowpass filter) isn't steep enough to filter out enough of the noise-shaped quantization noise. The reason people use Sinc^3 filters for second order-modulators is if you used a simple integrator you would end up leaving a bunch of potential performance on the table.

analogdesign
Jim,

I thought of a simpler way to explain the decimation filter.

If you were to put a simple RC lowpass filter at the bitstream output of the sigma-delta modulator you'd expect to see a voltage that was proportional to the ratio of 1s and 0s, correct? For example, if the modulator output is all ones, you'd get the voltage of a single one at the output, if you have an equal number of 1s and 0s you'd get a mid-scale voltage and so on.

The digital integrator is doing just this, but in the digital domain. The output is simply the average number of 1's it has received since the last reset. That's all.

The sinc^3 filter in the datasheet is more complex, of course, but in principle it is the same, just like a 4th-order butterworth filter is more complex than an RC lowpass filter, but they both work in essentially the same way.

jim hardy
Gold Member
Dearly Missed
I just did some tests on the device and recorded the ADC values and PPM outputs, it really shows the averaging effects talked about previously.

obviously this gizmo is over my head.

three-ish counts per microvolt?
I'm amazed. Temperature change along your test leads can induce microvolts by the dozen.
Our 14 bit A/D had a 2 millivolt range which is around i think 8 counts per microvolt
but we being an industrial not a lab environment had a really hard time finding a microvolt standard to calibrate it. Fortunately we had no need of better than about ten microvolt accuracy, around a quarter degree on our thermocouples.
I cannot imagine how you resolve let alone produce nanovolts.

Point being - does observed 3 counts per microvolt mesh up with your expected resolution from your first post?
I thought you expected one count per 76 microvolts.

"One experiment is worth a thousand expert opinions...."

old jim

jim hardy
Gold Member
Dearly Missed
analogdesign said:
The digital integrator is doing just this, but in the digital domain. The output is simply the average number of 1's it has received since the last reset. That's all.

that's the basic fact i was missing.
Details of how hardware does that is just, well, details.

Thannks !

1 person
Baluncore
2021 Award
jim hardy said:
I thought you expected one count per 76 microvolts.
Yes, 76. uV, but with the 32x amplifier engaged it gives 2.375 uV.
Averaging n samples gives a Sqrt(n) improved resolution beyond that.

The 16 to 24 bit resolution of Delta-Sigma converters is way ahead of affordable voltage reference stability. For that reason they are ideally suited to applications where ratiometric conversion is used, such as bridge configured strain gauges, that can be powered by cheap constant current circuits. The thermal EMFs and zero errors in strain gauges and scales must be eliminated by software calibration.

Delta-Sigma converters do not work well with spike or analogue step inputs such as seismic signals. You must be very careful where you apply them.

well, this is more info than I bargained for. Thanks a lot every one!!