Professional Documents
Culture Documents
Build A Smart AnalogProcess-InstrumentTransmitter With Low-Power Converters Anda Microcontroller PDF
Build A Smart AnalogProcess-InstrumentTransmitter With Low-Power Converters Anda Microcontroller PDF
2 ISSN 0161–3626 ©Analog Devices, Inc. 1997 Analog Dialogue 31-1 (1997)
WhyUseDSP? response shown in Figure 1, would have the following
characteristics:
• a response within the passband that is completely flat with zero
Digital Signal Processing 101— phase shift
An introductory course in DSP • infinite attenuation in the stopband.
system design: Part 1: Useful additions would include:
• passband tuning and width control
by David Skolnick and Noam Levine
• stopband rolloff control.
Having heard a lot about digital signal processing (DSP)
technology, you may have wanted to find out what can be done As Figure 1 shows, an analog approach using second-order filters
with DSP, investigate why DSP is preferred to analog circuitry for would require quite a few staggered high-Q sections; the difficulty
many types of operations, and discover how to learn enough to of tuning and adjusting it can be imagined.
design your own DSP system. This article, the first of a series, is
an opportunity to take a substantial first step towards finding
PASSBAND
answers to your questions. This series is an introduction to DSP
topics from the point of view of analog system designers seeking
IDEAL IDEAL
additional tools for handling analog signals. Designers reading this RESPONSE RESPONSE
series can learn about the possibilities of DSP to deal with analog
signals and where to find additional sources of information and
assistance.
|H(f)|
ROLLOFF ROLLOFF
0 90-TAP FIR
PASSBAND CUTOFF 1/2 LSB
FREQUENCY 0.5fS
–25 2
RELATIVE MAGNITUDE – dB
NOISE
20 24 48
FREQUENCY – kHz
–50
4
SIGNAL
ANALYSIS
DSP
SYSTEM
GUARD TIME
theChannel B
USER
A
USER
C
USER
B
USER
A
USER
TIME
FAR
ASYMMETRIC DIGITAL SUBSCRIBER LINE
USER B
ADSL is one of the many technologies competing to bring
broadband digital services into the home. The concept
underlying ADSL is to take advantage of the twisted-pair wires
POWER
USER
that already provide almost universal telephone service to homes
A
in the United States. Other services providing a two-way flow
RECEIVER
ANTENNA of information, such as ISDN (integrated services digital
NEAR network), require an additional, dedicated wire to provide
USER
USER A B service.
FREQUENCY ADSL uses frequency-division multiplexing (FDM) to convey
(OR TIME)
modulated digital information in the frequency space between
20 kHz and 1.2 MHz, above the frequency space occupied by
conventional voice traffic. This frequency separation allows an
Figure 4. Near-far effect calls for the ability to handle wide ADSL modem to operate without disturbing a phone call
dynamic range between adjacent channels. occurring at the same time—an extremely important feature.
Even if subsequent stages have a low enough noise floor to provide The ANSI standard for ADSL provides for simultaneous
dynamic range to recover the weak signal, there must also be a upstream (outgoing from the home) and downstream (incoming
very stringent constraint on the dynamic linearity of the gain stage; to the home) transmission using either FDM (separating the
harmonics or other spurious responses of the strong signal that upstream and downstream signals in frequency) or echo
wind up in the wrong frequency bin could easily obliterate the cancelling. Echo cancelling uses sophisticated signal processing
weaker desired signal. To reduce this interference problem, most (analog, digital, or both) to separate the strong transmitted
FDMA systems attempt to filter out unwanted signals early in the signal from the weaker received signal, passing only the received
receive circuitry. The ability to discriminate against unwanted signal to the demodulator. Using the conversational model, this
signals in adjacent frequency bands is usually referred to as a is analogous to a person who can effectively talk and listen at
receiver’s selectivity. the same time.
FLAGS INTERRUPT
5V/3V
ENABLE 5V/3V SHIFTERS LEVEL SHIFT
The software runs with a series of function keys, hot keys and on-
screen buttons. With it, the user can select sample rate, number of HIP Register Addresses
samples to be taken, analog input range, mode of operation and The microcontroller also writes a value of 0x03 to adö3ess 0x3FE0
control of on-chip registers. The software can also perform a to indicate that data has been received. These addresses are called
window function on the captured data, carry out a fast Fourier the HIP registers. There is also a HIP status register at address
transform (FFT), compute signal-to-noise ratio, and display the 0x3FE6. This register is checked to see if any new data has been
results. It can also display the spread of codes for a dc input and written to the HIP registers, by either the DSP or the PC. The
compute the mean and standard deviation of the distribution. The four-byte code sent to the DSP can be seen if the command line
software allows the captured data to be stored to a file, from which option -e+ is added to the program name running on the PC. For
it can be exported for processing by other software packages. Data instance, if the program being used is AD7892.EXE, the command
can be taken from a file (rather then captured from the evaluation line is AD7892.EXE -e+.
board) and processed off line. The first step in writing code for an application is to write all the
The Eval-Control Board thus fulfills its requirement of initial setup routines for the DSP—the interrupt vector addresses,
demonstrating nominal performance using the complete set of the serial port configurations and initialization of any flags that
software routines for the above functions. Once the designer has may be needed. (That part of the code, which depends on the
moved to the evaluation phase, these routines can be adapted to specific application, will not be shown in this article.) Once the
evaluate the device under application-specific conditions. Here the DSP has been set up, the program should wait for commands to
Process-Instrument
CONVERTER PROCESSOR CONVERTER
MEASUREMENT
CIRCUIT
COMMUNICATION
SYSTEM
aMicrocontroller factors and tabulate alternatives. Besides low cost, the all-important
constraint is that the entire circuit consume less than 3.5 mA (the
“low alarm” setting, 0.5 mA below the 4-mA signal floor), to permit
By Albert O’Grady & Jim Ryan. the transmitter to be loop-powered.
An analog transmitter is a field-mounted device that senses a
physical parameter such as pressure or temperature and generates 50Ω 3.3V
DN25D
LOOP POWER
BOOST
SENSORS 1.25V
REF IN REF OUT1
insensitive to noise and is not affected by changes in loop resistance; RTD
mV Ω TC ANALOG 100kΩ 4.7µF REF OUT2
REF IN
transmitters meeting the standard are interchangeable; and the TO
DIGITAL 4.7µF COMP
0.01µF
AMBIENT
power required to energize the transmitter circuits can be derived TEMP
SENSOR
CONVERTER DRIVE
VCC
AD7714/ CLOCK
from a remotely supplied loop voltage. Figure 1 shows a AD7715 MICRO-
LATCH
1kΩ
DATA
conventional transmitter circuit, consisting of a power supply, a MCLK IN CONTROLLER 1000pF
GND
AD421
current-manipulating transmitter, and a receiving controller. MCLK OUT LOOP
CS RTN
DATA OUT COM
CONTROLLER SCLK C2
C1 C3
SENSOR TRANSMITTER DATA IN
POWER SUPPLY DGND AGND
PGA
with the traditional 4-20-mA “dc” signal (Figure 3). The MODULATOR
MATRIX
AIN3
IN– BUFFER
communication channel allows both analog and digital versions AIN4
AIN5
DIGITAL FILTER
MCLK IN
A = 1–128
of the measured variable to be transmitted over the twisted pair, AIN6 CLOCK
SERIAL GENERATION
as well as control signals and diagnostic data relevant to the 24kΩ
1µA INTERFACE
MCLK
REGISTER BANK
transmitter, such as calibration coefficients, device ID, and data AGND OUT
REF IN (+)
relevant to fault diagnosis. Transmitter faults can be diagnosed 15kΩ REF IN (–)
POL
remotely—very useful for transmitters in hazardous locations. AGND
DGND
The Hart protocol is the de facto communication standard used DOUT DIN SCLK
BUFFER
by smart transmitters. It employs frequency-shift keying (FSK) OPTO-
ISOLATORS
LOOP POWER
be capable of supplying the total current required by the DVDD AVDD BOOST VCC LV HART
IN
REF IN REF OUT1
transmitter. The AD421 is available in a small-outline surface- SENSORS 1µF 10µF REF OUT2
10nF
RTD ANALOG COMP
mount package, which fits nicely in crowded explosion-proof mV Ω TC TO
REF IN
DRIVE
DIGITAL
housings. AMBIENT
CONVERTER
VCC RXD
1kΩ
TEMP TXD
AD422 1nF
AD7714/
Besides the advantages of integration, another benefit is that the SENSOR
AD7715 RTS
CD
device’s current-loop control performance is specified, avoiding MICRO- SCLK LOOP
MCLK IN SDATA RTN
the need to calculate error budgets involving multiple devices.The CONTROLLER
DLATCH
CLATCH
AD421 features an SPI type three-wire interface that allows easy MCLK OUT
CS WDO
and efficient interface to most microcontrollers and requires a DATA OUT GND WDI ALARM
RST
minimal number of opto-isolators if galvanic isolation of the loop SCLK
DATA IN
from the transducer is needed for intrinsic safety. MCLK IN HART
OUT
1.2nF
The AD421 was designed for use in both smart and intelligent MCLK OUT
C1
DGND AGND COM C2
transmitter applications. Smart transmitters (Figure 4), though
0.15µF
digital in operation, simply produce analog loop current 0.15µF
BOOST
SENSORS
RTD REF IN
1.25V
REF OUT1 As smart transmitters are remote instruments with no means
mV Ω TC 4.7µF REF OUT2
ANALOG 100kΩ
of communication other than the analog PV signal, they could
TO REF IN 0.01µF
DIGITAL 4.7µF
AMBIENT
TEMP CONVERTER
COMP
not be interrogated for status information (but an extra alarm
DRIVE
SENSOR
AD7714/ VCC CLOCK 1kΩ bit is available to output currents less than 4 mA or greater
AD7715 LATCH
MCLK IN
MICRO-
CONTROLLER
DATA than 20 mA). Intelligent transmitters, however, can
1000pF
GND
AD421 communicate with the control room interactively so that
MCLK OUT LOOP
CS
COM
RTN detailed status information can be polled at any time. HART
DATA OUT
SCLK C1 C2 C3 circuitry can replace an existing smart or analog transmitter
DATA IN
DGND AGND installation without having to run new cabling—a major
CC advantage because a large proportion of existing transmitter
HART
WAVEFORM installations can be upgraded simply by replacing the existing
SHAPER
MODEM
BELL 202 BANDPASS
FILTER
transmitters with HART-compatible transmitters. The
HT20C12/20C15
intelligent transmitters also allow the performance of process
Figure 6. Complementing the smart transducer of Figure 4 control loops to be improved. For example, the control room
with a discrete HART modem. can remotely “trim” the transducer output. Transmitters are
often capable of measuring two process variables (primary and
A new device, the AD422,* reduces the physical complexity of
secondary process variables) instead of the single PV that can
intelligent transmitters using the HART protocol. It combines the
be transmitted via a simple 4-to-20-mA interface. Intelligent
AD421’s functional blocks (voltage regulator, DAC, current control
transmitters can send information on two PVs, plus other
loop and references) with a HART modem and several supervisory
relevant information. HART configurations can also feature
circuits (watchdog timer, alarm input and reset generator)—all
digital communication alone; the analog current is used solely
on a single chip! It is a highly integrated solution specifically
as a vehicle for the digital information.
targeted to design of intelligent transmitters (Figure 7), with a
greatly reduced component count. b The protocol has many layers closely related to the seven-layer
OSI model. The AD422 from Analog Devices is a solution at
*For technical data on the AD421 and AD422, consult our Web site,
the physical layer; the others are implemented in software.
www.analog.com, use Faxback (see p. 24), or circle 6
All brand or product names mentioned are trademarks or registered trademarks of their respective holders.
*For immediate data, visit our WorldWide Web site: http://www.analog.com. In North America, call ADI’s 24-hour AnalogFax™ line, 1 (800) 446-6212 and use Faxcode.
All brand or product names mentioned are trademarks or registered trademarks of their respective holders.
*For immediate data, visit our WorldWide Web site: http://www.analog.com. In North America, call ADI’s 24-hour AnalogFax™ line, 1 (800) 446-6212 and use Faxcode.
All brand or product names mentioned are trademarks or registered trademarks of their respective holders.
*For immediate data, visit our WorldWide Web site: http://www.analog.com. In North America, call ADI’s 24-hour AnalogFax™ line, 1 (800) 446-6212 and use Faxcode.
All brand or product names mentioned are trademarks or registered trademarks of their respective holders.
*For immediate data, visit our WorldWide Web site: http://www.analog.com. In North America, call ADI’s 24-hour AnalogFax™ line, 1 (800) 446-6212 and use Faxcode.
4991
1ST DIGIT
1ST DIGIT THE INDICATED RESISTANCE HERE
EXAMPLE:
RED-YELLOW-ORANGE-GOLD 2ND DIGIT IS 4990Ω. FOR VALUES LESS THAN 100,
2ND DIGIT “R” INDICATES A DECIMAL POINT,
WOULD HAVE A RESISTANCE
OF 24,000Ω with 5% TOLERANCE 3RD DIGIT e.g., 49R9 49.9Ω
MULTIPLIER
NUMBER OF ZEROS
TOLERANCE
Thin film networks are moderately priced and offer good R2' R3'
matching (0.01%), plus good TC (<100 ppm/°C) and tracking VIN +
A2
(<10 ppm/°C). All are laser trimmable. Thin film networks are
manufactured using vapor deposition.
Tables 4 compares the advantages/disadvantages of a thick film Matching, rather than absolute accuracy, is also important in
and several types of thin-film resistor networks. Table 5 R-2R ladder networks (including the feedback resistor) of the
compares substrate materials. type used in CMOS D/A converters. To achieve n-bit
Table 4. Resistor Networks performance, the resistors have to be matched to within 1/2n,
which is easily achieved through laser trimming. Absolute
Type Advantages Disadvantages
Thick film Low cost Fair matching (0.1%)
accuracy error, however, can be as much as ± 20%. Shown here
High power Poor TC (>100 ppm/°C) is a typical R-2R ladder network used in a CMOS digital-
Laser-trimmable Poor tracking TC analog converter. b
Readily available (10 ppm/°C)
Thin film on Good matching (<0.01%) Delicate R R R R R
glass Good TC (<100 ppm/°C) Often large geometry
Good tracking TC (2 ppm/°C) Low power
2R 2R 2R 2R 2R RFB
Moderate cost
Laser-trimmable
Low capacitance