![]() |
| Smart Star User's Manual |
8. A/D Converter Cards
Chapter 8 describes the features of the A/D Converter Card, one of the I/O cards designed for the Smart Star embedded control system.
The Smart Star is a modular and expandable embedded control system whose configuration of I/O, A/D Converter, D/A Converter, and Relay Cards can be tailored to a large variety of demanding real-time control and data acquisition applications.
The typical Smart Star system consists of a rugged backplane with a power supply, a CPU card, and one or more I/O cards. The CPU card plugs into a designated slot on the backplane chassis, which has seven additional slots available for I/O cards to be used in any combination. A high-performance Rabbit 2000 microprocessor on the CPU card provides fast data processing.
8.1 A/D Converter Card Features
Three models of A/D Converter Cards are available, as shown in Table 14.
Table 14. Smart Star A/D Converter Cards 12-bit A/D converter, 11 channels, 0 V - 10 V
12-bit A/D converter, 11 channels, -10 V - +10 V
12-bit A/D converter, 11 channels, 4 mA - 20 mA
8.2 User Interface
Figure 33 shows the circuit used to condition the analog signal before it goes to the A/D converter chip. Depending on the model of A/D Converter Card you have, it is designed to handle analog inputs of 0 V to 10 V, -10 V to +10 V, or 4-20 mA. The two different voltage ranges are handled with different gain resistors, Rg: 23.7 kW for the SR9300 and 12.1 kW for the SR9310. The input shown in Figure 33 is configured differently for the SR9320, which handles analog inputs of 4-20 mA.
![]()
The TLC2543 A/D converter chip on the A/D Converter Card uses synchronous Serial Port B and Timer A5 on the Rabbit 2000 to do the A/D conversions.
Figure 34 shows the complete pinout for the user interface on header J2. Note that pin 1 is indicated by a small arrow on the ribbon cable connector.
![]()
8.3 User FWT Connections
Connections to the A/D Converter Cards are made via a ribbon cable connector or optional field wiring terminals that are either pluggable or have screw terminals. Table 15 lists the Rabbit Semiconductor part numbers for the FWTs.
Table 15. Guide to FWT Selection
8.3.1 Pinouts
Figure 35 shows the pinout for the FWTs used on the A/D Converter Cards.
![]()
8.4 Power Distribution
Figure 36 shows the power distribution on the A/D Converter Card.
![]()
8.5 Software
8.5.1 Sample Programs
SSTARAD1.C--Demonstrates how to calibrate an A/D converter channel using two known voltages, and defines the two coefficients, gain and offset. These coefficients are then read back to compute the equivalent voltage.
SSTARAD2.C--Reads and displays voltage and equivalent values of each A/D converter channel. Calibrations must have been previously stored into flash memory before running this program. See sample programSSTARAD3.C.
SSTARAD3.C--Demonstrates how to calibrate all A/D converter channels using two known voltages and defines the two coefficients, gain and offset. These coefficients are then read back to compute the equivalent voltage and are saved to flash memory.8.5.1.1 Running Sample Programs
To run a sample program, open it with the File menu (if it is not still open), compile it using the Compile menu, and then run it by selecting Run in the Run menu. The CPU Card must be connected to a PC using the programming cable as described in Section 2.3, "Programming Cable Connections."
More complete information on Dynamic C is provided in the Dynamic C User's Manual.
8.5.2 Dynamic C Libraries
The
SMRTSTARdirectory contains libraries required to operate the Smart Star control system.
SMRTSTAR.LIB--This library supports all the functions needed by the Smart Star systems including Digital I/O Cards, Relay Cards, D/A Converter and A/D Converter Cards, and serial communication.Other functions applicable to all devices based on the Rabbit 2000 microprocessor are described in the Dynamic C Function Reference Manual.
8.5.3 Smart Star A/D Converter Card Function Calls
int anaInEERd(int channel);
- The A/D Converter Card calibration constants, gain, and offset are stored in the factory in the upper half of the EEPROM on the A/D Converter Card. Use this function to read the A/D Converter Card calibration constants, gain, and offset from the upper half of the EEPROM on the A/D Converter Card.
Parameters
channelis the analog input channel.channelshould be passed as
channel = (slotnumber * 128) + (channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-10
- or
channel = ChanAddr(slotnumber, channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-10.Return Value
- 0 if successful.
-1--control command unacceptable.
-2--EEPROM address unacceptable.See Also
anaInEEWr
int anaSaveCalib();
- The calibration constants may also be saved in the flash memory on the Smart Star CPU Card. Doing so will speed up A/D conversions since a memory access from flash memory will be faster than from EEPROM. Use
anaSaveCalibto save the current set of calibration constants for the analog input and output channels in the Smart Star flash memory. The calibration constants stored in flash memory can then be accessed at any time with theanaLoadCalibfunction.
- If the factory-set calibration are not used, customer-measured calibration constants should first be established using the
anaInCalibfunction.Return Value
- None.
See Also
anaLoadCalib, anaInCalib
void anaLoadCalib();
- Reads a complete set of calibration constants for the analog input and output channels from the Smart Star flash memory on the CPU Card. These should be set using the
anaInCaliboranaInEERdfunction, then saved to flash memory using theanaSaveCalibfunction.Return Value
- None.
See Also
anaSaveCalib, anaInCalib
int anaInCalib(int channel, int value1, float volt1, int value2, float volt2);
- Used to recalibrate the response of the A/D converter channel as a linear function using the two conversion points provided. Gain and offset constants are calculated and placed into the global table
_adcCalib.Parameters
- channel is the A/D converter input channel (0-10). channel should be passed as
channel = (slotnumber * 128) + (channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-10
- or
channel = ChanAddr(slotnumber, channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-10.
value1is the first A/D converter value.
volt1is the voltage/current corresponding to the first A/D converter value. Current values entered as milliamps will produce milliamp values, and amp values entered will produce amp values.
value2is the second A/D converter value.
volt2is the voltage/current corresponding to the second A/D converter value. Current values entered as milliamps will produce milliamp values, and amp values entered will produce amp values.Return Value
- 0 if successful,
-1, if not able to make calibration constants.See Also
anaIn, anaInVolts
int anaInEEWr(int channel);
- Writes the calibration constants, gain, and offset to the upper half of the EEPROM on the A/D Converter Card.
Parameters
channelis the analog input channel.channelshould be passed as
channel = (slotnumber * 128) + (channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-10
- or
channel = ChanAddr(slotnumber, channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-10.Return Value
- 0 if successful.
-1--control command unacceptable.
-2--EEPROM address unacceptable.
-3--data value unacceptable.See Also
anaInEERd, _anaInEEWr
unsigned int anaIn(unsigned int channel);
- Reads the state of an analog input channel and converts it to a digital value. A timeout occurs, causing the function to exit, if the end of the conversion is not detected within 13 µs.
Parameters
channelis the analog input channel to read.channelshould be passed as
channel = (slotnumber * 128) + (channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-10
- or
channel = ChanAddr(slotnumber, channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-10.Return Value
- A value corresponding to the voltage on the analog input channel, 0-4095. A value outside this range indicates a failure
See Also
anaInCalib, anaInVolts
int anaInVolts(int channel);
- Reads the state of an analog input channel and uses the previously set calibration constants to convert the state to volts.
Parameters
channelis the analog input channel.channelshould be passed as
channel = (slotnumber * 128) + (channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-10
- or
channel = ChanAddr(slotnumber, channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-10.Return Value
- A voltage value corresponding to the voltage on the analog input channel (0-+10 V on the SR9300 or -10-+10 V on the SR9310).
See Also
anaIn, anaInCalib, anaInmAmps
float anaInmAmps(unsigned int channel);
- Reads the state of an analog input channel and uses the previously set calibration constants to convert the state to current.
NOTE The factory-set calibration constants are for current measurements in amperes. Parameters
channelis the analog input channel.channelshould be passed as
channel = (slotnumber * 128) + (channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-10
- or
channel = ChanAddr(slotnumber, channelnumber)
- where
slotnumberis 0-6, andchannelnumberis 0-10.Return Value
- A current value corresponding to the 4-20 mA (0.004-0.020 A) current on the analog input channel.
See Also
anaIn, anaInCalib, anaInVolts8.6 Electrical and Mechanical Specifications
Figure 37 shows the mechanical dimensions for the A/D Converter Card.
![]()
NOTE All diagram and graphic measurements are in inches followed by millimeters enclosed in parentheses. Table 16 lists the electrical, mechanical, and environmental specifications for the A/D Converter Card.
Table 16. A/D Converter Card Specifications Board Size
2.73" × 3.00" × 0.44"
(70 mm × 76 mm × 11 mm)
Connectors
one 2 × 10 latch/eject ribbon connector, 0.1 inch pitch
Operating Temperature
-40°C to +70°C
Humidity
5% to 95%, noncondensing
Power Requirements
5 V DC at 40 mA from backplane (+5 V supply)
9 V to 30 V DC, 35 mA at 24 V DC, +RAW/+V_USER from backplane
Number of Inputs
11 conditioned channels
Analog Input Ranges1
0 V to +10 V (max. ±22 V DC)
-10 V to +10 V (max. ±40 V DC)
4 mA to 20 mA (max. 30 mA)
Resolution
12 bits (0-4095)
Conversion Time
(including Dynamic C)
0.13 ms/channel (includes 0.08 ms/channel for raw count)
Repeatability
Typical ±½ count, maximum ±1 count @ -20°C to +70°C
Typical ±1 count, maximum ±2 counts @ -40°C to -20°C
Accuracy
Typical ±1 count, maximum ±2 counts @ 25°C
±4 counts @ -40°C and +70°C2
Input Impedance
SR9300 (0 V to +10 V): 100 kW min.
SR9310 (-10 V to +10 V): 100 kW min.
SR9320 (4 mA to 20 mA): 249 W ± 1%
Linearity Error (end to end)
±1 count
1 The A/D Converter Card is protected against transients that might exceed the maximum ratings.
2 Accuracy at temperature extremes can be improved by recalibrating the A/D Converter Card at the temperature it will be used at.
| Rabbit Semiconductor www.rabbit.com |