ADS1231: data conversion noise

Thread Starter

kevinnas

Joined Jul 31, 2017
77
Hi..
I just managed to get rid of some of the peaks. (I had been measuring data with the DMM connected at the input, so I am guessing this was causing problems). I also Placed a 1uf cap between AINPP and AINN. Now I get about noise of about 2000-3000 codes P-P at 80sps.
I still have one more peak to get rid of, which is the one occuring at the 419th sample (freq = 31.49).
I have attached the data how it looks now.. I do not have anymore periodically repeating data now! does the data look like something I can work with? or I need to get rid of that peak before I do anything else?
 

Attachments

joeyd999

Joined Jun 6, 2011
6,279
Hi..
I just managed to get rid of some of the peaks. (I had been measuring data with the DMM connected at the input, so I am guessing this was causing problems). I also Placed a 1uf cap between AINPP and AINN. Now I get about noise of about 2000-3000 codes P-P at 80sps.
I still have one more peak to get rid of, which is the one occuring at the 419th sample (freq = 31.49).
I have attached the data how it looks now.. I do not have anymore periodically repeating data now! does the data look like something I can work with? or I need to get rid of that peak before I do anything else?
Actually, you do have periodic noise -- at exactly 31.49Hz.

It's your project, you decide what is good enough.

But you've only spent one day, and removed all noise except for one injected peak. For a novice, this is pretty remarkable.

I'd spend more time trying to eliminate the last peak. If nothing else, you are going to learn a lot, and acquire a great deal of marketable experience, if you successfully run it down.
 

Thread Starter

kevinnas

Joined Jul 31, 2017
77
This is just math. The noise is "referred" to the input -- in other words, what would input signal noise have to look like in order to produce the same digital result.

35 nVrms is equivalent to 35 nVrms / (1.416 nV/count) = 24.8 counts RMS.
.
Sorry to go back to this, but I actually did not understand this line.
as you mentioned each code represents 11.875 mV / 8,388,608 ~= 1.416 nV.
So lets say my system and the ADS1231 are ideal and I get a constant no load output of 300000 (offset) (therefore 1.416nV * 300000 = 0.425mV). for me to get the noise data in nV (Which should be 0 p-p since all the data will be constant 300000 or 0.425mV as a voltage) is it just a matter of dividing this by 1000000 to get the data in nV? like if I want to compare my data to their data. In your calculations above you used 35nVrms that they have in the table to get 24.8 counts RMS but what does that represent?
 

joeyd999

Joined Jun 6, 2011
6,279
So lets say my system and the ADS1231 are ideal and I get a constant no load output of 300000 (offset) (therefore 1.416nV * 300000 = 0.425mV).
Correct.

for me to get the noise data in nV (Which should be 0 p-p since all the data will be constant 300000 or 0.425mV as a voltage) is it just a matter of dividing this by 1000000 to get the data in nV?
Yes. Keep in mind the individual code numbers represent really, really small incremental voltages. This is due both to the resolution of the converter (24 bits) and the internal PGA (x128).

In your calculations above you used 35nVrms that they have in the table to get 24.8 counts RMS but what does that represent?
I don't understand what you mean by "represent", but 24.8 counts RMS of noise on the digital output is equivalent to 35 nVrms of noise referred to the input.

Think of it another way: assume the A/D conversion process is absolutely noiseless. Any voltage supplied to the input is exactly represented by the digital output with no error, and no additional noise created by the conversion process itself. If the resulting digital code train had 24.8 counts RMS of noise, this would imply an AC voltage source at the input with 35nVrms of analog noise.

This is important because it allows you to analyze the noise performance with respect to your actual input signal while ignoring the effects of the PGA and converter.
 

joeyd999

Joined Jun 6, 2011
6,279
Lets put it another way.

You haven't told us what the full-scale output of your load cell is, but let's assume for discussion it's 2 mV/V, which is typical.

You are supplying 3.04V to the load cell, so the full-scale output voltage (difference between no load and full load) is 3.04V * 2 mV/V = 6.08 mV.

At 80 sps, you are getting a max p-p noise of 3,000 counts. Referring this back to the input, this is equivalent to (3000 counts) * (1.416 nV/count) = 4.248 uV p-p. This is the best resolution you will attain (i.e. you can resolve the input signal to no more than 4.248 uV).

Your dynamic range is (6.08 mV / 4.248 uV) = 1431 to 1 (63dB). In other words, there are 1,431 individual steps you can actually resolve -- anything smaller will be uncertain.

1,431 steps (or, divisions as they are called) is equivalent to log(1,431)/log(2) = 10.5 bits of performance.

This is no where near the actual capability of the chip (15.4 noise-free bits at 80sps and 3V Vref).

15.4 bits represents 43,238 divisions (92db dynamic range).

Edit: Oh! I should point out that you are consuming about 2 bits of your dynamic range because your full-scale output voltage (6.08mV) is about 1/4 of the total input voltage range of the ADS1231 with 3.04V reference voltage (input range from -11.875 mV to +11.875 mV or 23.75mV overall). Therefore, the best you can expect is 13.4 bits or 10,809 divisions (80.6 dB).
 
Last edited:

Thread Starter

kevinnas

Joined Jul 31, 2017
77
Lets put it another way.

You haven't told us what the full-scale output of your load cell is, but let's assume for discussion it's 2 mV/V, which is typical.

You are supplying 3.04V to the load cell, so the full-scale output voltage (difference between no load and full load) is 3.04V * 2 mV/V = 6.08 mV.

At 80 sps, you are getting a max p-p noise of 3,000 counts. Referring this back to the input, this is equivalent to (3000 counts) * (1.416 nV/count) = 4.248 uV p-p. This is the best resolution you will attain (i.e. you can resolve the input signal to no more than 4.248 uV).

Your dynamic range is (6.08 mV / 4.248 uV) = 1431 to 1 (63dB). In other words, there are 1,431 individual steps you can actually resolve -- anything smaller will be uncertain.

1,431 steps (or, divisions as they are called) is equivalent to log(1,431)/log(2) = 10.5 bits of performance.

This is no where near the actual capability of the chip (15.4 noise-free bits at 80sps and 3V Vref).

15.4 bits represents 43,238 divisions (92db dynamic range).

Edit: Oh! I should point out that you are consuming about 2 bits of your dynamic range because your full-scale output voltage (6.08mV) is about 1/4 of the total input voltage range of the ADS1231 with 3.04V reference voltage (input range from -11.875 mV to +11.875 mV or 23.75mV overall). Therefore, the best you can expect is 13.4 bits or 10,809 divisions (80.6 dB).
Thanks for the explanation I finally understand!
 

joeyd999

Joined Jun 6, 2011
6,279
If you can not get rid of the last peak, here is a trick to nearly completely digitally filter that peak out of the data, assuming the (I calculated) peak is constant and at exactly 32.734 Hz:

If you sum 61 samples at a time (equivalent conversion speed = 80 sps/61 samples = 1.31 sums/second), the result is that the 32.734 Hz peak will be (nearly) completely canceled out. Here's why:

The period of conversion is 1/80 s, or 12.5 ms.

The period of the noise is 1/32.734 Hz = 30.549 ms.

The period of 61 samples = 12.5ms * 61 = 762.5 ms.

762.5 ms contains 762.5ms / 30.549 ms = 24.96 periods of noise (nearly exactly 25 periods).

Those 25 periods will (nearly) exactly zero out, thereby eliminating that peak as a contribution to the noise.

In addition, you will also gain sqrt(61) = 7.81x improvement in (asynchronous random) S/N for the overall noise exclusive of the 32.7 Hz peak. This is nearly a 3 bit increase in overall performance, giving you a possible dynamic range of 16.4 bits or 84,424 divisions (98.5 dB).

This is a significant improvement over the 10.5 bits you are getting now -- albeit at the cost of conversion speed. And you must remember that the value of the sums will be 61 times the values acquired from the A/D. This changes your scaling factor.
 

joeyd999

Joined Jun 6, 2011
6,279
I just realized: you said the peak was at the 419th element of the FFT. Are you considering the 1st element of the FFT as 0 or 1? This makes a difference.

If you count the first element as 0, then my last post stands.

If you count it as 1, then some recalulations are in order.

The noise frequency will be 32.65625Hz.

You will need to sum 49 acquisitions (for an ultimate data rate of 49/80 = 1.63 sums per second)

49 sample times = 0.6125 seconds = 20.0020 periods of 32.65625 Hz.

S/N improvement = sqrt(49) = 7:1 ~= 2.8 bits.
 

joeyd999

Joined Jun 6, 2011
6,279
Further:

Case 1 -- you counted 1st element as 0:

Residual p-p noise due to 32.734 Hz after filtering will be ~30 counts p-p (divided by 61 for comparison to original data = ~1/2 count p-p).

Case 2 -- you counted 1st element as 1:

Residual p-p noise due to 32.65625 Hz after filtering will be ~1.84 counts p-p (divided by 49 for comparison = ~0.04 count p-p).

The residual in these cases should be much less than the inherent conversion noise, and will have a very slow beat. I'm too exhausted to calculate what the beat frequencies will be right now, but they will be slow -- on the order of many seconds.
 

Thread Starter

kevinnas

Joined Jul 31, 2017
77
Hello.
How are you calculating these sum acquisitions? 61 and 49? just incase the peak does appear at a different frequency, I will know how to calculate this?
additionally. When you said:
It's not. You'd see peaks at precisely 20Hz (for 60 Hz power) or 30Hz (for 50 hz power). I don't see that.
Is that something standard or there is a way to get those numbers? why would it be 30Hz for 50Hz power etc.? Is there a way of knowing what type of noise it is at different frequencies or it is just something u have from experience?
 

joeyd999

Joined Jun 6, 2011
6,279
Is that something standard or there is a way to get those numbers? why would it be 30Hz for 50Hz power etc.? Is there a way of knowing what type of noise it is at different frequencies or it is just something u have from experience?
At 80sps, your Nyquist frequency is 80Hz / 2 = 40Hz.

Anything signal between 40Hz and 80Hz will be aliased -- folded back about a 40 Hz mid point.

50Hz is 10Hz greater than 40Hz, so it would form an aliased peak at 40Hz - 10Hz = 30Hz.
60Hz is 20 Hz greater than 40 Hz, so it would form an aliased peak at 40Hz - 20Hz = 20Hz.

I will admit I am experiencing a tad bit of confusion regarding your FFT -- I don't know what software you are using, so I don't know what the data output range is supposed to be. Usually, the range (x-axis) is -fmax to 0 to +fmax, where fmax is 40Hz. But in your case, it looks like the 0Hz datapoint is at the far ends, so I went with that. You should be able to confirm this with a scope -- there's gotta be a ~32.5Hz signal you can see somewhere.

How are you calculating these sum acquisitions? 61 and 49? just incase the peak does appear at a different frequency, I will know how to calculate this?
additionally.

This can be done by hand, but I made a spreadsheet (LibraOffice) to do it quickly. I am looking for an appreciably small "% Residual" (i.e. how well is a whole period of noise captured by a whole number of samples). I selected 61 (in case one), but I could just have well selected 66 for even better (albeit slower) performance.

I've attached the spreadsheet. Remove the .txt to open the file.

To use the sheet:

1. Set the FFT offset to 0 or 1 (what are you calling the first element as discussed above).
2. Enter the noise peak element number in "Noise FFT Point".
3. Scroll down and determine the number of sums you wish to used based upon the "% Residual" value. More sums = slower response.
4. Enter the number of sums at the top left of the sheet under "Choose"

You can enter other numbers for "Choose" to see how noise reduction compares at different number of sums.

Usually, my spreadsheets are a whole lot prettier and easier to use/comprehend. I threw this one together quickly.
 

Attachments

joeyd999

Joined Jun 6, 2011
6,279
If you want, post a .txt file with the actual 1,024 datapoints, and let me run my own FFT. Then I can confirm the actual frequency if I am wrong.
 

joeyd999

Joined Jun 6, 2011
6,279
BTW, my motivation for helping you is selfish. I usually use the ADS1242 -- and I know exactly what to expect from it.

The ADS1231 is slightly less pricey, and I may have a use for it. I am using you to help me gauge its ultimate performance. So, I'd really like you to find and eliminate that noise peak.
 

Thread Starter

kevinnas

Joined Jul 31, 2017
77
If you want, post a .txt file with the actual 1,024 datapoints, and let me run my own FFT. Then I can confirm the actual frequency if I am wrong.
BTW, my motivation for helping you is selfish. I usually use the ADS1242 -- and I know exactly what to expect from it.

The ADS1231 is slightly less pricey, and I may have a use for it. I am using you to help me gauge its ultimate performance. So, I'd really like you to find and eliminate that noise peak.
ahh No worries :) hopefully it will be of use to both of us!

I cannot seem to open your file.
I think the actual frequency is 32.8125Hz
 

Attachments

Top