Documente Academic
Documente Profesional
Documente Cultură
DATA ACQUISITION
Multi-channel data
acquisition system
The paper aims to
establish a synergy for
achieving a high level of
analog performance,
while keeping system
complexity low. An 8channel system provides
several orders of magnitude of improvement
over a single channel
data acquisition system.
0.1F
ADS1250
0.1F
ADS1250
0.1F
By Robert Schreiber
Strategic Marketing Engineer
Burr-Brown Corp.
ADS1250
SX52
DRDY
CS
0.1F
DSYNC
Analog
inputs
CLK
SCLK
ADS1250
0.1F
DOUT
8
RB
RB1
RB2
RB6
RC2
PORT A
G1,G0
16
PORTS D, E
ADS1250
0.1F
ADS1250
0.1F
ADS1250
0.1F
Test Lab
Whats Online
DATA ACQUISITION
Optimum technology
combination
Individual analysis of the main
system components enables us to
choose an option that provides the best
combination of technology. For the A/
D converter, the most popular architectures for these types of applications
are successive approximation register
(SAR) and delta-sigma A/Ds.
The SAR architecture can easily
meet the sampling rate requirement,
but the resolution is a limitation. The
SAR technology is currently limited
to 16-bit resolution. To get 20-bit
resolution would require external
circuitry and increase the system
complexity. On the contrary, the deltasigma architecture can easily meet the
resolution requirements, but the
sampling rate has traditionally been
the shortcoming. However, recent
improvements in the technology now
make it possible to run the architecture at up to 25kHz with 20-bit
resolution. The delta-sigma architecture also provides a side benefit; it has
inherent digital filtering. The inherent
digital filtering in the A/D eliminates
Multi-channel architecture
If we are looking at processing eight
channels of 20-bit data at a 20kHz
sampling rate, that translates to
3.2Mbps. This poses a daunting task.
Transferring that amount of data can
be easily accommodated with high
speed serial peripherals that are now
prevalent on many microcontrollers.
However, the problem lies in the fact
+ 5V
+ 5V
0.10F
7
4.99k
2
10k
OPA350
To VREF
Pin 5 of
the ADS1250
+
10F
10F
0.10F
LM404-4.1
Figure 2
2: PWM output for driving the system clock.
0.1F
www.ee.globalsources.com/
ART_8800031343.HTM
Setting up high-performance
data acquisition system
www.ee.globalsources.com/
ART_8800020501.HTM
www.ee.globalsources.com
that the A/D data is coming from
eight separate channels. We could
time multiplex the data to stagger the
reception of data, but this poses
another problem. In order to do that,
we must have a method of controlling
the flow of data into the serial port.
This essentially means adding external multiplexers, which increases the
complexity of the system.
In order to keep the system complexity low; we have eliminated DSPs,
high-end microcontroller, programmable logic and a hardware serial
interface. What we have left is an 8-bit
microcontroller with direct port control
or bit banging, to shift the data from
the A/D converter to the microcontroller. The two essential factors
that limit the data throughput via port
manipulation are the microcontroller
core and the speed at which it can run.
These two parameters translate
directly into MIPS performance.
Therefore, we must find a
microcontroller core that, first, is
efficient in its instruction execution
and second, can run at high speeds.
There are many 8-bit microcontroller
cores that run at a few MIPS, and a
handful that run up to about 10MIPS.
However, this is still not sufficient
performance to handle the task at
hand. We need a core that can run
about 50MIPS or better. There is a
RISC 8-bit core that can run up to
100MIPS, which will give us the
Test Lab
DATA ACQUISITION
mov
mov
mov
mov
W, #$1F
M, W
W, #$01
!RB, W
mov
mov
mov
mov
W, #$1A
M, W
W, #$01
!RB, W
mov
mov
mov
mov
W, #$19
M, W
W, #$00
!RB, W
mov
mov
mov
mov
W, #$1B
M, W
W, #$FF
!RB, W
; clear W
; clear all wake-up pending flags
Test Lab
DATA ACQUISITION
System configuration
We have already discussed the main
feature of the microcontroller, MIPS.
There are also some additional functions of the microcontroller, which
allow a further reduction in system
complexity. First is external interrupt
capability. Since a new data conversion
is signaled by the A/D converter by
taking DRDY low, the microcontroller
interrupt capability can be used to
commence data shifting (table 1).
Another important feature is the onboard pulse width modulator (PWM).
The PWM can be used to generate the
system clock for the A/D converter. In
addition, since the PWM frequency
and duty cycle is programmable, the
sample rate of the A/D converter can
be controlled from DC to 25kHz (the
maximum sample rate of the device)
by merely changing register values.
Next, the PWM should be configured to run the A/D system clock.
Conversion, interrupt
operations
Now that the part is configured, we
are ready to start converting data. On
power-up, we drove DSYNC low and
Function
Cycles required
1,310
210
2,250
Total
3,770
Table 2
2: Estimated number of instruction cycles to implement data transfer and calibration.
Test Lab
DATA ACQUISITION
this places the part in a hold state. When we drive DSYNC
high, the part is released from hold and starts performing
conversions. When a conversion completes, the DRDY line
goes low, which generates an interrupt on the microcontroller. The microcontroller vectors to the interrupt handler,
takes chip-select low, and then shifts the data in. The A/D
converter shifts most significant bit (MSB) first. Since all
the DOUTs from the A/D converters are brought in on one
port, the data is shifted in bit-by-bit, MSB to LSB.
It only takes one instruction cycle to read a bit from all
eight channels. The remainder of time is spent converting
the bit data into channel data. There are numerous techniques that can be used to shift the data into the
microcontroller, but the method used in this implementation
is very efficient in resource usage. Once the data is shifted
into RAM, chip-select is taken high and the interrupt handler
is exited. The microcontroller can spend the rest of the time
performing linearization or calibration on the data.
By running the microcontroller at its rated speed of
100MHz, the resolution of the PWM will let us run the
PWM at 8.333MHz. We could actually run the PWM at
50MHz, but this is well over the specified clock frequency
of 9.6MHz for the A/D. The 8.333MHz PWM frequency
translates into a sample rate of 22kHz for the A/D, which
allows approximately 46s between conversions.
For the microcontroller, 46s equate to 4,600 instruction
cycles between conversions at 100MHz. If all we wanted
to do was data averaging, we could dramatically reduce the
clock frequency of the microcontroller and still have
sufficient throughput to accomplish this. Data averaging
and data transfer could easily be accomplished in less than
half the time between conversions. However, if we want to
perform more intensive computations, such as full-data
calibration on all eight channels, then throughput could be
an issue.
Table 2 summarizes the number of instruction cycles
required to transfer the data from the A/D converter, and to
perform offset and gain corrections on the eight channels of
20-bit data. The table shows that it requires approximately
3,800 instruction cycles to perform all these tasks. This
means that we can clearly handle processing eight channels
of 20-bit A/D data at a 22kHz rate. Overall, we are using
about 86 percent of the A/D converters performance and 84
percent of the microcontrollers performance.
In conclusion, we used high performance analog and
digital technology to achieve a multi-channel, high resolution and high sample-rate data-acquisition. We achieved
this through a high level of integration while keeping
system complexity low.
You may e-mail Robert Schreiber at schreiber_robert@
burrbrown.com, or fax: 1-520-7467467.