In The Trenches
account for the worst case scenario.
Otherwise, failures will occur. Some
failures are trivial. Others can be catastrophic. No good engineer tolerates
a failure based on faulty error estimates or wishful thinking.
So, why is the above frequency
error not the absolutely worst error
possible? It's because the accepted
practice is to measure the frequency
of a signal with the zero crossing
points. There are two basic reasons
for this. The first is that it's pretty
easy to determine the zero crossing
points. The second is that the steep-est slope of the sine wave is there,
which makes the measurement the
most precise. The error calculated
above is the worst case using standard
engineering practice.
The phase error is not measured
that way because proper phasing
implies that there are two systems
working together. (Any phase measurement must relate to another phase
measurement.)
Typically, phase measurements
are used in motors or positioning
systems. In such applications, phase
comparisons are required over the
whole 360 degree range. Therefore,
the worst case error must be defined
for a full 360 degrees. This is very
different from the frequency measurement that only required two points
on that 360 degree interval.
expect a decrease in error that is
equal to the square root of the
number of measures. (Four measures
reduces the error by a factor of two;
100 measures reduces it by a factor
of 10.) There are other, more complicated methods, as well. No error
reduction system is suitable for every
application. Be sure the method you
choose is appropriate.
Conclusion
Using a basic low speed A/D is
not always as simple as it first
appears. Amplitude, frequency, and
phase errors may be much larger
than expected. Knowing how to
anticipate and calculate these
errors is an important part of data
acquisition. NV
Reducing the Errors
ATMEL AVR ®
Based Controller
Micro64
AVR ® Based Controller
Pin 1
www.micromint.com
Optional 2-channel 12-bit ADC
8-channel 10-bit ADC
8 Single-ended Channels
7 Differential Channels
2 Differential Channels with
Programmable Gain (1x, 10x, 200x)
Byte-oriented Two-wire Serial Interface
(I2C)
Dual Programmable Serial USARTs
1 TTL
1 RS-232A, RS-422, or RS485
Master/Slave SPI Serial Interface
Two 8-bit Timer/Counters with Separate
Prescalers and Compare Modes
Two Expanded 16-bit Timer/Counter
with Separate Prescaler, Compare Mode,
and Capture Mode
Two 8-bit PWM Channels
6 PWM Channels with Programmable
Resolution from 1 to 16 Bits
Programmable Watchdog Timer with
On-chip Oscillator
29 Digital I/O that can sink or source 20
mA
Small size - 1.5" x 2.1" x 0.52
Dual powered - operates on +5V or
6.5-20V at 55 mA (typical)
Program and Data Memories
64k or 128k Bytes of In-System
Reprogrammable Flash with 10,000
Write/Erase Cycles
2 or 4 K Bytes EEPROM with 100,000
Write/Erase Cycles
36K Bytes SRAM
Programming lock for Software
Security
Peripheral Features
Starting at $119 - Single Qty
6P WM Programmable Lock
2 USART
Channels for Software Security
64 or 128k Flash ATmega64 I2C Bus
OR
4k Bytes
SRAM ATmega128 SPI Bus
2k or 4k Programmable 8-Chan.
EEPROM Watchdog Timer 10-bit ADC
Line Receiver
Line Driver
29
12-Bit ADC
Optional
Micro64 or Micro128 Connector
Serial I/O
RS-232A, RS422
RS485
Digital I/O
2
+V(8-16VDC
Unregulated)
VBAT
12-Bit ADC
Optional
5V Regulator
32k SRAM
Real-Time
Clock Calender
Optional
There are two common ways to
reduce basic errors at the A/D. As
noted above, you can increase the
sampling speed or increase the resolution. You can also use software.
Probably the easiest method is to use
multiple measures. I've discussed
this previously in my "Statistics"
columns (May and June 2004).
Very briefly, you can increase the
precision of a system by taking
repeated measurements of the same
signal and averaging them. The noise
in the measurements will tend to
cancel, while the true signal will tend
to reinforce itself.
In theory, you can generally
JANUARY 2005
Circle #35 on the Reader Service Card.
93