How-To Guide For Most Common Measurements
How-To Guide For Most Common Measurements
Overview
The National Instruments How-To Guide for Most Common Measurements is a centralized resource for obtaining information about making common sensor and signal measurements. Each of the following sections covers the operating principle for the corresponding signal/sensor and offers guidance on how to make that measurement. The purpose of this document is to help you get to your measurements quickly. If you would like to read the more detailed theory behind these measurements, visit the NI Sensor Fundamentals (part of NI Measurement Fundamentals) portal page.
LabVIEWTM, National InstrumentsTM, and ni.comTM are trademarks of National Instruments Corporation. Product and company names mentioned herein are trademarks or trade names of their respective companies. For patents coving National Instruments products, refer to the appropriate location: Help>>patents in your software, the patents.txt file on your CD, or ni.com/patents.
Contents
1. How to Measure Temperature with a Thermocouple ......................................................... 4
A. Temperature and Thermocouple Overview ......................................................................................... 4 B. How to Make a Thermocouple Measurement ..................................................................................... 4 C. Connecting a Thermocouple to an Instrument..................................................................................... 8 D. Getting to See Your Measurement: NI LabVIEW ................................................................................ 10 E. Recommended Hardware and Software............................................................................................. 10 F. Thermocouple Tutorials and Other How-To Resources ...................................................................... 11
B. How to Make a Strain Gage Measurement ........................................................................................ 45 C. Recommended Hardware and Software ............................................................................................ 49 D. Strain Tutorials and other How-to Resources .................................................................................... 49
www.ni.com
A thermocouple is created whenever two dissimilar metals touch and the contact point produces a small open-circuit voltage as a function of temperature. This thermoelectric voltage is known as the Seebeck voltage, named after Thomas Seebeck, who discovered it in 1821. The voltage is nonlinear with respect to temperature. However, for small changes in temperature, the voltage is approximately linear, or (1) Where V is the change in voltage, S is the Seebeck coefficient, and dT is the change in temperature. Several types of thermocouples are available, and different types are designated by capital letters that indicate their composition according to American National Standards Institute (ANSI) conventions. For example, a J-type thermocouple has one iron conductor and one constantan (a copper-nickel alloy) conductor. Other types of thermocouples include B, E, K, N, R, S, and T.
To measure a thermocouple Seebeck voltage, you cannot simply connect the thermocouple to a voltmeter or other measurement system because connecting the thermocouple wires to the measurement system creates additional thermoelectric circuits.
Consider the circuit illustrated in Figure 1, in which a J-type thermocouple is in a candle flame, the temperature of which you want to measure. The two thermocouple wires are connected to the copper leads of a data acquisition device. Notice that the circuit contains three dissimilar metal junctions J1, J2, and J3. J1, the thermocouple junction, generates a Seebeck voltage proportional to the temperature of the candle flame. J2 and J3 each has its own Seebeck coefficient and generates its own thermoelectric voltage proportional to the temperature at the data acquisition terminals. To determine the voltage contribution from J1, you need to know the temperatures of junctions J2 and J3 as well as the voltage-to-temperature relationships for these junctions. You can then subtract the contributions of the parasitic junctions at J2 and J3 from the measured voltage at junction J1. Thermocouples require some form of temperature reference to compensate for these unwanted parasitic cold junctions. The most common method is to measure the temperature at the reference junction with a direct-reading temperature sensor and subtract the parasitic junction voltage contributions. This process is called cold-junction compensation. You can simplify computing cold-junction compensation by taking advantage of some thermocouple characteristics. By using the Thermocouple Law of Intermediate Metals and making some simple assumptions, you can see that the voltage a data acquisition system measures depends only on the thermocouple type, thermocouple voltage, and cold-junction temperature. The measured voltage is independent of the composition of the measurement leads and the cold junctions, J2 and J3. According to the Thermocouple Law of Intermediate Metals, illustrated in Figure 2, inserting any type of wire into a thermocouple circuit has no effect on the output as long as both ends of that wire are the same temperature, or isothermal.
www.ni.com
Consider the circuit in Figure 3. This circuit is similar to the previously described circuit in Figure 1, but a short length of constantan wire has been inserted just before junction J3 and the junctions are assumed to be held at identical temperatures. Assuming that junctions J3 and J4 are the same temperature, the Thermocouple Law of Intermediate Metals indicates that the circuit in Figure 3 is electrically equivalent to the circuit in Figure 1. Consequently, any result taken from the circuit in Figure 3 also applies to the circuit illustrated in Figure 1.
In Figure 3, junctions J2 and J4 are the same type (copper-constantan); because both are in the isothermal region, J2 and J4 are also the same temperature. Because of the direction of the current through the circuit, J4 contributes a positive Seebeck voltage and J2 contributes an equal but opposite negative voltage. Therefore, the effects of the junctions cancel each other, and the total contribution to the measured voltage is zero. Junctions J1 and J3 are both ironconstantan junctions, but they may be at different temperatures because they do not share an isothermal region. Because they are at different temperatures, junctions J1 and J3 both produce a Seebeck voltage but with different magnitudes. To compensate for the cold junction J3, its temperature is measured and the contributed voltage is subtracted out of the thermocouple measurement. Using the notation VJx (Ty) to indicate the voltage generated by the junction Jx at temperature Ty, the general thermocouple problem is reduced to the following equation: VMEAS = VJ1(TTC ) + VJ3(Tref ) (2)
www.ni.com
where VMEAS is the voltage the data acquisition device measures, TTC is the temperature of the thermocouple at J1, and Tref is the temperature of the reference junction. Notice that in Equation 2, VJx(Ty) is a voltage generated at temperature Ty with respect to some reference temperature. As long as both VJ1 and VJ3 are functions of temperature relative to the same reference temperature, Equation 2 is valid. As stated earlier, for example, NIST thermocouple reference tables are generated with the reference junction held at 0 C. Because junction J3 is the same type as J1 but contributes an opposite voltage, V J3(Tref ) = VJ1(Tref ). Because VJ1 is the voltage that the thermocouple type undergoing testing generates, you can rename this voltage VTC . Therefore, Equation 2 is rewritten as follows: VMEAS = VTC (TTC ) - VTC (Tref ) (3)
Therefore, by measuring VMEAS and Tref , and knowing the voltage-to-temperature relationship of the thermocouple, you can determine the temperature at the hot junction of the thermocouple. There are two techniques for implementing cold-junction compensation hardware compensation and software compensation. Both techniques require that the temperature at the reference junction be sensed with a direct-reading sensor. A direct-reading sensor has an output that depends only on the temperature of the measurement point. Semiconductor sensors, thermistors, and RTDs are commonly used to measure the reference-junction temperature. With hardware compensation, a variable voltage source is inserted into the circuit to cancel the parasitic thermoelectric voltages. The variable voltage source generates a compensation voltage according to the ambient temperature, and thus adds the correct voltage to cancel the unwanted thermoelectric signals. When these parasitic signals are canceled, the only signal a data acquisition system measures is the voltage from the thermocouple junction. With hardware compensation, the temperature at the data acquisition system terminals is irrelevant because the parasitic thermocouple voltages have been canceled. The major disadvantage of hardware compensation is that each thermocouple type must have a separate compensation circuit that can add the correct compensation voltage; this fact makes the circuit fairly expensive. Hardware compensation is also generally less accurate than software compensation. Alternatively, you can use software for cold-junction compensation. After a direct-reading sensor measures the reference-junction temperature, software can add the appropriate voltage value to the measured voltage to eliminate the parasitic thermocouple effects. Recall Equation 3, which states that the measured voltage, VMEAS, is equal to the difference between the voltages at the hot junction (thermocouple) and cold junction.
7 www.ni.com
Thermocouple output voltages are highly nonlinear. The Seebeck coefficient can vary by a factor of three or more over the operating temperature range of some thermocouples. For this reason, you must either approximate the thermocouple voltage-versus-temperature curve using polynomials or use a look-up table.
The NI 9211 has a 10-terminal, detachable screw-terminal connector that provides connections for four thermocouple input channels. Each channel has a terminal to which you can connect the positive lead of the thermocouple, TC+, and a terminal to which you can connect the negative lead of the thermocouple, TC. The NI 9211 also has a common terminal, COM, which is internally connected to the isolated ground reference of the module. Refer to Figure 5 for the terminal assignments for each channel and Figure 6 for a connection schematic.
www.ni.com
www.ni.com
10
www.ni.com
11
www.ni.com
Figure 1. Common Symbol for Thermistor Each sensor has a designated nominal resistance that varies proportionally with temperature according to a linearized approximation. Thermistors have either a negative temperature coefficient (NTC) or a positive temperature coefficient (PTC). The first, more common, has a resistance that decreases with increasing temperature while the latter exhibits increased resistance with increasing temperature. You can use PTC thermistors, or posistors, as current-limiting devices for circuit protection (in place of fuses) and as heating elements in small temperature-controlled ovens. Meanwhile, NTC thermistors, the topic of this article, are used mainly to measure temperature, and are widely present in digital thermostats and in automobiles to monitor engine temperatures. Thermistors typically have a very high sensitivity (~200 /C), making them extremely responsive to changes in temperature. Though they exhibit a fast response rate, thermistors are limited for use up to the 300 C temperature range. This, along with their high nominal resistance, helps to provide precise measurements in lower-temperature applications.
12
www.ni.com
Figure 2 .Two-, Three-, and Four-Wire Connection Diagrams When there are more than two wires, the additional wires are solely for connecting to the excitation source. A three- or four-wire connection method places leads on a high-impedance path through the measurement device, effectively attenuating error caused by lead-wire resistance (RL). The easiest way to connect a thermistor to a measurement device is with a two-wire connection (see Figure 3). With this method, the two wires that provide the thermistor with its excitation source are also used to measure the voltage across the sensor. Because thermistors have a high nominal resistance, lead-wire resistance does not affect the accuracy of their measurements; thus, two-wire measurements are adequate for thermistors, and two-wire thermistors are the most common.
13
www.ni.com
Connecting a Thermistor to an Instrument Many instruments offer similar options for connecting thermistors. As an example, consider an NI CompactDAQ system with an NI 9215 C Series module and an NI cDAQ-9172 chassis (see Figure 4).
Figure 4. NI 9215 C Series Analog Input Module and NI CompactDAQ Chassis Notice the differential connection in the connection diagrams in Figure 5, where two wires are attached to either end of the thermistor and connected into the positive and negative terminals of a single channel, in this case pins 0 and 1, respectively. When setting up acquisition from this type of sensor, you have the option of specifying either excitation current (IEX) or voltage (VEX), depending on the type of excitation source you use.
Figure 5. NI 9215 Connection Diagrams for Thermistors with External Excitation from a (a) Current Source IEX and (b) Voltage Source VEX
14
www.ni.com
The voltage difference across the resistor is read as a temperature. The relationship between voltage across a resistor and temperature is not perfectly linear. The NI-DAQmx driver scales the resistance of a thermistor to a temperature using the Steinhart-Hart thermistor third-order approximation:
where T is the temperature in Kelvin, R is the measured resistance, and A, B, and C are constants provided by the thermistor manufacturer. To provide excitation, you can use external sources such as a C Series voltage output module or current output module. Because the nominal resistance of a thermistor is very high, you need a source that can output low currents accurately. You can use the NI 9265 C Series analog output module as an excitation current source for the thermistor and place it in the same NI cDAQ9172 chassis as the C Series module acquiring the thermistor reading. The NI 9265 has a 0 to 20 mA output range with 16-bit resolution. This particular output module also has the same channel count as the input module described for the temperature readings. The pinout for the current output C Series module are displayed in Figure 6.
Figure 6. NI 9265 Analog Output Module Terminal Connections Considerations If you cannot dissipate extra heat, heating caused by the excitation current can raise the temperature of the sensing element above that of the ambient temperature, causing an error in the reading of the ambient temperature. You can minimize the effects of self-heating by lowering the excitation current.
15 www.ni.com
Signals emitted by thermistors are typically in the millivolt range, making them susceptible to noise. Lowpass filters are commonly used in thermistor data acquisition systems to effectively eliminate high-frequency noise in thermistor measurements. For instance, lowpass filters are useful for removing the 60 Hz power line noise that is prevalent in most laboratory and plant settings. Getting to See Your Measurement: NI LabVIEW Once you have configured the system properly, you can acquire and view the data using the LabVIEW graphical programming environment (See Figure 7).
16
www.ni.com
17
www.ni.com
Figure 1. Physical Architecture of an RTD RTD Fundamentals RTDs operate on the principle of changes in electrical resistance of pure metals and are characterized by a linear positive change in resistance with temperature. Typical elements used for RTDs include nickel (Ni) and copper (Cu), but platinum (Pt) is by far the most common because of its wide temperature range, accuracy, and stability. RTDs are constructed using one of two different manufacturing configurations. Wire-wound RTDs are created by winding a thin wire into a coil. A more common configuration is the thinfilm element, which consists of a very thin layer of metal laid out on a plastic or ceramic substrate. Thin-film elements are cheaper and more widely available because they can achieve higher nominal resistances with less platinum. To protect the RTD, a metal sheath encloses the RTD element and the lead wires connected to it. Popular because of their stability, RTDs exhibit the most linear signal with respect to temperature of any electronic temperature sensor. However, they are generally more expensive than alternatives because of the careful construction and use of platinum. RTDs are also characterized by a slow response time and low sensitivity, and, because they require current excitation, they can be prone to self-heating.
18
www.ni.com
RTDs are commonly categorized by their nominal resistance at 0 C. Typical nominal resistance values for platinum thin-film RTDs include 100 and 1000 . The relationship between resistance and temperature is nearly linear and follows this equation: For <0 C RT = R0 [ 1 + aT + bT2 + cT3 (T - 100) ] (Equation 1) For >0 C RT = R0 [ 1 + aT + bT2 ] Where RT = resistance at temperature T R0 = nominal resistance a, b, and c = constants used to scale the RTD The resistance/temperature curve for a 100 W platinum RTD, commonly referred to as Pt100, is shown in Figure 2.
Figure 2. Resistance-Temperature Curve for a 100 Platinum RTD, a = 0.00385 This relationship appears relatively linear, but curve fitting is often the most accurate way to make an accurate RTD measurement.
(DMM) to measure the resistance between the leads. If there is close to 0 resistance, then the leads are attached to the same node. If the resistance is close to the nominal gage resistance (100 is a common RTD nominal gage resistance), then the wires you are measuring are on the opposite side of the resistive element. In addition, reference the RTD specification to find the excitation level for that particular device. Most instruments offer similar pin configurations for RTD measurements. The following example demonstrates this type of measurement using an NI CompactDAQ chassis and the NI 9217 RTD module (see Figure 3).
Figure 3. NI CompactDAQ Chassis and the NI 9217 RTD Module An RTD is a passive measurement device; therefore, you must supply it with an excitation current and then read the voltage across its terminals. You can then easily transform this reading to temperature with a simple algorithm. To avoid self-heating, which is caused by current flowing through the RTD, minimize this excitation current as much as possible. There are essentially three different methods to measure temperature using RTDs. Two-Wire RTD Signal Connection Connect the red RTD lead to the excitation positive. Place a jumper from the excitation positive pin to the channel positive on the data acquisition device. Connect the black (or white) RTD lead to the excitation negative. Place a jumper from the excitation negative to the channel negative on the data acquisition device.
20
www.ni.com
Figure 4. Two-Wire RTD Measurement In the two-wire method, the two wires that provide the RTD with its excitation current and the two wires across which the RTD voltage is measured are the same. The easiest way to take a temperature reading with an RTD is using the two-wire method; however, the disadvantage of this method is that if the lead resistance in the wires is high, the voltage measured, VO, is significantly higher than the voltage that is present across the RTD itself. The NI 9217 does not support two-wire measurement configurations. Three-Wire RTD Signal Connection Connect the red RTD lead to the excitation positive. Place a jumper from the excitation positive pin to the channel positive on the data acquisition device. Connect one of the black (or white) RTD leads to excitation negative and the other to channel negative. Figure 5 shows the external connections for the measurement as well as the pin-outs for the NI 9217 RTD module.
21
www.ni.com
Figure 5. Three-Wire RTD Measurement Four-Wire RTD Signal Connection To connect this RTD, simply connect each of the red leads on the positive side of the resistive element to the excitation positive and channel positive on the data acquisition device. Connect the black (or white) leads on the negative side of the resistive element to the excitation and channel negative on the data acquisition device. The two additional leads from a two-wire RTD increase the attainable accuracy. Figure 6 shows the external connections for the measurement as well as the pin-outs for the NI 9217 RTD module.
22
www.ni.com
The four-wire method has the advantage of not being affected by the lead resistances because they are on a high-impedance path going through the device that is performing the voltage measurement; therefore, you get a much more accurate measurement of the voltage across the RTD. RTD Noise Considerations RTD output signals typically run in the millivolt range, making them susceptible to noise. Lowpass filters are commonly available in RTD data acquisition systems and can effectively eliminate high-frequency noise in RTD measurements. For instance, lowpass filters are useful for removing the 60 Hz power line noise that is prevalent in most laboratory and plant settings. You can also significantly improve the noise performance of your system by amplifying the lowlevel RTD voltages near the signal source. Because RTD output voltage levels are very low, you should choose a gain that optimizes the input limits of the analog-to-digital converter (ADC). Getting to See Your Measurement: NI LabVIEW Once you have connected the sensor to the measurement instrument, you can use LabVIEW graphical programming software to visualize and analyze the data as needed.
23
www.ni.com
24
www.ni.com
You can use ground referenced input connections for any channel that meets any of the following conditions: The input signal is high-level (greater than 1 V) The leads connecting the signal to the device are less than 10 ft (3 m) The input signal can share a common reference point with other signals The ground reference is provided by either the device taking the measurement or by the external signal being measured. When the ground is provided by the device, this setup is called ground referenced single-ended mode (RSE), and when the ground is provided by the signal, the setup is called nonreferenced single-ended mode (NRSE). Most instruments offer similar pin configurations for analog input measurements. The following example demonstrates this type of measurement using an NI CompactDAQ chassis and an NI 9205 analog input module (see Figure 1).
Figure 1. NI CompactDAQ Chassis and NI 9205 Analog Input Module Figure 2 shows the connection diagram for RSE voltage measurements using an NI cDAQ-9172 chassis with an NI 9205 as well as the pinout for the module. In Figure 2, Pin 1 corresponds to the Analog Input 0 channel and Pin 17 corresponds to the common grou nd.
26
www.ni.com
Figure 2. Ground Referenced Single-Ended Mode Figure 3 shows the connection diagram for NRSE voltage measurements using a cDAQ-9172 with an NI 9205. In the figure, Pin 1 corresponds to the Analog Input 0 channel and Pin 35 corresponds to the Analog Input Sense channel. This channel, specifically for NRSE measurements, can detect the ground voltage provided by the signal.
Figure 3. Non-referenced Single-Ended Mode Differential Voltage Measurement Another method of measuring voltage is to determine the differential voltage between two separate points in an electrical circuit. For example, to measure the voltage across a single resistor, you measure the voltage at both ends of the resistor. The difference between the
27
www.ni.com
voltages is the voltage across the resistor. Usually, differential voltage measurements are useful in determining the voltage that exists across individual elements of a circuit, or if the signal sources are noisy. You can use differential input connections for any channel that meets any of the following conditions: The input signal is low-level (less than 1 V) The leads connecting the signal to the device are greater than 3 m (10 ft) The input signal requires a separate ground reference point or return signal The signal leads travel through noisy environments Figure 4 illustrates the connection diagram for differential voltage measurements using a cDAQ9172 with an NI 9205. In the figure, Pin 1 corresponds to the Analog Input 0 channel and Pin 19 corresponds to the Analog Input 8 channel. In differential mode, the negative signal is wired to the analog pin directly facing the analog channel that is connected to the positive signal. For example, Analog Input 0 would be connected to positive, and Analog Input 8 would be connected to the negative signals, and Analog Input 1 for positive and Analog Input 9 for negative and so on. The disadvantage of differential mode is that it effectively reduces the number of analog input measurement channels by half.
Figure 4. Differential Mode Types of Signal Sources Before configuring the input channels and making signal connections, you must determine whether the signal sources are floating or ground referenced.
28 www.ni.com
Floating Signal Sources A floating signal source is not connected to the building ground system but has an isolated ground reference point. Some examples of floating signal sources are outputs of transformers, thermocouples, battery-powered devices, optical isolators, and isolation amplifiers. An instrument or device that has an isolated output is a floating signal source. The ground reference of a floating signal must be connected to the ground of the device to establish a local or onboard reference for the signal. Otherwise, the measured input signal varies as the source floats outside the common-mode input range. Ground Referenced Signal Sources A ground referenced signal source is connected to the building system ground, so it is already connected to a common ground point with respect to the device, assuming that the measurement device is plugged into the same power system as the source. Non-isolated outputs of instruments and devices that plug into the building power system fall into this category. The difference in ground potential between two instruments connected to the same building power system is typically between 1 and 100 mV, but the difference can be much higher if power distribution circuits are improperly connected. If a grounded signal source is incorrectly measured, this difference can appear as measurement error. Following the connection instructions for grounded signal sources can eliminate the ground potential difference from the measured signal. Figure 5 shows the different types of signal source types as well as the optimal connection diagrams based on the individual measurement method. Please note that depending on the type of signal, a particular voltage measurement method may provide better results than others.
29
www.ni.com
High-Voltage Measurements and Isolation There are many issues to consider when measuring higher voltages. When specifying a data acquisition system, the first question you should ask is whether the system will be safe. Making high-voltage measurements can be hazardous to your equipment, to the unit under test, and even to you and your colleagues. To ensure that your system is safe, you should provide an insulation barrier between the user and hazardous voltages with isolated measurement devices. Isolation, a means of physically and electrically separating two parts of a measurement device, can be categorized into electrical and safety isolation. Electrical isolation pertains to eliminating ground paths between two electrical systems. By providing electrical isolation, you can break ground loops, increase the common-mode range of the data acquisition system, and level shift the signal ground reference to a single system ground. Safety isolation references standards
30 www.ni.com
that have specific requirements for isolating humans from contact with hazardous voltages. It also characterizes the ability of an electrical system to prevent high-voltage and transient voltages to be transmitted across its boundary to other electrical systems with which the user may come in contact. Incorporating isolation into a data acquisition system has three primary functions: preventing ground loops, rejecting common-mode voltage, and providing safety. Ground Loops Ground loops are the most common source of noise in data acquisition applications. They occur when two connected terminals in a circuit are at different ground potentials, causing current to flow between the two points. The local ground of your system can be several volts above or below the ground of the nearest building, and nearby lightning strikes can cause the difference to rise to several hundreds or thousands of volts. This additional voltage itself can cause significant error in the measurement, but the current that causes it can couple voltages in nearby wires as well. These errors can appear as transients or periodic signals. For example, if a ground loop is formed with 60 Hz AC power lines, the unwanted AC signal appears as a periodic voltage error in the measurement. When a ground loop exists, the measured voltage, Vm, is the sum of the signal voltage, Vs, and the potential difference, Vg, which exists between the signal source ground and the measurement system ground (see Figure 6). This potential is generally not a DC level; thus, the result is a noisy measurement system often showing power-line frequency (60 Hz) components in the readings.
Figure 6. A Grounded Signal Source Measured with a Ground Referenced System Introduces Ground Loops
To avoid ground loops, ensure that there is only one ground reference in the measurement system, or use isolated measurement hardware. Using isolated hardware eliminates the path between the ground of the signal source and the measurement device, thus preventing any current from flowing between multiple ground points.
31 www.ni.com
In the previously mentioned NI CompactDAQ setup, the NI 9229 analog input module provides 250 V channel-to-channel isolation.
Common-Mode Voltage An ideal differential measurement system responds only to the potential difference between its two terminals, the (+) and (-) inputs. The differential voltage across the circuit pair is the desired signal, yet an unwanted signal may exist that is common to both sides of a differential circuit pair. This voltage is known as common-mode voltage. An ideal differential measurement system completely rejects, rather than measures, the common-mode voltage. Practical devices, however, have several limitations, described by parameters such as common-mode voltage range and common-mode rejection ratio (CMRR), which limit this ability to reject the commonmode voltage. The common-mode voltage range is defined as the maximum allowable voltage swing on each input with respect to the measurement system ground. Violating this constraint results not only in measurement error but also in possible damage to components on the board. Common-mode rejection ratio describes the ability of a measurement system to reject common-mode voltages. Amplifiers with higher common-mode rejection ratios are more effective at rejecting common-mode voltages. In a nonisolated differential measurement system, an electrical path still exists in the circuit between input and output. Therefore, the electrical characteristics of the amplifier limit the common-mode signal level that you can apply to the input. With the use of isolation amplifiers, the conductive electrical path is eliminated and the common-mode rejection ratio is dramatically increased.
32
www.ni.com
Isolation Topologies It is important to understand the isolation topology of a device when configuring a measurement system. Different topologies have several associated cost and speed considerations. Channel-to-Channel The most robust isolation topology is channel-to-channel isolation. In this topology, each channel is individually isolated from one another and from other nonisolated system components. In addition, each channel has its own isolated power supply. In terms of speed, there are several architectures from which to choose. Using an isolation amplifier with an analog-to-digital converter (ADC) per channel is typically faster because you can access all of the channels in parallel. The NI 9229 and NI 9239 analog input modules provide channel-to-channel isolation to deliver the highest measurement accuracy. A more cost-effective but slower architecture involves multiplexing each isolated input channel into a single ADC. Another method of providing channel-to-channel isolation is to use a common isolated power supply for all of the channels. In this case, the common-mode range of the amplifiers is limited to the supply rails of that power supply, unless you use front-end attenuators.
Bank Another isolation topology involves banking, or grouping, several channels together to share a single isolation amplifier. In this topology, the common-mode voltage difference between channels is limited, but the common-mode voltage between the bank of channels and the nonisolated part of the measurement system can be large. Individual channels are not isolated, but banks of channels are isolated from other banks and from ground. This topology is a lowercost isolation solution because this design shares a single isolation amplifier and power supply. Most NI C Series analog input modules, such as the NI 9201 and NI 9221, are bank-isolated and can provide accurate analog measurements at a lower cost.
33
www.ni.com
Getting to See Your Measurement: NI LabVIEW Once you have connected the sensor to the measurement instrument, you can use LabVIEW graphical programming software to visualize and analyze data as needed (see figure 9).
34
www.ni.com
Figure 1. Illustration of Current Flow Conventional current was defined early in the history of electrical science as a flow of positive charge. In solid metals, like wires, the positive charge carriers are immobile, and only the negatively charged electrons flow. Because the electron carries a negative charge, the electron current flows in the opposite direction of the conventional (or electric) current. When solving electrical circuits, the actual direction of current through a specific circuit element is usually unknown. Consequently, each circuit element is assigned a current variable
35 www.ni.com
with an arbitrarily chosen reference direction. When the circuit is solved, the circuit element currents may have positive or negative values. A negative value means that the actual direction of current through that circuit element is opposite that of the chosen reference direction.
36
www.ni.com
where I is the current in amperes, V is the potential difference between two points of interest in volts, and R is a circuit parameter, measured in ohms (which is equivalent to volts per ampere), called the resistance. Ammeter Operation Todays ammeters have an internal resistance to measure the current across the particular signal. However, when the internal resistance is not enough to measure larger currents, an external configuration is needed. To measure larger currents, you can place a precision resistor called a shunt in parallel with the meter. Most of the current flows through the shunt, and only a small fraction flows through the meter. This allows the meter to measure larger currents. Any resistor is acceptable, as long as the maximum expected current multiplied by the resistance does not exceed the input range of the ammeter or data acquisition device. When measuring current in this fashion, you should use the smallest value resistor possible because this creates the smallest interference with the existing circuit. However, smaller resistances create smaller voltage drops, so you must make a compromise between resolution and circuit interference. Figure 2 shows a common schematic of current measurement across a shunt resistor.
Figure 2. Connecting a Shunt Resistor to a Measurement Using this approach, the current is not actually directed into the ammeter/data acquisition board but instead through an external shunt resistor. The largest current you can measure is theoretically limitless, provided the voltage drop across the shunt resistor does not exceed the working voltage range of the ammeter/data acquisition board.
37
www.ni.com
Current Conventions Conventional Currents Conventional currents are the current measurements common in todays electronics, electrical circuitry, transmission lines, and so on. They do not conform to a transmission standard, and they can range from zero to large values of amperage. Current Loops/4-20 mA Convention Analog current loops are used for any purpose where a device needs to be either monitored or controlled remotely over a pair of conductors. Only one current level can be present at any time. Four to 20 milliamp current loop, or 4-20 mA, is an analog electrical transmission standard for industrial instrumentation and communication. The signal is a current loop where 4 mA represents the zero percent signal and 20 mA represents the 100 percent signal.*1+ The mA stands for milliampere, or 1/1000 of an ampere. The live zero at 4 mA allows the receiving instrumentation to distinguish between a zero signal and a broken wire or a dead instrument.[1] Developed in the 1950s, this standard is still widely used in industry today. Benefits of the 4-20 mA convention include wide use by manufacturers, relatively low implementation costs, and its ability to reject many forms of electrical noise. Also, with the live zero, you can directly power low-power instruments from the loop, saving the cost of extra wires. Accuracy Considerations Placement of the shunt resistor in the circuit is important. If the external circuit shares a common ground with the computer containing the ammeter/data acquisition board, then you should place the shunt resistor as close to the ground leg of the circuit as possible. If not, the common-mode voltage produced by the shunt resistor might be outside the specification for the ammeter/data acquisition board, which could lead to inaccurate readings or even damage the board. Figure 3 shows the correct and incorrect placements of the shunt resistor.
38
www.ni.com
Data Acquisition Device Measurements There are three different methods of measuring analog inputs. Please refer to the How to Make a Voltage Measurement article for additional information on each configuration. As an example, consider the NI CompactDAQ USB data acquisition system. Figure 4 shows an NI CompactDAQ chassis and an NI 9203 analog current input module. The NI 9203 does not require an external shunt resistor due to the presence of an internal precision resistor.
Figure 4. NI CompactDAQ Chassis and NI 9203 Analog Current Input Module Figure 5 shows the connection diagram for Reference Single-Ended (RSE) voltage measurements using an NI cDAQ-9172 chassis with an NI 9203 as well as the pin-outs for the module. In the figure, Pin 0 corresponds to the Analog Input 0 channel and Pin 9 corresponds to the common ground.
39
www.ni.com
Figure 5. Current Measurement in RSE Configuration In addition to the NI 9203, general-purpose analog input modules, such as the NI 9205, can provide current input functionality using an external shunt resistor. Getting to See Your Measurement: NI LabVIEW Once you have connected the sensor to the measurement instrument, you can use LabVIEW graphical programming software to visualize and analyze data as needed.
Figure 6. LabVIEW Current Measurement References: Bolton, William (2004). Instrumentation and Control Systems. Elsevier. ISBN 0750664320.
40
www.ni.com
41
www.ni.com
6. How to Measure Strain with a Strain Gage A. Strain and Strain Gage Overview
Strain is the amount of deformation of a body due to an applied force. More specifically, strain (e) is defined as the fractional change in length, as shown in Figure 1 below. While there are several methods of measuring strain, View a 60-second video on the most common is with a strain gauge, a device whose how to take a Strain electrical resistance varies in proportion to the amount Gage Measurement of strain in the device. The most widely used gauge is the bonded metallic strain gauge.
The metallic strain gauge consists of a very fine wire or, more commonly, metallic foil arranged in a grid pattern. The grid pattern maximizes the amount of metallic wire or foil subject to strain in the parallel direction (Figure 2). The grid is bonded to a thin backing, called the carrier, which is attached directly to the test specimen. Therefore, the strain experienced by the test specimen is transferred directly to the strain gauge, which responds with a linear change in electrical resistance. Strain gauges are available commercially with nominal resistance values from 30 to 3000 , with 120, 350, and 1000 being the most common values.
42
www.ni.com
Figure 2. Bonded Metallic Strain Gauge In practice, the strain measurements rarely involve quantities larger than a few millistrain (e x 10-3). Therefore, to measure the strain requires accurate measurement of very small changes in resistance. To measure such small changes in resistance, strain gauges are almost always used in a bridge configuration with a voltage excitation source. The general Wheatstone bridge, illustrated below, consists of four resistive arms with an excitation voltage, V EX, that is applied across the bridge.
Figure 3. Full-Bridge Circuit The output voltage of the bridge, VO, will be equal to:
From this equation, it is apparent that when R1/R2 = R4/R3, the voltage output VO will be zero. Under these conditions, the bridge is said to be balanced. Any change in resistance in any arm of the bridge will result in a nonzero output voltage. Therefore, if we replace R4 in Figure 3 with an active strain gauge, any changes in the strain gauge resistance will unbalance the bridge and produce a nonzero output voltage. If the nominal resistance of the strain gauge is designated as RG, then the strain-induced change in resistance, DR, can be expressed as DR = RG*GF*e. Assuming that R1 = R2 and R3 = RG, the bridge equation above can be rewritten to express VO/VEX as a function of strain (see Figure 4). Note the presence of the 1/(1+GF*e/2) term that indicates the nonlinearity of the quarter-bridge output with respect to strain.
43 www.ni.com
Ideally, we would like the resistance of the strain gauge to change only in response to applied strain. However, strain gauge material, as well as the specimen material to which the gauge is applied, will also respond to changes in temperature. Strain gauge manufacturers attempt to minimize sensitivity to temperature by processing the gauge material to compensate for the thermal expansion of the specimen material for which the gauge is intended. While compensated gauges reduce the thermal sensitivity, they do not totally remove it. By using two strain gauges in the bridge, the effect of temperature can be further minimized. For example, Figure 5 illustrates a strain gauge configuration where one gauge is active ( R G+ DR), and a second gauge is placed transverse to the applied strain. Therefore, the strain has little effect on the second gauge, called the dummy gauge. However, any changes in temperature will affect both gauges in the same way. Because the temperature changes are identical in the two gauges, the ratio of their resistance does not change, the voltage V O does not change, and the effects of the temperature change are minimized.
The sensitivity of the bridge to strain can be doubled by making both gauges active in a halfbridge configuration. For example, Figure 6 illustrates a bending beam application with one bridge mounted in tension ( RG+ DR) and the other mounted in compression ( RG+ DR). This halfbridge configuration, whose circuit diagram is also illustrated in Figure 6, yields an output voltage that is linear and approximately doubles the output of the quarter-bridge circuit.
44
www.ni.com
Finally, you can further increase the sensitivity of the circuit by making all four of the arms of the bridge active strain gauges in a full-bridge configuration. The full-bridge circuit is shown in Figure 7.
Figure 7. Full-Bridge Circuit Thus, a single arm is an active strain gage in a quarter-bridge circuit; two arms are active strain gages in a half-bridge circuit while all four arms are active strain gages in a full-bridge circuit. Strain gages do not have polarity, although depending upon which one of the above three categories a strain gage, there will be different number of connections that you will have to make to the measurement hardware as explained in the section below.
45
www.ni.com
Figure 8: NI CompactDAQ and NI 9237 bridge module Figure 9 below shows connection diagram for wiring a strain gage in quarter bridge configuration to this module. Connect one end of a quarter bridge gage to CH+ terminal on the module and other end to the QTR terminal. Notice that the EX- terminal on the module is left unwired because for quarter bridge configuration, R3 is internal to the measurement hardware (Figure 9)
Figure 9: Wiring in quarter-bridge configuration For measuring a half-bridge configuration, connect two wires from the two active elements to EX+ and EX- terminals on the module. Lastly, connect a wire between the common point of the two active elements to the QTR terminal on the measurement module.
46
www.ni.com
Figure 10: Wiring in half-bridge configuration For measuring in a full-bridge configuration, connect the common point between R1 and R4 to EX+ and common point between R2 and R3 to EX-. Also, connect the common point between R3 and R4 to CH+ and common point between R1 and R2 to CH-.
47
www.ni.com
Figure 11: Wiring in full-bridge configuration Getting to see your measurement: Now that you have your sensor connected to the measurement device, you can bring that data into computer and visualize using National Instruments LabVIEW graphical programming software. Figure 12 shows an example of displaying measured strain data on a chart indicator inside the NI LabVIEW programming environment.
48
www.ni.com
49
www.ni.com
7. How to Make a Load Cell or Pressure Transducer Measurement A. Load Cells and Pressure Transducers Overview of Operating Principles
A load cell is a transducer that converts mechanical force into electrical signals. There are many different types of load cells that operate in different ways, but the most commonly used load cell today is the strain gage (or strain gauge) load cell. As their name implies, strain gage load cells use an array of View a 60-second video on how to take a Load Cell/Pressure Measurement strain gages to measure the deformation of a structural member and convert it into an electrical signal.
Pressure transducers operate under the same principle. Strain gages, mounted on a diaphragm where the pressure is applied, measure the deformation of the diaphragm that is proportional to the pressure. The following sections describe the principle of operation of strain gage load cells and how to make a measurement from them, although the same applies for strain gage pressure transducers. To understand how a load cell works, you need to first understand the basic theory behind the operating principles. As stated before, strain gages measure deformation, or strain, to determine the force (load) applied. Strain is defined as the fractional change in length. More specifically, strain is the change in length, dL, divided by the original length, L, and it varies directly proportional with the applied load. Figure 1 illustrates this concept. By sensing the strain and knowing the physical characteristics of the structural member to which the load is applied, you can accurately calculate the force.
Figure 1. Strain
50
www.ni.com
While there are several methods of measuring strain, the most common is with a strain gage, a device whose electrical resistance varies in proportion to the amount of strain in the device. The most widely used gage is the bonded metallic strain gage as shown in Figure 2.
Figure 2. Bonded Metallic Strain Gage Because the changes in strain, and therefore resistance, are extremely small, you have to use additional circuitry to amplify the changes in resistance. The most common circuit configuration in a load cell is called a Wheatstone bridge. The general Wheatstone bridge, illustrated in Figure 3, consists of four resistive arms with an excitation voltage, VEX, that is applied across the bridge.
Figure 3. Wheatstone Bridge The output voltage of the bridge, VO, is equal to:
Load cells typically use four strain gages in a Wheatstone bridge configuration, meaning that each resistive leg of the circuit is active. This configuration is called full-bridge. Using a fullbridge configuration greatly increases the sensitivity of the circuit to changes in strain, providing more accurate measurements. Although there is more in-depth theory about
51
www.ni.com
Wheatstone bridges, you do not need to know it because load cells are usually a black box with two wires for excitation (0 V and Vex) and two wires for the output signal (AI+ and AI-). Load cell manufacturers provide a calibration curve for every load cell, which correlates the output voltage to a specific amount of force.
52
www.ni.com
3. Buffered offset nulling The third method, like the software method, does not affect the bridge directly. With buffered nulling, a nulling circuit adds an adjustable DC voltage to the output of the instrumentation amplifier.
Required equipment includes the following: cDAQ-9172 eight-slot Hi-Speed USB chassis for NI CompactDAQ NI 9237 four-channel, 25 mV/V, 24-bit simultaneous bridge module Full-bridge load cell
The NI 9237 has four RJ-50 receptacles that provide connections for four half or full bridges. Figure 5 lists the signal names of the terminals for each connector, and shows the correlation between the pin numbers of the RJ-50 10-position/10-conductor (10p10c) modular plug and the NI 9237 receptacle. The NI 9237 also has a four-position connector you can use to connect an external excitation voltage source to the module. Figure 6 shows where that connector is located, on the bottom of the NI 9237 module. It also displays the necessary connections for a full-bridge configuration.
53
www.ni.com
54
www.ni.com
55
www.ni.com
56
www.ni.com
Figure 1. Waveforms with Frequency Increasing from Top to Bottom Frequency is usually represented as angular frequency in radians/second, or as in seconds-1, also known as the unit hertz (Hz). You also can use beats per minute (BPM) and revolutions per minute (RPM) to represent frequency. Angular frequency (rad/sec) and (Hz) are related by the following formula: =2. Frequency is also spoken of in correlation to a phase , which describes an offset of the wave from a specified reference point at the initial time t0, and is usually given in degrees or radians. Taking the example of a sinusoidal wave, the waveform function is expressed in terms of time as frequency , and phase as constants. , with amplitude A, angular
Periodic analog signals in real applications are complex and can rarely be represented by a simple sinusoid. Fourier analysis is used to decompose any complex waveform into a sum of simpler functions, either sines and cosines or complex exponentials. The frequency components that make up such a signal are often the properties of interest, and this analysis is known as frequency-domain or spectral analysis. This type of analysis is required mainly for sound and vibration and is not examined in this white paper. Obtaining the frequency of a digital signal, on the other hand, is quite simple. For a simple digital signal, such as the one depicted in Figure 2, the period is simply the time between rising edges, or even falling edges.
57 www.ni.com
Figure 2. Digital Waveform If the time between rising or falling edges varies slightly, you can average it over a large number of samples to determine the frequency.
Figure 3. Digital Signal with Respect to Internal Timebase (One Counter for Low Frequency) When the frequency of the digital signal is very high or varies, it is better to use one of the twocounter methods described below. Note that the same hardware limitation applies to both two-counter methods. That is, the frequency you are measuring cannot exceed the maximum input frequency supported by the counter, even though it may exceed that of the internal timebase. High-Frequency Two-Counter Measurement Method For a high-frequency signal, you need two counters. A paired counter (two counters) generates a pulse train with a user-specified period, measurement time (see Figure 4), much larger than that of the signal you are measuring but small enough to prevent counter rollover.
58
www.ni.com
Figure 4. Digital Signal Frequency Measured with Two Counters (High Frequency) The measurement time of this Internal Signal should be a multiple of the Internal Timebase, or, in other words, divided down. The number of ticks of the Input Signal is then counted over the known period of time provided by the Internal Signal. Dividing the number of ticks by the known measurement time gives the frequency of the Input Signal. Large-Range Two-Counter Measurement Method For signals with variations in frequency, this two-counter method provides increased accuracy throughout the entire range. The Input Signal in this case is divided by a known value, or divisor. The number of ticks of the Internal Timebase is counted over one logic-high of the Divided Down Signal (see Figure 5). This gives the time of the logic-high, which is the product of the number of ticks counted and the period of the Internal Timebase. This in turn can be multiplied by 2 to get the period for the Divided Down Signal (high and low time), which is a multiple of the Input Signal period. The Input Signals period can then be inverted to obtain its frequency.
Figure 5. Digital Signal Frequency Measured with Two Counters (Large Range) This method is like averaging the values over a longer range to account for the variation in the signal, but you can also use this method to measure signals with higher frequencies than the timebase. Connecting Your Digital Signal to an Instrument to Count Frequency Many devices with hardware timing may be appropriate for counter measurements. Consider an NI CompactDAQ system as an example (see Figure 6). The hardware timebase for NI CompactDAQ is located on the backplane of the chassis and is not specific to the NI C Series modules themselves. Using the NI cDAQ-9172 chassis, only slots 5 and 6 have access to the PFI lines for counter input. Therefore, you must insert a correlated digital input or digital input/output (DIO) module such as the NI 9401 into Slot 5 or 6 of an NI CompactDAQ chassis.
59
www.ni.com
Figure 6. NI 9401 Correlated DIO C Series Module and NI CompactDAQ Chassis After setting up the frequency acquisition as a counter task in Measurement & Automation Explorer (MAX), the PFI input terminal to which you should connect your signal is indicated (see Figure 7).
60
www.ni.com
Getting to See Your Measurements: NI LabVIEW Once you have configured the system, you can view the data using the LabVIEW graphical programming environment (see Figure 8).
61
www.ni.com
Encoders usually have from 100 to 6,000 segments per revolution. This means that these encoders can provide 3.6 deg of resolution for the encoder with 100 segments and 0.06 deg of resolution for the encoder with 6,000 segments. Linear encoders work under the same principle as rotary encoders except that instead of a rotating disk, there is a stationary opaque strip with transparent slits along its surface, and the LED-detector assembly is attached to the moving body.
62
www.ni.com
Figure 1. Optical Encoder Components An encoder with one set of pulses would not be useful because it could not indicate the direction of rotation. Using two code tracks with sectors positioned 90 deg out of phase (Figure 2), the two output channels of the quadrature encoder indicate both position and direction of rotation. If A leads B, for example, the disk is rotating in a clockwise direction. If B leads A, then the disk is rotating in a counter-clockwise direction. Therefore, by monitoring both the number of pulses and the relative phase of signals A and B, you can track both the position and direction of rotation.
Figure 2. Quadrature Encoder A and B Output Signals In addition, some quadrature encoders include a third output channel called a zero or reference signal which supplies a single pulse per revolution. You can use this single pulse for precise determination of a reference position. In the majority of encoders, this signal is called the Z-Terminal or the index. So far, this document has addressed only what are called single-ended incremental quadrature encoders. These are called single-ended because the A and B signals are both referenced to ground, so there is one wire (or end) per signal. Another commonly used type of encoder is a differential encoder, where there are two lines per each A and B signal. The two lines for the A signal are A and A, and the two lines for the B signal are B and B. This type of configuration is also called push-pull because all four lines are always supplying a known voltage (either 0 V of Vcc). When A is Vcc, A is 0 V , and when A is 0 V, A is Vcc. In the case of a single-ended encoder, A is either Vcc or it floats. Differential encoders are often used in electrically noisy environments because taking differential measurements protects the integrity of the signal.
63
www.ni.com
With incremental encoders, you can measure only changes in position (from which you can determine velocity and acceleration), but it is not possible to determine the absolute position of an object. A third type of encoder, called an absolute encoder, is capable of determining the absolute position of an object. This type of encoder has alternating opaque and transparent segments like the incremental encoder, but the absolute encoder uses multiple groups of segments that form concentric circles on the encoder wheel like a bulls-eye on a target or dartboard. The concentric circles start in the middle of the encoder wheel and, as the rings go out toward the outside of the ring, they each have double the number of segments than the previous inner ring. The first ring, which is the innermost ring, has one transparent and one opaque segment. The second ring out from the middle has two transparent and two opaque segments, and the third ring has four of each segment. If the encoder has 10 rings, its outermost ring has 512 segments, and if it has 16 rings, the outermost ring has 32,767 segments. Because each ring of the absolute encoder has double the number of segments of the prior ring, the values form numbers for a binary counting system. In this type of encoder, there is a light source and receiver for every ring on the encoder wheel. This means that the encoder with 10 rings has 10 sets of light sources and receivers, and the encoder with 16 rings has 16 light sources and receivers. The advantage of the absolute encoder is that you can gear it down so that the encoder wheel makes one revolution during the full length of machine travel. If the length of machine travel is 10 in. and its encoder has 16-bit resolution, the resolution of the machine is 10/65,536, which is 0.00015 in. If the travel for the machine is longer, such as 6 ft, a coarse resolver can keep track of each foot of travel, and a second resolver called the fine resolver can keep track of the position within 1 ft. This means you can gear the coarse encoder so that it makes one revolution over the entire 6 ft distance and gear the fine encoder so that its entire resolution is spread across 1 ft (12 in.).
64
www.ni.com
Figure 3. Simplified Model of a Counter An encoder usually has five wires that you need to connect to the instrument, and, depending on the encoder, these wires vary in color. You can use these wires to provide power to the encoder and to read in the A, B, and Z signals. Figure 4 shows a typical pinout table for an incremental encoder.
Figure 4. Incremental Encoder Pinout The next step is determining where you should connect each of these wires. Considering the counter described above, signal A is connected to the source terminal, making this the signal from which the pulses are counted. Signal B is connected to the up/down terminal, and you can connect the +5 VDC and ground signals to any power source in most cases, a digital line in a data acquisition device card suffices. Once the edges are counted, the next concept you need to consider is how those values are converted to position. The process by which edge counts are converted to position depends on the type of encoding used. There are three basic types of encoding, X1, X2, and X4. X1 Encoding Figure 5 shows a quadrature cycle and the resulting increments and decrements for X1 encoding. When channel A leads channel B, the increment occurs on the rising edge of channel A. When channel B leads channel A, the decrement occurs on the falling edge of channel A.
Figure 5. X1 Encoding
65
www.ni.com
X2 Encoding The same behavior holds for X2 encoding except the counter increments or decrements on each edge of channel A, depending on which channel leads the other. Each cycle results in two increments or decrements, as shown in Figure 6.
Figure 6. X2 Encoding X4 Encoding The counter increments or decrements similarly on each edge of channels A and B for X4 encoding. Whether the counter increments or decrements depends on which channel leads the other. Each cycle results in four increments or decrements, as shown in Figure 7.
Figure 7. X4 Encoding
Once you have set the encoding type and counted the pulses, converting to position is a matter of using one of the following formulas:
Amount of Rotation is
66
www.ni.com
where, N = number of pulses generated by the encoder per shaft revolution x = encoding type
Amount of displacement is Where PPI = pulses per inch (a parameter specific to each encoder)
Required equipment: cDAQ-9172 eight-slot Hi-Speed USB chassis for NI CompactDAQ NI 9401 eight-channel, 5 V/TTL high-speed bidirectional digital I/O module 24 pulse/rev rotational quadrature encoder
67
www.ni.com
The NI 9401 has a D-Sub connector that provides connections for the eight digital channels. Each channel has a digital I/O pin to which you can connect a digital input or output device. Access to the two counters of the cDAQ-9172 is available only through slots 5 and 6 of the chassis; therefore; insert the 9401 in slot 5. Figure 8 shows the pinout for this configuration, and Figure 9 shows the default counter terminals.
68
www.ni.com
According to these specifications, Wire A is connected to Pin 14, Wire B is connected to Pin 17, 5 VDC Power is connected to any unused digital line set to high, and Ground is connected to any COM terminal. Getting to See Your Measurement Now that you have your encoder connected to the measurement device, you can use NI LabVIEW graphical programming software to transfer the data into the computer for visualization and analysis. Table 1 shows an example of displaying the edge count and the corresponding position increments inside the LabVIEW programming environment.
69
www.ni.com
70
www.ni.com
10. How to Make a Sound and Vibration Measurement A. Sound and Vibration and Piezoelectric (IEPE) Sensor Overview
Vibration occurs when a mass oscillates mechanically about an equilibrium point. A common example of a vibrating mechanical system is a spring-mass-damper system, illustrated in Figure 1. Vibrations also occur in surfaces, such as the wing of an airplane, or a gong. In many cases, vibrations are unwanted because they waste energy and cause fatigue stress and noise, View a 60-second video and systems are usually designed to minimize these about types of vibrations. Meanwhile, vibrating structures how to take a Sound generate pressure waves, or sound, which can and Vibration Measurement be desirable in the case of musical instruments.
Figure 1. Spring-Mass-Damper System Sound and vibration are essentially oscillations in different media, and just like vibrations can create sound, acoustic waves traveling through air can generate oscillations in solid materials as well. Because the theory behind the two is correlated, measuring sound and vibration is also similar in nature. You can represent both sound and vibration as oscillations, and the simplest oscillations are sinusoidal waveforms expressed in terms of time as , with angular frequency and phase as constants. Angular frequency is represented in radians per second (rad/sec) and is related to frequency (Hz or s-1) by the following formula: =2. Angular frequency is always spoken of in correlation to a phase , which describes an offset of the wave from a specified reference point at the initial time t0, and is usually given in degrees or radians.
71
www.ni.com
Analysis of Sound and Vibration Measurements In real applications, the measured voltage signals are complex waveforms that contain multiple frequency components. Sound and vibration analysis usually involves identifying and examining these frequency components. To do so, you must convert the signals from the time domain to the frequency domain mathematically using Laplace, Z-, or Fourier transforms. Fourier analysis is the most common for this application because it obtains the magnitude in decibels (dB) and associated phase (degrees or radian) for each frequency component in a signal. IEPE Sensors Typical indicators for making sound and vibration measurements are acceleration and sound pressure level, respectively. These indicators are commonly measured using devices such as accelerometers (shock and vibration) and microphones (sound). Many sensors for measuring acceleration and pressure are based on the principle of piezoelectric generation. The piezoelectric effect denotes the ability of ceramic or quartz crystals to generate electric potential upon experiencing compressive stresses. These mechanical stresses are triggered by forces such as acceleration, strain, or pressure. In the case of microphones, acoustic pressure waves cause a diaphragm, or thin membrane, to vibrate and transfer stresses into the surrounding piezoelectric crystals. Accelerometers, on the other hand, contain a seismic mass that directly applies forces to the surrounding crystals in response to shock and vibrations. The voltage generated is proportional to the internal stresses in the crystals. A particular class of piezoelectric sensors, known by the term integral electronic piezoelectric (IEPE), incorporates an amplifier in its design next to the piezoelectric crystals. Because the charge produced by a piezoelectric transducer is very small, the electrical signal produced by the sensor is susceptible to noise, and you must use sensitive electronics to amplify and condition the signal and reduce the output impedance. IEPE therefore makes the logical step of integrating the sensitive electronics as close as possible to the transducer to ensure better noise immunity and more convenient packaging. A typical IEPE sensor is powered by an external constant current source and modulates its output voltage with respect to the varying charge on the piezoelectric crystal. The IEPE sensor uses only one or two wires for both sensor excitation (current) and signal output (voltage).
72
www.ni.com
As mentioned in the above section, sound and vibration measurements are highly susceptible to noise. You can reduce this effect, however, by properly grounding the system. You can avoid improper grounding resulting from ground loops or floating nodes by ensuring that either the signal conditioning input or the sensor is grounded but not both. If the sensor is grounded, you must connect it differentially. If the sensor is floating, you should connect the signal conditioning systems inverting input to ground. The signal acquired from the sensor consists of both DC and AC components, where the DC portion offsets the AC portion from zero. AC coupling removes the DC offset in the system by means of a capacitor in series with the signal. An AC-coupled sensor system eliminates the longterm DC drift that sensors have due to age and temperature effect, dramatically increasing the resolution and the usable dynamic range of the system. For accurate measurements, the sampling rate of the system should be at least twice the frequency of the signals being acquired. To be sure that you are sampling the correct range of frequencies, add a lowpass filter before the sampler and the analog-to-digital converter. This ensures that you attenuate higher-frequency noise and that these aliasing components above the sampling rate do not distort the measurement. Connecting Your Sensor to an Instrument As an example, consider the NI 9234 C Series module that is designed for accelerometer and microphone measurements (see Figure 2). The NI 9234 can simultaneously sample four analog inputs at 51.2 kS/s while offering software-selectable IEPE signal conditioning, AC/DC coupling, and antialiasing filtering. The NI 9234 can be used in an NI cDAQ-9172 chassis.
73
www.ni.com
Figure 2. NI 9234 C Series Module with NI CompactDAQ Chassis The module has four BNC connectors that can each connect to an IEPE sensor (see Figure 3). The center pin of the connector, AI+, provides the DC excitation and AC signal connection. The shell of the connector, AI, provides the excitation return path and AC signal ground reference.
Figure 3. NI 9234 BNC Connector Assignments An IEPE sensor needs an appropriate cable and/or connector to hook into the BNC inputs of the C Series module. Triaxial accelerometers have three outputs, one axis to one acquisition channel, each requiring its own signal conditioning. You can connect both ground-referenced or floating IEPE sensors to the NI 9234, but you must use a floating connection to prevent ground noise from being picked up. Typical IEPE sensors
74
www.ni.com
have a case that is electrically isolated from the IEPE electronics, so connecting the sensor to the NI 9234 results in a floating connection even though the case of the sensor is grounded. Getting to See Your Measurement: NI LabVIEW Once you have configured the system properly, you can acquire and visualize data using the LabVIEW graphical programming environment (see Figure 4). In software, you can covert the acquired voltage into frequency data through spectral (frequency-domain) analysis functions. A simple example is a fast Fourier transform, or FFT function. You can conduct more advanced software processing of the data using one of the many tools that National Instruments has to offer, such as the NI Sound and Vibration Measurement Suite.
75
www.ni.com
76
www.ni.com