50nV Resolution

Thread Starter

joeyd999

Joined Jun 6, 2011
5,237
I've confirmed the ADS1242 is not the source of any 1/f noise. Therefore, it's coming from my transducer, and I've obviously reached its noise limits.

Here's how I did this:

The 1242 allows any two of its four input channels to be connected to the differential inputs of the converter. In my design, the positive and negative outputs of the transducer are tied to channels 0 and 1, respectively. Channels 2 and 3 are unused.

I modified my code so that the input multiplexer alternates the polarity of channels 0 and 1 prior to each conversion. First 0+/1- then 0-/1+ and so on.

Upon reading the digital output, the data is either fed directly into the filter or inverted first, depending on the previous setting of the mux bits.

In this way, any 1/f noise arising inside the 1242 is up-converted to about 15 hz, well above the cutoff point of my digital filter, and then smoothed by the filter. A digital chopper, if you will.

I ran 10 one minute P-P noise runs for each of no-chopping and chopping (writing the mux registers regardless so as to keep all other things equal).

The average P-P noise with no-chopping was about 70 nV with a min of 57 nv and a max of 96 nV. The average with chopping was 75 nV with a min of 63 nV and a max of 85 nV. There is enough variation from minute to minute that the differences are easily explained by random variation. I am sure if I ran enough tests, both sets of numbers would converge.

Assuming the noise was, in fact, 1/f, I decided to run for a longer period, in which case the noise should increase. This time, 5 each of 10 minute runs:

No-chopping: average = 88 nV, min = 70.5 nV, max = 103 nV

Chopping: average = 95 nV, min = 88 nV, max = 102 nV

Again, if I had the desire to watch the grass grow and paint dry for days on end, I am sure these numbers would eventually converge.

Therefore my conclusion: 1) noise is definitely 1/f. 2) It ain't coming from the converter.

It's definitely coming from the transducer. And probably due in great part to my air conditioning cycling during the test.

This is not all bad. 75 nV P-P noise over a one minute interval was my target. I was just hoping I could get better with just code.
 

Thread Starter

joeyd999

Joined Jun 6, 2011
5,237
I was working at home this weekend -- no way to control environmental conditions.

Now I'm back at the office. Under stable, controlled temperatures, the noise remains at around 75nV p-p over a minute.

I conclude from this that all the remaining noise is simply thermal 1/f generated by the internal resistance of the transducer.

IOW, I've hit a granite wall and there is nothing else to do to improve performance.

Well, that's not entirely true. I could increase the current through the transducer, thus developing a larger signal. But that'll impact my battery life (another project criteria).

Wait...I have an idea...
 

Thread Starter

joeyd999

Joined Jun 6, 2011
5,237
Reference noise is irrelevant. The input voltage is ratiometrically related to the reference. I'll probably eliminate the reference for the final design with, theoretically, no reduction in performance. I'll report back when I've confirmed this.
I could increase the current through the transducer, thus developing a larger signal.
Wait...I have an idea...
Success!

First, @WBahn, I removed the LM4040 entirely -- the transducer and the ADS1242 are now driven directly by a MCP1640 3.3V switcher. Noise penalty: the equivalent of 4 nV P-P over 1 minute

Second, since the transducer input is 32% larger, my signal into the ADS1242 is also 32% larger. As confirmation of my theory, the 1/f noise does not increase with the higher input voltage -- it is pure Johnson noise irrespective of current. Therefore, I get a 32% reduction in transducer noise -- the equivalent of a 24 nV P-P noise improvement.

So, my total 1 minute P-P noise is now the equivalent of 75nV - 24nV + 4nV = 55 nV, a 27% improvement. Yay!

...but that'll impact my battery life (another project criteria).
No, it won't! Yes, the transducer current increases (by 32%), but the overall current stays approximately the same*. I forgot that I was biasing the reference. Without the reference, the excess current required to keep the reference biased is eliminated. So -- more signal, less S/N, same operating current.

I've now exceeded my specification.

Cool.

*Edit: in fact, I'm saving about 1 mA.
 
Last edited:

cmartinez

Joined Jan 17, 2007
8,220
I removed the LM4040 entirely -- the transducer and the ADS1242 are now driven directly by a MCP1640 3.3V switcher. Noise penalty: the equivalent of 4 nV P-P over 1 minute
How is that possible? Is it because of the alternating polarity technique that you mentioned, as it cancels any noise produced by that switching DC-DC converter?
Also, how did you solve the low drift problem?
 

Thread Starter

joeyd999

Joined Jun 6, 2011
5,237
How is that possible?
Magic.

Is it because of the alternating polarity technique that you mentioned, as it cancels any noise produced by that switching DC-DC converter?
No. I scrapped the chopper -- extra complexity for no measurable improvement.

The transducer is ratiometric. IOW, the output voltage is proportional to input voltage (3.3V). The A/D converter also uses the 3.3V as a reference. If the 3.3V changes both the output voltage of the transducer and the reference voltage of the A/D converter change by the same percentage, thus canceling each other out.

I did have a concern that the high frequency switching noise (~20mV p-p @ 500 kHz) would have an effect on performance. That is why I included the 2.5V shunt as a reference in the original design. I always intended to test without the reference once I had a baseline. It does surprise me that the switching noise has nearly zero effect on the overall system noise.

Also, how did you solve the low drift problem?
What low-drift problem (aside from what this entire discussion has been about)?
 

Thread Starter

joeyd999

Joined Jun 6, 2011
5,237
My bad, I meant to write long term, low drift ... referring to your quote:
I started this thread to report successfully meeting the objective of a new project. It turned into, "Can I do better?" And the answer was, "Yes".

There was never any problem. Just solutions.
 

Thread Starter

joeyd999

Joined Jun 6, 2011
5,237
Very impressive.
An instructor I once had would have said "That's smaller than a flea fart". :D
Just to be perfectly clear, I am now reporting numbers based on "equivalency" to the old design -- so as to make comparison to the original numbers easy.

In reality, the noise level is exactly the same as it was before (+ ~4 nV due to reference noise).

The signal is larger by 32%, though.
 

Thread Starter

joeyd999

Joined Jun 6, 2011
5,237
For fun, here's the assembly code to process the IIR filter:

Code:
;process iir filter

    pushsint adsxn            ;put current  value on stack
    pushfpc    ffca0            ;get a0 coefficient
    call    mulf            ;stack -> A0*Xn

    pushfl    adsyn            ;get Yn
    pushfl    ffcb0            ;get b0 coefficient
    call    mulf            ;stack -> B0*Yn

    call    addf            ;stack -> B0*Yn + B1*Yn-1

    pushfl    adsyn1            ;get Yn-1
    pushfl    ffcb1            ;get b1 coefficient
    call    mulf            ;stack -> B1*Yn-1

    call    addf            ;stack -> A0*Xn + B0*Yn + B1*Yn-1

;copy Yn to Yn-1

    movflfl    adsyn,adsyn1

;capture new filter output to Yn for next pass

    peekfl    adsyn
 

cmartinez

Joined Jan 17, 2007
8,220
For fun, here's the assembly code to process the IIR filter:

Code:
;process iir filter

    pushsint adsxn            ;put current  value on stack
    pushfpc    ffca0            ;get a0 coefficient
    call    mulf            ;stack -> A0*Xn

    pushfl    adsyn            ;get Yn
    pushfl    ffcb0            ;get b0 coefficient
    call    mulf            ;stack -> B0*Yn

    call    addf            ;stack -> B0*Yn + B1*Yn-1

    pushfl    adsyn1            ;get Yn-1
    pushfl    ffcb1            ;get b1 coefficient
    call    mulf            ;stack -> B1*Yn-1

    call    addf            ;stack -> A0*Xn + B0*Yn + B1*Yn-1

;copy Yn to Yn-1

    movflfl    adsyn,adsyn1

;capture new filter output to Yn for next pass

    peekfl    adsyn
Mind elaborating what the "mulf" function is/does? Or does it just multiply by a factor?
 

cmartinez

Joined Jan 17, 2007
8,220
mulf -- floating point multiply
divf -- floating point divide
addf -- floating point add
subf -- floating point subtract

...etc.
'nuff said... thanks. Another question... did you write those .asm routines yourself? I only write .asm for the 8051, that's why I'm asking.
 

Thread Starter

joeyd999

Joined Jun 6, 2011
5,237
'nuff said... thanks. Another question... did you write those .asm routines yourself? I only write .asm for the 8051, that's why I'm asking.
I write all my own libraries and code. I've never used a third party library. And I've never met a programmer I'd trust with my livelihood.
 

Thread Starter

joeyd999

Joined Jun 6, 2011
5,237
I'm with you on that... unless the code is open source. I just hate black boxes... that's why I'm disliking MS Windows more and more.
It's one of the main reasons why I dislike C for microcontrollers -- aside from the compiler inefficiencies.

Besides, why would I pay someone to interpret what I want to tell the microcontroller to do when I can just tell it what to do directly myself?
 

JohnInTX

Joined Jun 26, 2012
4,787
I write all my own libraries and code. I've never used a third party library. And I've never met a programmer I'd trust with my livelihood.

Besides, why would I pay someone to interpret what I want to tell the microcontroller to do when I can just tell it what to do directly myself?
+1

Also, try wrapping the whole thing in pink (no-stat) bubble wrap. Air currents over the board can create localized static charges...
 
Last edited:
Top