Sei sulla pagina 1di 12
DIGITAL INSTRUMENTATION PRINCIPLES Computers are used in almost all aspects of engineering. Measurement and control are no different. While most sensors electronic sensors provide a continuous voltage or current signal, microprocessors require digital signals in order to perform their numerical operations. It is the role of the data acquisition system to allow the translation of transducers signals into digital signals for the microprocessor. Classification of Waveforms Signals may be classed as either analogue, discrete, or digital. Analogue describes a signal that is continuous in time. Since itis continuous, itcan have any value within the operating range of the instrument (Figure 1a). A discrete signal is one in which the magnitude of the signal is available only at discrete points in time. A discrete time signal usually results from the sampling of a continuous signal at finite time intervals (Figure 1b). As the time interval decreases to zero a discrete signals becomes an analogue signal. A digital signal has two. important characteristics. Firstly, a digital signal is discrete in time . Secondly, the magnitude of a digital signal is discrete determined by a process known as quantization. Quantization assigns a single number to represent a range of magnitudes of a continuous signal. The digital wave form that results is constant between tarnpled pote in me (Figure 1c). (2) har ee si 10) ieee wel —- woe (o) Datatspat (gu emeoe Figure 1. Analogue, Discrete, and Digital Signals Digital signals are normally represented by the binary numbeting systems (numbering system using base 2). Binary systems use the binary digit or bif, either a 1 or 0. Bits are like electrical switches and used to convey both logical and numerical information (the 1 and O represent an on and off position). Such a collection of bits are used to express entities called words. These words can be anywhere from 4 to 32 in length. A word formed by 8 bitsis called a byte. A particular physical location used to store a word is known as a register. The number of bits used to define the word determines the size of the maximum number that the word can represent. Thus the M bits in an M-bit word can be combined to represent 2" integers. An 8 bit word represents the numbers O through 255 and a 16-bit word represents the numbers 0 through 65,535. gital Signals In digital systems, the voltage of the power supply to the integrated circuit chips (V,,) is usually +5 V DC. The inputs to and outputs from the chips are the binary digits 1 and 0. The digit “1” is represented by any voltage from +2.to +V DC while the digit “0” is sented by any voltage from 0 to 0.8 VDC. These two states are often referred to as, “high” or “low” instead of 1 and 0, ‘Ina digital system, data signals are numerical values expressed in binary format while control signals, either 1 or 0, control the devices which produce or process the data, Control signals include, start, stop, ready (indicates the device has completed its task), and inhibit (makes a device with until the system is ready to receive its output). Data signals and control signals are generally kept from each other, each having its own set of conductors (called a bus) connecting the devices of the system together. Series and Parallel Data Transfer Data in the form of words (or bytes) is normally transferred through three types of connections as illustrated on Figure 2. | TT @ Figure 2. Types of Digital Data Transfer: a) Full Parallel, b) Word S« ©) Full Serial ial-Bit Parallel, The three main types of data transfer are; * Full Parallel. Full parallel requires a separate conductor for each bit but all the bits are transferred instantly * Word Serial-Bit Parallel. Word serial-bit parallel requires as many conductors as there are bits in a word (ic. 8 conductors for an 8 bit word), The system requires a temporary memory (register) at the receiving device to reassemble the word into the original data value. Data transfer is slower using this method. * Full Serial. Full serial means that the bits in the data value are transferred one ata time through the conductor, These bits can stil] be divided into the words at the receiver. This is the slowest from of data transfer since only one signal wire must transmit all the data, Sampling An analogue signal is converted to a digital signal through sampling. This is done by a sample and hold amplifier circuit. This circuit is normally made up of two op-amps that can maintain a steady voltage whenever the circuit switch is open (.e. itis holding the analogue voltage signal for a discrete time interval). When the circuit switch is closed the circuit ‘maintains the same voltage as the changing analogue voltage (sampling phase). Figure 3 shows the process as a voltage/time graph . With the switch closed the output tracks the input (sample). When the hold signal is applied to the switch control there isa slight delay, the aperture time, typically 50 ns, before the switch opens. After the switching transient has died out, the output stays constant except for the droo , typically imV/msec, There is a similar delay on switching from hold to sample, before the output can start tracking the input again. This delay, the acquisition time, is usually one or two microseconds from the instant of switching until the switching transient has died out. Switching transients Votage yi Aperture, ‘Acquisition time —"} tine Time Votage Hota Canaeney ‘Switch Sample Sample | control signal Time Figure 3. Sample and Hold Voltage/time Graphs Aliasing Whenever a time dependent signal (such as for a vibrating machine) is being sampled itis important to know how fast this signal should be sampied. Consider Figure 4, in which a 10 Hz sine wave is measured at successive sample time increments, 6t (with sample rate f, = 1/61). Ateach measurement, the sine wave is converted into a number. One can see from. the plots that the output curves are going to vary with the sampling frequency. In this example, the 10 Hz signal is sampled at 100Hz, 27Hz, and 12Hz. The 100 HZ sampling rate allows the true signal to be repeated while the slower sampling rates produce erroneous results, 2 [eee eaeearecr -2 1 Lt 0002046 08 lo og 0? as 050510 Toots) Tet) (a) Original 10-He sine wave anatog signal (6) f= 00H 3 2 Tels Feels) ( Keres 2 He Figure 4. The effect of Sample Rate on Signal Frequency and Amplitude Interpretation Itcan be concluded that the sample time increment plays a significant role in signal frequency representation. The sampling theorem states that; “In order to reconstruct the frequency content of a measured signal accurately, the sample rate must be more than twice the highest frequency contained in the measured signal.” For example, the design of compact discs required a compromise between disc size, playing time, and maximum audio range which could be recorded, and the resolution of the of analogue to digital conversion. Fora given disc diameter (120mm.) maximum playing time (approx. 70 minutes) and A/D resolution (14 bits), the bit capacity of the disc dictated the sampling frequency, which had to be set to 44.1 KHz. Thatis, the disc capacity =70 min. x 60sec x 44,100Hz «14 bits, In order to avoid aliasing, the highest allowable audio frequency had to be less than 0.5 x 44.1 KHz, so the input frequency was limited by a low pass filter with 20kHz comer frequency. Analogue to Digital Conversion An analogue to digital converter (commonly called the A/D Converter or A/D Card) converts the analogue voltage recorded from the sample and hold circuit into a digital number (binary) The A/D resolution is determined by the number of bits that represent the number (word) An n-bit A/D card has a resolution of | part in 2". For example, a 12-bit A/D card has a resolution of 1 part in 4096 (2'? = 4096) Twelve bit resolution corresponds to 2.44 mV fora 10 V range. Many types of A/D converters are available. Differing A/D cards offera variety of resolution, voltage range, and speed configurations, The most popular A/D converters are the parallel (flash) converter, the successive approximation A/D converter, the voltage to frequency A/D converter, and the integrating A/D converter. Details of each converter can be found in reference books, or instrumentation catalogues. In general, the higher the resolution, the slower the sampling speed. Most A/D cards are either 12 or 16 bit cards with sampling rates in the range of 100 to 1000 kHz range. Accuracy Versus Resolution Recall that the accuracy of a measurement is the difference between the true value and the measured value. The accuracy is the sum of all the biased errors. These errors can result from the transducer, noise picked up in the cables and amplifiers, as well as from the A/D conversion. Resolution on the other handiis termed quantizationerror. In an ideal A/D conversion, any voltage in the range that corresponds to a unique digital code is represented by that code. tn normal A/D conversion, the quantization erroris one-half of one bit, referred to as the least significant bit (LSB). For a 12 bit A/D card with IOV range, this error is 244 mV .0244%). A/D Errors ‘As shown on Figure 5, there are a variety of errors associated with A/D conversion. These errors include linearity error in which the input voltage and A/D conversion output deviate from the diagonal line. Missing codes which refers to A/D conversions not carried out at specific analogue input voltages (loss of resolution). Noise and amplifier gain errors which may cause drift and gain errors. Digital to Analogue Conversion After transmission, processing, etc, the digital signal may have to be converted back to analogue form (to control a servo-motor for example). This is done by another inteseted ireuit called the digital to analogue converter (D/A Converter). Figure 6 illustrates ¢ schematic for an 8-bit D/A converter. An operational amplifieris connected to a resistance network to act as a inverting adding circuit. A stable reference voltage, E.,is applied to the network and provision is made to switch the resistors into the amplifier (the resistors are progressively increased in value by factors of 2) Figure 5. Common A/D Conversion Error Sour (The straight line is ideal output from an A/D card with iafinite bit resolution. The step Function shows the indicated error fora3-bit A/D card) Figure 6. Kight-bit Digital to Analogue Converter Switch seven controls the most significant bit (MSB) because it presents the largest voltage to the amplifier input. Switch zero represents the least significant bit (LSB) because it resents the lowest voltage to the amplifier input. The switches are activated by the Incoming digital signal to allow input to the op-amp. The output voltage to the amplifier, E, is givenas; (lk 1 FRR OR ima) ‘The resistors R, and R as well as the reference voltage are selected to produce the desired output range for the device (normally full scale output readings of 0 to 10V or +5V). Example: If we want to convert the eight-bit word 11000001, the sum of the inverse resistances: ro ‘be; i){1+$+0+020+040+ 1) « -(Za- 5078129) & Choosing a reference voltage of 2 Volts and all resistors being equal (say R=R, =100ohm) the output voltage from the D/A converter will be 3.01 volts. Obviously, greater resolution may be obtained by using a larger umber of bits. Sixteen bit devices are very common. DATA ACQUISITION SYSTEMS The term data acquisition system isa term normally applied to a microcomputer based measurement sampling and processing systems. In most enginecring applicatioas, the somputet has replaced the engineer reading a dial, recording the information ina logbook, and later processing the data by hand, he basic form of a data acquisition system (often referred to.asa DAQ System) is ‘Mustrated in Figure 1. A DAQ system begins with the transducers which outputs a voltage orcurrent signal in response tothe varsehe of iene, A signal conditioning system Contains electronic equipment designed to supply the source voltage to the traneducer, as well as provide filtering and amplification. The computer will contain a DAQ card that Praesens necessary analogue to digital conversion (and/or digital to analogue) and using DAQsoftware, will perform all data manipulation, data storage and display. Signals: voltage, corrent Physical phenomena: femperaturt, pressure, low displacement, light Antensity, dees, et Figure 1. Components of a Data Acquisition System Data Acquisition System Components ‘Signal Conditioning ‘Analogue signals will normally require some type of signal conditioning forthe proper interface with a digital system, Most of the components of the signal conditionev tate been reviewed in earlier handouts. These components include: 1. Transducer Excitation: Certain transducers (such as strain gauges) require external voltages or currents to excite their own circuitry ina process known as transducer excitation. The process is similar to a television needing power to receive and decode Video and audio signals. It is important that the supply Voltage provided by the signal conditioner be stable and relatively noise free, 2. Amplification: Amplification maximizes the use ofthe available voltage range to increase the accuracy of the digital signal and to increase the signal-to-noise ratio (SNR), Although computer DAQ boards will often provide some selectable signal amplification, it should be remembered that extemal amplification is often necessary 10 1 minimize the effects of external noise (60 Hz noise for example). If you use only the amplifier on the data acquisition board the signal and noise will be amplified and digitized at the same rate (See Table 1). Signal Noisein | DAQBoard | Digitized Yoltage | Amplification | Lead Wires Voltage _| SNR j ‘Amplify only | 001V | None 0.001 V 100 iv 10 at DAQ board Amplifyat_ | oo1v. | x10 0.001 x10 Lory | 100 S.C.and DAQboard ‘Amplify only | oo1v | x10 0.001 Nove 1001 | 1000 asc. : Table 1. Effects of Amplification on Signal-to-Noise Ratio (SNR) 3. Filtering: Filters are required to remove unwanted signals from the desired signal. Several types of filters, such as low pass, high pass, and band pass filters, are installed in the signal conditioning to clean the signal prior to digital processing. It should be remembered that digital filtering (utilizing software rather than hardware) cannot be used to prevent aliasing or to remove its effects. 4, Isolation: A common use of signal conditioning is to isolate the transducer signals from the computer. This is often required when the signal being monitored may contain large voltage spikes that could damage the computer or harm a person. 5. Shunt Circuits: An A/D converter requires a voltage signal at its input. Itis simple to ‘convert current signals into voltage signals using a shunt resistor. The output voltage from the shunt resistor for a signal current / is, Eo =TResun Fora standard 4-20mA current loop, a 500 Qshunt would provide a2 to 10V signal to a 10 volt analogue input, areal Figure 2. A Simple Shunt Resistor Cireuit Data Acquisition Card The data acquisition card contains the circuitry to provide the necessary A/D conversion for signal processing. An example of a A/D card is reproduced from the 1998 catalogue from Data Translation . This A/D ard (DT2801) is one of the most common DAQ cards on the market. Features of a DAQ card are as follows: DT2601 Series aR Analog and Digital yo ‘he D720) Sere family of BM PCATIAT compatible analog ond igi 0 hoards thot support DMA rangers. An onboard microprocessor simplifies programing. ond controls =e timing ond ero checking oper ‘ion D120; Seis beard arsed in ‘ens of thousands of indus and scien — : if sites worldwide and are supported by Jsmebnn umerus sofware packages incdng sae HP VEE and D1 VP for Windows + Vesons wit sinuses sang, 12-01 ‘reson 75 route, ed pastes 1 To oper cares wth S28 rest and 1 ig es, wth cha tiganson op 64S 032 Olan inp oo 1 Syed mone wih DUA canes 1 Pa doko atari ee ithe AD i ovens ‘ND:12 1s; 75 0 275 eeu 5 40 SSH ase 12 DAC, 1 bs, 1.810 295 oye Dita 15 res (hk: Oe prrarmabie ce (tls AD or A opeaton) ‘iar: Sglecarel DMA propaes KO oot ogo aa ‘Bie Geri ‘Abundant Options DMA Extensive Software Support Sixamedels le you choose the fetus AULDT2601 Series boards support DMA. DTZA01 Series bur are supprted by that best suit your aplication. data transis fo anferrng data tothe aay applition software packages, ‘Simultaneous sampling, 16-bit resolution, maximum speed allowed by the board's including HP VEE and OT VP for 27kSls throughput and gainsto $00 A/D er DIA converte. ‘Windows, Detaog SDK, and (om flseaeranglaresvals, Programmable Clock DELVLink. ‘Two DACs, Digital YO For high spoed DMA operation, a pacer All models contain two independest D/A. clock is provided to automaticaly inte ‘converters ACS) with 2-it resolution muple A/D of D/A conversions. mre Skenienies ie: i eyrerre spe ats = Feri Module, DDC et Chateol amas aa — ee eee ‘To reduce RFI and EMI: ‘cise and assure bad a a rare, See a suis ae Analog ciruity is powered from an Tae aan a as sr rc tere ‘onboard DOG covert that provides RARE high noise isolation fom the computers epee Ye 7 30 supply Le 34 MSisn GRed Figure 3. Sample Catalogue Listing for DT2601 (common DAQ Card) 3 Multiplexing. A niiltiplexer isa switch that allows a single A/D converter to measure many input channels (often 8, 12 or 16 channels). This switch is normally a solid state switch to allow for high speed switching between channels. A multiplexed scheme eliminates the high cost of having multiple A/D converters. However, multiplexing reduces the rate at which data can be acquired from an individual channel because multiple channels are scanned sequentially. For example, an A/D converter that can sample a single channel at 100 kHz is. limited to a 12.5 kHz per channel sampling rate when sampling eight channels. Multiptexing can create problems whenever several channels are to be measured at the simiiltaneously (such as in destructive testing). In these situations, sample and hold circuits (S/H) are installed prior to the multiplexing cireuit. All S/H circuits are triggered at the same lime enstiring the A/D conversion is performed on all channel signals sampled at the same instant in time. | ee 3) > Bi ay Se Figure 4, Illustration of Sample and Hold Cireuitry Programmable Gain Amplifier A programmable gain amplifier (PGA) is an amplifier built into the board that can amplify the analogue signal prior to being converted to a digital signal. The gain factor can be “programmed” to vary as each channel is being sampled. Input Types (Single Versus Differential Ended Input) The number of input channels available determines te nurber of devices you can coaneet toa DAQ board. The number of channels can range from 4 to 64. These input channels ean be selected as either single ended or differential input(i.e. 16SE/BDI). Single ended connections use only one signal line (+) relative to ground (Figure 5) The retum line (-) and round are the same wire There is no local ground al the signal source. Single input connections can be Very risky because of the possible occurance of ground loops. Ground values can often vary because the ground returns pass through different ‘equipment or building wiring. When different grotnd points are involved differential ended ‘connections are required. Here the signal wire (+) is paired with the return line (-) (Figure 5). The measured voltage is the voltage difference between these two lines, The term Used. todescribe the ability of the device to be unaffected by different ground potentials is called common mode rejection ratio (CMMR) . Its normally expressed as a dB rating. ennai wagons at Figure $. Single and Differential Ended Connections to DAQ Board A/D and D/A Converters Fhe AMD converter converts the analogue output from the sample and hold cireuitto a digital signal. The resolution and accuracy of the conversion depends on the number of bite the voltage is translated into. The conversion time varies as the resolution, i, the mote tis required, the longerit takes (.e. 10 usec. for 12 bit conversion versus 20usec, for 16 bit Conversion). A summary of the resolution and accuracy are shown on Table 2. The DIA converter generates an analogue signal from a digital input. D/A conversion allows the computer to be used for process control. This conversion is initiated by computer software, LSB Value Reseltion Number ot , anv o-v0v, 12 202 (bis) Counts 8 ot Range ange 25V Range Range Range 3 2a? 0m Tea ‘Ba Ben ieav 0 jae 02am Aw senv 2aay my 2 406 m2 ew, amv 2aav Sin omy 6 655 953s Sia ‘sm nv 008 2 1018576 ©1204 ona = = 2 - 2% 18777216 445 ——_comane ~ - = Table 2. Resolution amd Accuracy for A/D Conversion Accurate timing is a very important aspect of data acquisition. The sample and hold Circuitry must be triggered along with the multiplexer circuitry, along with the A/D conversion, ete. DAQ boards will contain a oscillator (a piezoelectric quartz crystal ibrating ata constant frequency) asthe standard timing instrument. Circuitry s added to the board to allow fora selectable sample rate controlled by the board or from, an external timing source (such as the PC). Digital Input/Output (VO) Most DAQ boards contain digital input/output lines to communicate with a device thatis itself digital. The digital 1/0 is usually used through these boards for instrument control applications and external triggering. For most boards a 16 line digital VO translates into & bits of input and 8 bits of output. An example might be a DAQ board recording the temperature of a piece of equipment and sending a signal through the digital UO lines to trigger a process whenever the temperature drops below a set value.

Potrebbero piacerti anche