The analog data acquisition system based on serial A / D converter ltc1286 has good flexibility and practicability, which can realize the acquisition and processing of voltage, current, temperature, pressure, humidity and other electrical and non electrical quantities.

Data acquisition system is widely used in measurement and control devices and systems such as measuring instruments and industrial control equipment. Its core device is a / D converter.

The general data acquisition system based on ltc1286 can realize the acquisition and processing of voltage, current, temperature, pressure, humidity and other information by selecting different sensors and signal conditioning circuits. The system has the characteristics of small error, high precision, simple circuit structure and strong universality.

Characteristics, pin function and time sequence of ltc1286

Main features

Ltc1286 is a low-power, medium speed, 12 bit sequential comparison serial output general-purpose A / D converter. It is powered by 5-9v single power supply. Its main features include: 12 bit resolution; low power consumption; low power consumption; low power consumption; medium speed; 12 bit sequential comparison serial output general-purpose A / D converter; The maximum nonlinear error is ± 3/4LSB; The conversion time is 60 μ s; Bipolar or unipolar analog input; 12 bit three state serial output.

Pin arrangement and function

The pin arrangement of ltc1286 is shown in Figure 1.

Performance characteristics and application scheme of serial A / D converter ltc1286

Figure 1: ltc1286 pin arrangement and function

The functions of each lead out pin are as follows.

Pin 1 is the reference voltage input terminal; Pin 2 is the input terminal of positive analog signal; Pin 3 is the input terminal of negative analog signal; Pin 4 is the common end; Pin 5 is the chip selection terminal. When CS jumps from high level to low level, it will reset the internal counter, control and enable dataout terminal and clock terminal. When CS jumps from low level to high level, it will disable clock within a set time; Pin 6 is the three state output (digital signal output) of a / D conversion result. When CS is at high level, the pin is in high resistance state. When CS is at low level, the pin is set to the corresponding logic level from the MSB value of the previous conversion result; Pin 7 is the clock signal input terminal; Pin 8 is the positive terminal of the power supply.

Interface timing

The interface timing of ltc1286 is shown in Figure 2. It can be seen from the timing chart that ltc1286 uses 15 clock cycles to convert and transmit data each time. The timing of CS is inserted between each transmission cycle. When CS signal changes from high level to low level, the conversion and transmission process starts, and when CS signal changes from high level to high level, the conversion and transmission cycle ends, clock is prohibited, and dataout becomes high resistance state.

Figure 2: ltc1286 sequence diagram

system design

The system uses ltc1286 as a / D converter and PC as processor to process the collected data, and outputs the processing results to the screen for real-time display or to the hard disk as a record. The hardware circuit of the system is shown in Figure 3

Figure 3: system hardware circuit

Power supply and voltage reference

The power supply of the system is taken from the TXD pin of the PC serial interface, and is processed by D7, C4, 78l05, C1 and C2 to provide a smooth and stable DC voltage of + 5V to the circuit.

D3, C3, R3 constitute the ltc1286 external reference voltage source, D3 selects ref25z as the 2.5V reference voltage output.

Signal input circuit

The input resistor R1 and R2 constitute the analog signal input circuit. The input signal voltage ranges from 0 to + 5V. The value of R1 and R2 must consider the input characteristics of ltc1286 and the output characteristics of external sensor or conditioning circuit, and the value range is 33 to 100k Ω, And R1 = R2. Diodes D1 and D2 constitute the input bidirectional limiting circuit.

Interface circuit between ltc1286 and PC

Ltc1286 and PC adopt four wire communication mode, as shown in Figure 3. The level of pcrs-232 port is 12V. In order to solve the problem of direct connection with ltc1286, three 4.7V regulators D4, D5, D6 and two current limiting resistors R4 and R5 are added to the digital signal input / output terminal of ltc1286. The data acquisition and control in the system are completed by PC programming. The data acquisition and update are realized by the control signal CS of ltc1286 pin 5. During the low-level period of CS signal, ltc1286 completes the data update and acquisition, and moves out the previously acquired data through 6-pin (dataout) serial. During the high-level period of CS signal, clock signal is prohibited, and the output terminal is in high resistance state.

Interface programming

The system software mainly includes initialization module, a / D conversion control module, data processing module, screen output display module and disk file output module. Limited to space, this paper only gives the interface program corresponding to PC serial port COM1 (3f8h).

10REM—12BTIS—

20KEYOFF:CLS

30B=&H3F8:REMCOM1:

40N=12:REM12BITS

50OUTB+4,1

60FORT=0TO100NEXTT

70OUTB+3,64

80FORT=0TO500:NEXTT

90OUTB+4,0:D=0:REMACQUISITION

100OUTB+4,2:OUTB+4,0

102OUTB+4,2:OUTB+4,0

103OUTB+4,2:OUTB+4,0

110FORF=0TON-1

120OUTB+4,2

130E=INP(B+6)AND16

140OUTB+4,0

150IFE=16THEND=D+2^(N-1-F)

160NEXTF

170D=5*D/(2^N-1)

180OUTB+4,1

190RETURN

Using different sensors and signal conditioning circuits, the data acquisition system can realize the acquisition and processing of a variety of electric and non electric quantities, and it runs stably and reliably with high sampling accuracy, which can meet the measurement and control requirements and accuracy requirements of most measurement and control systems.

Editor in charge: GT

Leave a Reply

Your email address will not be published. Required fields are marked *