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.
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
thanks
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.
We use the same CS5532 for current measurement in battery management systems and I agree that its output might be very noisy. I use the upper 16 bits of the 24 bit AD-result and there's still noise. Noise depends on the hardware design (PCB Layout...). Don't use the same ground and supply for AD-converter and controller. The controller is very noisy, and that might also influence its supply. Before using software filtering (moving AVG), a hardware filter (i.e. anti aliasing filter) and perhaps a pre-amplifier (instrumention amplifier) is necessary.
Mine is a small budget project so i cannot invest in a DSP plus i have no prior experience in DSPs. 1) there is no need for a DSP 2) "limited budget" and "24bit ADC" - the joke of the year. You can NOT achieve anything above 14 bits without a 4 layer board, a chopper stabilized op-amp with expensive high precision resistors, a high precision voltage reference, an extremely quiet power supply ...... Erik
this is my first project ... Get an analog PCB layout book or you will never get anywhere with this. Erik
First of all i would like to tell u that the problem was with power line noise rejection. I had wrongly configured the ADC for 60Hz noise rejection(7.5Sps OWR) instead of 50Hz noise rejection and corresponding OWR of 6.25Sps.The display is now much stable(+-1 weight). this is my first project ... Get an analog PCB layout book or you will never get anywhere with this. This really is my first project. i am only developing the software for the project invloving the interfacing of the uc with the ADC, display, keyboard and AT24C02 eeprom in C using keil C51 tools and hence wanted to how if any coding could control the flickering. i was not part of the pcb desinging and layout process.
First of all i would like to tell u Why do you use the forum to tell micro something? now: The display is now much stable(+-1 weight). earlier: my display is flickering in +/- 7 counts range with occasional surges do you still have the "occasional surges"? Erik