This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

24-bit A/D converter noise free resolution help

hi,
i am developing a weigh scale application using Cirrus Logic 5532 24-bit ADC in unipolar mode.the output i am getting is very unstable (flickering on display). Can anybody please tell me how to get a stable count.

  • 24 bits is a lot of resolution. How many digits are you trying to show on the weigh scale?

    Assuming that there is nothing fundementally wrong with your hardware, noise is still a fact of life. Dealing with noise in software falls into the domain of Digital Signal Processing. There is an excellent, practical on-line book on this vast subject:

    http://www.dspguide.com/pdfbook.htm

    You will find most of what you need in chapter 2.

    One of the best and simplest ways of dealing with noise is to take the arithmetic mean of a number of consecutive samples.

  • Analog signalling, noise-free at 24 bit ADC resolution? Sorry, but you're day-dreaming.

    24 bits corresponds to more than 140 dB of signal/noise separation. That level of noise suppression is hard to achieve even for a cable. For an electronic circuit of non-trivial complexity designed by anybody but a high-level expert on the topic, it's quite impossible.

    How many digits does that display of yours have, and how many of them are flickering?

  • Analog signalling, noise-free at 24 bit ADC resolution? Sorry, but you're day-dreaming.
    absolutely. It is easy to read a datasheet and say 24 but precision - WOW. Getting it is impossible (for less than $1.000.000 ?)

    A few facts from my experience (I have 12 scales in my resume) and recollections from previous posts by others.

    whatever your resolution you need to average

    to get much beyond 8 bit resolution you need a 4 layer board with separate analog and digital ground planes

    to get beyond 10 bits you need a chopper stabilized op-amp at the front end

    if you get to 12-14 bits you are darn good

    if you get to 16 bits someone will pay you a lot of money (the highest paid guy at the scale factory where I worked was the front end designer)

    if you get beyond 16 bits you most likely are lying.

    Erik

    PS
    The Burr-Brown '51 derivative with a 24 bit a/d was analyzed by someone when it came out (I can not find the analysis in the 2 minutes I am willing to spend on that - you are welcome to try at 8052.com if you do not believe me). The designer of the chip (Russell Anderson) posted a "reluctant" agreement to the analysis of the datasheet.

    Anyhow the analyss proved that if you set all errors to the max and min stated in the datasheet the precision of the chip itself is only 16 bits. Now add to that the errors introduced by the other circuitry involved.

  • an addition to the above:

    one very often overlooked fact is the resistors on the Op-Amp preceeding the A/D.

    If you visualize Rin and Rfb drifting 0.1% (yes THAT little) each their way, you get an errot of 0.2%. This corresponds to about 1 bit of 512 i.e. a 9 bit precision error.

    Another thing: my discussion above may lead to the impression that auto correction of zero and gain will cura all ills. While it is, indeed, required, it will not get you beyond the "practical limits" I posted above.

    Erik

  • Thanks for all the replies.
    first let me clarify that i am not looking for full 24-bit resolution.
    i just want 18 bits resolution with manageable noise to get a weight to count ratio of 1:5.

    please guide me as to how i should average the counts in my software so that the noise in the counts is not reflected in the weight displayed.

  • i just want 18 bits resolution with manageable noise to get a weight to count ratio of 1:5.
    "just" 18 bits, you've go to be kidding, good luck, you will need it. That requires a PhD in layout (read Howard Johnson, PhD for suggestions)

    please guide me as to how i should average the counts in my software so that the noise in the counts is not reflected in the weight displayed.

    you can not hide it to more than one or two bits of noise.

    the tried and true is (shown for avg of 16)

    for each reading of the loadcell
    array[index] = loadcell_weight
    index++
    index &= 15

    display weight = (array[0] + array[1] + ... array[15])/16

    however DO NOT BELIEVE that any amount of averaging will hide all noise.

    VERI careful hardware design and sophisticated layout is the only way

    Erik

  • CS5532 is a sigma delta A/D converter with chopper stabilized op-amp.
    its PGIA can be set from 1x to 64x and gain reg from 1 - 40.

    According to the datasheet the it offers less noise at low output word rate
    >>i am usng the chip at a output word rate of 7.5Sps with PGIA at 64x with gain register set at 4 , at which it should provide 19 bits of noise free resolution.i am using only 18 bits.my display is 6-digit 7seg display.

    >>my display is flickering in +/- 7 counts range with occasional surges in the count with weight to count ratio of 1:5, resluting in flicker in display of weight (+/- 3).i am using arithematic mean after every 2 readings.

    >>please tell me what else i can do to reduce the flicker and make it more stable.i also dont undestand why the occasional large deviations from the mean.i have already tried all other possible configration for the ADC.

    this is my first project,i have already completed the eeprom i/f ,display i/f and keyboard i/f.and implemented successfully both the i2c and spi protocols.this is the last hurdle ,so plz help me out.


    sorry for such a long explanation......

    Thanks in advance.

  • my display is flickering in +/- 7 counts range with occasional surges

    +-7 you may be able to (almost) average out, but the "occasional surges" need redesign/relayout you can not get rid of that in software. It HAS been tried, believe me, the costliest part of a scale is the analog, the $0.83 uC does not matter. Every scale manufacturer and his brother is trying to get by with a cheaper analog section, last I checked, no one had succeeded.

    One experience: if the chopper for the analog is not synchrounous with the uC clock you may get "funny things" I had to change a free running oscilator for the CSA to T2out.

    Erik

  • You are getting +/- 3 bits (i.e. 0..7) with occasional surges.

    Assuming you really have done everything possible to get the best possible signal, the only thing left is DSP.

    Digital Signal Processing sounds daunting, but don't be put off: the on-line book I mentioned is just what you need and it is the most readable text on the subject I have ever seen. If you are new to this, a little investment of effort now will pay good dividends in the future.

    http://www.dspguide.com/pdfbook.htm

    After looking at chapter 2, read chaper 15.

    The good news is that any amount of genuine random white noise can be eliminated from a signal; a moving window is the ideal algorithm; and a moving window is as simple as DSP gets! The bad news is that this may require in infinite number of samples to be processed. And, of course, your noise may not actually be random white noise.

    "The amount of noise reduction is equal to the square-root of the number of points in the average. For example, a 100 point moving average filter reduces the noise by a factor of 10."

    For your application, a moving average filter should be just the ticket. You will need a window size of about 100. 127 would be a good choice for a processing a ring buffer. To get a reasonable response, you will have to take samples every 10ms or more. Do note that a moving window is quite different from simply taking the average of n samples.

    Multiple passes, i.e. feeding the result of one moving average window into another moving average window, will give a nice smooth response. If you are not constrained by memory limitations consider up to four passes. While this does not actually improve the noise rejection, the smooth response should be just what is required for display purposes.

    Incidentally, I have some digital kitchen scales at home - I don't know how they work in detail, but they behave in a manner entirly consistent with this sort of implementation.

    Enjoy.

  • genuine random white noise
    Is rarely the problem with a scale. As Graham stated, that can easily be filtered buy moving averages (se my pseudocode above).

    The real problem (aside from drift) is the spurious noise. Many techniques have been tried and failed because someone putting something on the scale look exactly like spurious noise and a scale that takes many seconds to show the weight does not have many applications outside the laboratory. For a laboratory scale sometimes the ultimate precision is more important than fast weighing.

    Zero drift is such a problem that autocalibration is a must, for some reason full scale drift is not that big a problem.

    Erik

  • I see you're swimming in the deep end of the pool today. A lot of bandaids have been suggested here without getting at the cause of your signal variation, you need to understand exactly what is going on in your circuit before you slap a "fix" on it because it's likely to come back and bite you later. At > 14bits resolution there are usually many contributors to the errors which are loosely called noise. You need to do a set of experiments to isolate and measure those contributors, some are not obvious like encasing your circuit in a grounded metal box or running it from a battery instead of a bench supply. The first and most fundamental one is to take the two differential input pins and short them together, what does the output look like?
    Now tie them across vref, what does the output look like? You can do other things like this that take the circuit board out of the picture.
    In the original circuit does the amplitude of the noise change when you change the gain of the PGA?
    Expertise in this area comes from theoretical background combined with years of tinkering in the lab. As stated earlier these people are few and far between. Yours sounds like a commercial application so you should hire a consultant or plan to spend a lot of time in the lab. I routinely get converter limited performance with 14bit systems and have achieved 19 ENOBs using sigma delta converters and tightly bandlimited AC signals.

  • Once again thanks for all the replies.

    The first and most fundamental one is to take the two differential input pins and short them together, what does the output look like?

    As you suggested,i am doing offset calibration.The chip itself provides self offset calibration at different PGA gain settings using internal shorting of the differential pins.But As you mentioned it seems there is a zero drift taking place. should i provide recalibration option when the system is running.

    In the original circuit does the amplitude of the noise change when you change the gain of the PGA?

    The amplitude of noise does change when i increase the gain.

    some are not obvious like encasing your circuit in a grounded metal box or running it from a battery instead of a bench supply.

    Also since i am operating at low output word rate from the adc(this helps in reducing the noise),so i cannot perform more than 4 counts averaging as otherwise the display will take too long to settle.

    I have not yet encased the circuit as you mentioned. will placing it in a grounded metal case help in reducing the flicker.Also i am operating it on bench supply and not battery.

    I am currently calling the adc_read() function in the main loop,will placing the code in Timer ISR make any difference.is it possible that the occasional large deviations are due to incorrect read timings.

    Mine is a small budget project so i cannot invest in a DSP plus i have no prior experience in DSPs.

  • I agree with all points but would add one piece of advice. ALL digital I/O should cease during the ADC conversion. At least during sample if the chip has sample/hold.
    Bradford

  • Mine is a small budget project so i cannot invest in a DSP plus i have no prior experience in DSPs.

    You don't need a DSP chip to do digital signal processing. The moving average filter is not computationally demanding because it is easy to maintain the sum of all the values in a buffer. When a new value is added to the buffer, its value is also added to the sum. When an old value is released from the buffer its value is subtracted from the sum. It does not matter how long your buffer is, you just do one add and one subtract for each new value. An 8051 should be able to do this easily, all you will need is sufficient memory to store the buffer.

    Of course, for all the reasons already mentioned, DSP is not the answer to all problems with noise. However, it is likely that a moving average filter will find a proper place somewhere in your application.