At 09:28 AM 9/23/99 +1000, Thomas wrote: >I'd only seen the Nyquist theorem related to the conversion of periodic >signals into constituent sine waves. I know if you take simple voltage >measurements ignoring the Nyquist frequency and then try to get the >constituent sine waves that will be wrong. > >But if you simply sample the voltage every 0.5ms and convert that to a value >in the range 0-128 will the aliasing have a noticeable effect? (Answer from >your previous mail would be there is an effect. Is it noticeable?) The sampling rate doesn't determine the Nyquist frequency, the signal spectrum does. How fast does the measured voltage change? How did you arrive at the 0.5 ms sampling rate? Usually the first step is to characterize the signal. Then position the sampling rate at 2x-10x (more the better) to eliminate the signal-aliasing problem. Then put in a low-pass or band-pass filter to limit the wide-band noise. The crunch here is the sampling rate you really need may not be obtainable with the ADC you've got. In this case, you sample at the highest rate you can, and then set the anti-aliasing roll-off at 1/2 the sampling frequency. This takes care of both signal fold-down and wide-band noise, but you will get distortion by chopping off the signal high frequencies. So you'll really be sampling a 'smoothed' signal which is a moving-average of the real signal (smoothed plus time-lagged). >So, in my system with 16 knobs and a 1MSPS ADC that's 62500 samples per knob >per second theroetically. So would I filter at ~125000kHz would I? Well, I >know I can't turn a knob 62500 times a second so No, the filter would roll-off at a frequency no higher than 1 kHz, since you're sampling at 2,000/sec. More likely the knobs won't be changed even that quickly. If a human is changing the knobs, you would be better advised to sample more slowly, say <= 30/sec and set a low-pass filter with roll-off at < 15 Hz to kill the inevitable 60 Hz hum. >I ain't gonna introduce that frequency. And there's a bit or breathing room >with the 50-60Hz hum. So I guess the only thing I'd need to filter is EMI. >Is there an inordinately high ammount of EMI >125kHz? If not then it >shouldn't need the filter as if enough high end EMI is getting through >there'll be too much low freq. EMI anyway. 1. See previous remark. 2. You probably have a spike in your noise frequency at 4 MHz, or 20 MHz, or whatever your clock operates at, plus sum submultiples and higher multiples of that. So you can expect plenty of digital noise. 3. You probably have power supply ripple at about 1 kHz. However, this is usually very amplitude limited (e.g., < 1 mV p-p), so it won't be an issue except with high resolution ADCs. ================================================================ Robert A. LaBudde, PhD, PAS, Dpl. ACAFS e-mail: ral@lcfltd.com Least Cost Formulations, Ltd. URL: http://lcfltd.com/ 824 Timberlake Drive Tel: 757-467-0954 Virginia Beach, VA 23464-3239 Fax: 757-467-2947 "Vere scire est per causae scire" ================================================================