Development of a PC-based Data Acquisition and Control System

所需积分/C币:1 2013-06-12 17:39:07 132KB PDF
48
收藏 收藏
举报

英文文献 基于个人电脑的数据采集和控制系统
offset to the base address of a com port. The base l,o addresses for CoMl to COM4 are summarized in table 2 Table 1. rS232 Pin designations oof Pins No of Pins Signal Name Description of 25-Pin of 9-Pin PG Protective ground 2 ID Transmit data RD ReceiⅤ c data 4 7 RTS Request to send 8 CTS Clear to send DSR Data set ready GND Signal ground( common 8 DCD Data carrier detect 20 DTR Data terminal ready 22 RI Ring indicator 23 DSRD Data Signal Rate Detector Table 2. basc i o addresses for the pc's com ports Interface port Base addresses Addresses of Internal register COMI fSH 3F8-3FFH COM2 2FSH 2F8-2FFH COM3 3E8H 3E8-3EFH COM4 2E8H 2E8-EFH Y Lan, X. Lin,M. Kocher and w. Hoffmann "Development of a pc-based data acquisition and control system' Agricultural Engineering International: the CIGR Ejournal Manuscript IT 06 005. Vol IX. August, 2007 The rs232 port was not used in conventional means by this data acquisition and control system Instead of using the normal serial-in(RD)and serial-out (TD) lines, the circuit uses other signals to transmit and receive data and to clock the data to and from the adc and the dac. the pins of the port are used to provide the following functions to the data acquisition and control system The request-to-send(rts)pin and data-terminal-ready (dtr) pin were converted to TTL level using 74HC14 Schmidt triggers, and used to supply serial data and clock signals to our system, respectively. The rs232 control signal CTS input line of the rs232 port was used to read the serial data from the adC. The signal of the serial port td output was used to select either the AdC or the dac to receive or transmit data by a dual d flip-flop of 74HC74 2. 2 ADC and dac circuits The analog to digital converter used was an ltc 1298 micropower successive approximation type Linear Technology, 1996a). It had 12-bit resolution and required a 2. 7 to 6V supply. The typical supply current of the chip was 250: A at a sampling rate of 1l KHz. In standby mode, the power supply current dropped to several nanoamperes. The ltc1298 had two analog inputs,at pin 2 and pin 3 which could be configured into two input modes: single-ended and differential input mode. The LtC1298 communicated with other circuitry through a four-wire serial interface. These four wires were CS/ShDN, CLK, DiN and dour. Selection of the chip occurred y making Cs SHDN, (pin 1)low. While the pin is high, the ADC is in standby mode This provided a means of controlling the ltc1298 if a number of the chips are connccted in a shared bus The 12-bit digital-to-analog converter(Dac)LTC1446 outputs voltages that range from 0 to 4.095V in lmV/LSB steps linear Technology, 1996b ). It contained two rail to rail output amplifiers, and an internal reference. Because both the ltc 1298 and ltC1446 had the same 3 wire interface wire requirements, they were connected together and a 74HC74 flip-flop was used to select one of them at a time. The two analog output of the ltc1446 were pins 5 and 8. The power consumption of the Ltc1446 was a little higher than for the Ltc1298. Typical supply current of the LTC1446 was 1000: A at 5V opcration The adC and dac working modes were set using the time sequences of the ltc1298 and LTC1446. The system selected two single-ended inputs for adc and two single-ended outputs for DAC. During the signal conditioning section, we will discuss how to convert one single ended to one differential input channel by using a dual precision instrumentation switched- capacitor building block Ltc1043. Therefore, we have one single-ended input and one differential input in order to satisfy different needs in this system Y Lan, X Lin, M. Kocher, and W. Hoffmann. "Development of a PC-based Data Acquisition and Control System' Agricultural Engineering International: the CIGR Ejournal. Manuscript IT 005. Vol IX. August, 2007 5 2.3 Signal Conditioning and Control driving Blocks One of the two analog inputs was designed to be a differential input cHo) and the other was designed to be a single-ended input(CHI). a dual precision instrumentation switched-capacitor building block LtC1043 was chosen to allow the ground of the single-ended input to float Figure 1). The LTC1043 is an excellent chip which has many interesting features. A low power supply and high precision operational amplifier, OP07DP or LtC1077 was selected between LTC1043 and LtC1298. The gain of the amplifier can be set to 100 or 200 with a jumper. The output range of some sensors, thus, the 0-25mV,0 to 50mv, ando to 5v analog signals can be applied into this channel. Due to high gain, the noise or oscillation of the amplifier may degrade the operational amplifier performance in the circuit Some excluding interference techniques should be considered to minimize the interference noise Some possible solutions were employed in the design such as small filter capacitors on both input and output to limit bandwidth, matched metal-film resistors, and good one-point groundings. CHl of the aDC is used for0-5V input sensor The 2 LM358 operational amplifier is used for increasing input impedance of CHl in order to improve the accuracy of analog signal measuremen Control driving circuits deal with two analog output channels from DAC LTC1446: CH A (pin 5)and Ch b(pin 8). Ch B directly connects a MOC2A60-5 power OPto isolator with a two-ampere Zero-Cross Triac output to drive ac power load. The Ch A can connect a 72 LM358 operational amplifier to a programmable, isolated voltage-to-current converter 1 B22 The l B22 converter is pin programmable for 0 to 5V inputs and 4 to 20mA output. The floating 4-20mA output from 1 B22 can be used for either control signal or output signal of measurement readings, which can be implemented by programming 2.4 System Power Supply and Adjustable Reference voltage Output Power for the data acquisition and control system was provided by a 9v to 12v with 500mA DC adapter. The accuracy of ADC and dac directly depends on the precision degree of reference voltage supply(pin 8 of ADC and pin 7 ofDAC). For this reason, a LM4040-5 precision micropower shunt voltage refcrence was used to produce a high precision +5V reference for both the adc and the dac. a lm78M05 5V voltage regulator(500ma) was used to power the other chips except AdC and dac (Figure 2). A DC/DC converter dCP010515DP converted single +5V into V 15v for the 1 B22 power requirements. LM3 17 is a three-terminal adjustable voltage regulator. The adjustable reference voltage output was included by using LM3 17(Figure YLan,X Lin, M. Kocher, and w. Hoffmann. " Development of a PC-based Data Acquisition and Control System Agricultural Engineering International: the CIGR Ejournal Manuscript IT 06 005. Vol. IX. August, 2007 PC Interface, ADC/DAC, and Control Driving Circuits ADC and dac block Interface with pc block Pin3: TD 24HC74 Pin 4: DIR Pins: GND 11914 Y YIN914 Pin 6: DSR Pin7: RTS RIS ICE CSKHLY RI2 R13 RS232C LTCI299 uoc |4 R|3 4?4 4C4 Casual c■ LTCI440 B8}° MO-2Ad0- Control driving block Contel CHa AC lOT Cosel CHA us3 CAP 27222 PC Interface and Control Driving M4a-998 V2WECUZOTIHOstasseAN Figure 1. PC Interface, ADC/DAC, and Control Circuits Y Lan, X Lin, M. Kocher, and W. Hoffmann. "Development of a PC-based Data Acquisition and Control System Agricultural Engineering International: the CIGR Ejournal Manuscript IT 06 005. Vol. IX. August, 2007 Power Supply, Signal Conditioning, and Excitation Circuits N3|7T soto 10V LIN414 Fumer dache [M4040. 240 Dc ov to 15V +5 p o +5V RMI CHO L To ADC CHO CAs Y43K LTC 1043 USA To ADC CHI L CHI L [43S Power Supply and Signal Conditionings Figure 2. Power Supply, Signal Conditioning, and Excitation Circuits. Y Lan, X Lin, M. Kocher, and W. Hoffmann. "Development of a PC-based Data Acquisition and Control System' Agricultural Engineering International: the CIGR Ejournal. Manuscript IT 06 005. Vol. IX. August, 2007 8 3. SOFTWARE DESIGN The data acquisition and control system software was developed in visual basic version 5 Although Visual Basic offers a wide range of program support, there are some functions that are not available. hardware accesses to ports or to memory locations are two examples of functions that Visual Basic does not support. In addition, the execution time of Visual Basic programs is relatively slow for some specific real time systems. Therefore it was necessary to use a language in the Microsoft Visual C++ version 5 environments The Microsoft Visual C*x x W specialized program to be associated with the hardware and time-saving of data acquisition fo this system. a dynamically linked library (dll) can be used for this purpose written by c version 5 provides a simple way to produce a dll file which can be called by any windows program. It should be noted that a dll file is an executable program but is not loaded into memory until at least one application needs a procedure contained in the library. Windows examines references to dll procedures in its programs to determine when a particular dll is needed for an application. This is why these libraries are called dynamic,. The dll programming design was mainly based on the adC and dac data sheets and their timing sequence diagrams. The dll program contained many functions such as ADC, DAC, Port control. and rs232 initialization functions The basic protocols of rS232 should be completely understood in order to write dll programs The information about rS232 port can be found on the data sheet of the pc87310 dual UART with floppy disk controller and parallel port, which incorporates two full function UARTS, a floppy disk controller(FDC), one parallel port, game port decode, hard disk controller decode, and standard XT/at address decoding for on-chip functions. The visual window interfaces programmed by the visual Basic version 5 contain the following functions )Real-time function 2) Two-analog signal data acquisition 3)Two-analog control signal output implementation(ON/OFF control, PID control) 4)Real-time data text and graphic monitoring 5)Data, opcrating log, and real time information can be stored in the hard disk 6)Online-recalibration if the measurement needs for specific sensors 7) Online helps Y Lan, X Lin, M. Kocher, and w. Hoffmann. "Development of a PC-based Data Acquisition and Control System Agricultural Engineering International: the CiGr Ejournal. Manuscript IT 06 005. Vol IX. August, 2007 4. SYSTEM EVALUATION he data acquisition and control system was used for measuring air temperature using a thermistor and humidity measurement for about one month. This data acquisition and control system can be used in various interfacing applications. A circuit board, as shown in Figure 3 based on this study was designed for measuring methanol concentration. The components were purchased from Digi-Key Corp and linear Technology. Figure 4 shows the flowchart for connecting the circuit board with methanol sensor The methanol concentration monitor and control instrument was developed based on this simple data acquisition system. By attaching suitable sensors, temperature, humidity, pressure, magnetic field intensity, flow rate, position tc, can be recorded via two analog input channels. The control system in this device is relatively easy to implement all kinds of control algorithms. two analog output channels can provide high performance control tasks 5 CONCLUSIONS A data acquisition and control system, easy to use with different computers, was developed for many agricultural and biological applications the high-speed data acquisition and control device uses only an rs-232 serial port to interface with a PC. The device has two analog inputs and two analog output channels each with 12-bit resolution. Both voltage output(0-5V)and current output(4-20mA)can be employed with control algorithms for precision control applications. An adjustable voltage reference from 5v to 12V was also provided to meet the excitation voltage requirements of many sensors The software support developed for this device is a visual window interface. The system costs about $95. The system was further developed for a methanol concentration and controller. The system can be used for many practical applications in agricultural and environmental fields Y Lan, X Lin, M. Kocher, and W. Hoffmann. Development of a PC-based Data Acquisition and Control System Agricultural Engineering International: the CIGR Ejournal Manuscript IT06 005. Vol. IX. August, 2007 Figure 3. Photo of the circuit board Pressure air inl Exhausted air inlet P-Air flowmeter EP-Air flowmeter Circuit board Methanol sensor Figure 4. Flowchart for connecting the circuit Y Lan, X Lin, M. Kocher, and w. Hoffmann. Development of a PC-based Data Acquisition and Control System Agricultural Engineering International: the CIGR Ejournal Manuscript IT 06 005. vol IX. August, 2007.

...展开详情
试读 11P Development of a PC-based Data Acquisition and Control System
立即下载 身份认证后 购VIP低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
上传资源赚钱or赚积分
最新推荐
Development of a PC-based Data Acquisition and Control System 1积分/C币 立即下载
1/11
Development of a PC-based Data Acquisition and Control System第1页
Development of a PC-based Data Acquisition and Control System第2页
Development of a PC-based Data Acquisition and Control System第3页

试读结束, 可继续读1页

1积分/C币 立即下载