??? 10/21/07 02:11 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#145963 - DVM Responding to: ???'s previous message |
Jason Arkwright said:
Hello friends,
There are many different types ADC'c around, successive approximation, dual slope, multi slope and sigma delta. I've played with 'em all. The problem is, always the last digit jumps around and in some cases(SAR in particular) the last two digits jump around. Now you may say, so what!, but digital multimeter manufactures did'nt say so what, since their readings are stable. Someone remarked that I need to implement a low pass (CR circuit) filter in software but how the hell do do that? DVM outputs are ALSO not stable, they are also rarely more than 10 bit ADCs. Some of your problems are probably crappy circuit layouts, particularly grounds, inattention to filtering caps on everything, splitting analogue and digital grounds - its a black art that takes a lot of learning. Try searching for notes here by folks like Kai Klass on ground techniques. An RC filter is simply a couple of components added at the input. Put a largeish resistor in series with the input to the ADC and your input line. At the ADC input pin, connect a largish DECENT capacitor (polyesters work well) to ground. If you have an RC time constant of more than 1/2 second, say 1 meg and 0.47uF (megs x micro = timeconstant in seconds), you'll hopefully see a significant improvement. If you have a microprocessor though, you can average in software by implimenting an "exponential forgetter" - there are some code examples here, or "moving average filter" basically, Current result = (1-k)*previous result +k*current sample from ADC 0<K<1 Play with K till you get acceptable results. You can also fancify the filter by kicking out wild outliers automatically. Steve |