Anda di halaman 1dari 10

University of Saskatchewan EE 392 Electrical Engineering Laboratory III

8-1

Designing with Labview


Temperature Measurement with ADC controlled by Labview Safety The voltages used in this experiment are less than 15 V and normally do not present a risk of shock. However, you should always follow safe procedures when working on any electronic circuit. Assemble or modify a circuit with the power off or disconnected. Dont touch different nodes of a live circuit simultaneously, and dont touch the circuit if any part of you is grounded. Dont touch a circuit if you have a cut or sore that might come in contact with a live wire. Check the orientation of polarized capacitors before powering a circuit, and remember that capacitors can store charge after the power is turned off. Never remove a wire from an inductor while current is flowing through it. Components can become hot if a fault develops or even during normal operation so use appropriate caution when touching components.

Objectives: This lab introduces a design for a typical digital instrumentation system by means of temperature measurements. References: NTC Thermistors: type SA data sheet, material type D10.3 (download from class website) Preparation: 1. Review the theory of temperature measurement and digital instrument principles 2. Work through Getting Started with LabView at LabView 8.2 on the campus computers. Programs / Electrical Engineering / LabView / LabView 8.2 > Getting started with LabView Thermistors: Thermistors are low-cost temperature-sensitive resistors and are constructed of solid semiconductor materials which exhibit a positive or negative temperature coefficient. Although positive temperature coefficient devices are available, the most commonly used thermistors are those with a negative temperature coefficient. Figure 1 below shows the resistance-temperature curve of a commonly used NTC (negative temperature coefficient) thermistor. The thermistor's high sensitivity (typically, -44,000ppm/C at 25C, as shown in Figure 2) allows it to detect minute variations in temperature which could not be observed with a Resistance Temperature Detector (RTD) or thermocouple (a factor of 500 improvement in error over an RTD can be achieved). However, as is shown in Figure 2, the temperature coefficient of thermistors does not decrease linearly with increasing temperature as it does for RTDs; therefore, linearization is required for all but the narrowest of temperature ranges. In addition, even though a thermistor's response time is short due to its small size, its small thermal mass makes it very sensitive to self-heating errors.

University of Saskatchewan EE 392 Electrical Engineering Laboratory III

8-2

Fig. 1 Resistance characteristics of a 10 K NTC thermistor


It is possible to use a thermistor over a wide temperature range only if the system designer can tolerate a lower sensitivity to achieve improved linearity. One approach to linearizing a thermistor is simply shunting it with a fixed resistor. As shown in Figure 3, the parallel combination exhibits a more linear response to temperature compared to the thermistor itself. The sensitivity of the combination still is high compared to a thermocouple or RTD. The primary disadvantage to this technique is that linearization can only be achieved within a narrow range. The value of the fixed resistor can be calculated from

R=

RT 2 (RT 1 + RT 3 ) 2RT 1RT 3 RT 1 + RT 3 2RT 2

where RT 1 is the thermistor resistance at the lowest temperature in the measurement T1 range, RT 3 is the thermistor resistance at the highest temperature in the range T3 , and RT 2 is the thermistor resistance at the midpoint T2 = (T1 + T3 )/ 2.

Fig. 2 Temperature coefficient of a 10 K NTC thermistor

University of Saskatchewan EE 392 Electrical Engineering Laboratory III

8-3

Fig. 3 Linearization of NTC thermistor The output of the network can be applied to an ADC to perform further linearization as shown in Figure 4. Note that the output of the thermistor network has a slope of approximately -10mV/oC, which implies that a 12-bit ADC has more than sufficient resolution.
Procedure: 1. Using the schematic diagram in Figure 5, determine the interconnections of various components in the heater chamber provided in the lab. Identify the thermistors, the parallel resistor, the temperature sensing IC LM35 and the 51 heater. 2. Connect THERMISTOR output to ACH0 input of the DAQ Board, COMP THERMISTOR output to ACH1 input, the LM35 output to ACH2 and DIO0 from the DAQ to the control input. 3. Start LabVIEW on the computer. 4. Using various building functions in LabVIEW, plot the three voltage signals received from the three analog input channels. Apply power to the heater box. Provide the plots in your report. Draw conclusions from the plots.

Fig. 4 Linearized thermistor diagram

University of Saskatchewan EE 392 Electrical Engineering Laboratory III

8-4

5. Convert LM35 voltage readings to temperatures, and use them as the reference for voltage versus temperature plots for the two thermistors. During the experiment, save your ACH0, ACH1 and ACH2 data (i.e., voltages) sampled at temperature intervals of 0.5OC. 6. Using saved data, plot voltage versus temperature for ACH0 and ACH1 in your report. Comment on the results. 7. In LabVIEW, setup a routine which sends out +5V to DIO0 in the DAQ when the temperature reaches 58OC in ACH2 and send out 0V when the temperature falls below 56OC. This signal will turn off the heater at 58OC and turn it back on at 56OC. Demonstrate the working control routine to your lab instructor. Questions: 1. Identify and discuss possible sources of errors in the temperature measurement used in this experiment (for all three measuring methods). 2. Did the resistance placed in parallel with the thermistor improve the linearity characteristic of the sensor? Why? 3. Revise and describe a method (with your schematic, block diagram, etc...) to linearize the NTC transducer (thermistor) for temperature measurements.

University of Saskatchewan EE 392 Electrical Engineering Laboratory III

8-5

Fig. 5 Schematic diagram of the heater chamber and control

University of Saskatchewan EE 392 Electrical Engineering Laboratory III

8-6

Appendix: Getting Started with LabView

This lab is to design a digital instrumentation system which measures and controls the temperature inside of a chamber equipped with thermistors and a heating element by using the software tool, LabView. This Appendix provides a quick introductory tutorial of how to use the LabView to graphically program a digital instrument and make a virtual instrument file *.vi using various functions and controls provided in the LabView. The tutorial is Chapter 3: Analyzing and Saving a Signal of Getting Started with LabView manual. This sample program helps you to build a *.vi which has the front panel and block diagram as shown below.

1. VI from Template / Tutorial (Getting Started) / Generate, Analyze, and Display 2. Start and Stop in Front Panel 3. Remove RMS Indicator, then ctrl B to remove loose wires in Block Diagram 4. Waveform Graph / Properties / Label >Check mark Visible 5. Create 2nd Simulate Signal: >Hold down the <Ctrl> key drag Simulate Signal to a new location or ctrl C -> ctrl V copy and paste 6. Double Click on Simulate Signal2 >Signal type=Sine, Frequency=60, Amplitude=0.1, Check Add noise, Noise amplitude=0.1 Seed=-1, Timing As fast as possible, Uncheck Use signal type name, Signal name=60Hz and Noise

University of Saskatchewan EE 392 Electrical Engineering Laboratory III

8-7

7. Remove all wirings 8. Formula: Functions / Express / Arithmetic and Comparison / Formula >Add Sine, and 60Hz and Noise 9. Filter: Functions /Express / Signal Analysis / Filter >Filtering type=Lowpass, Cutoff Frequency=25Hz, IIR, Butterworth, Order=3 10. Right Click on Waveform Graph / Properties >Label=Unfiltered Signal, Display Format x-axis=3 digits and y-axis 1=digit, Scale=no autoscale for y-axis 11. Create 2nd Waveform graph: >Hold down the <Ctrl> key drag Waveform Graph to a new location >Label=Filtered Signal 12. Wire Formula Result -> Unfiltered Signal (Graph), Result -> Filter -> Filtered Signal (Graph) 13. Wire Filtered Signal -> Signals (Amplitude and Level) 14. Amplitude and Level Measurement (already exists) Functions / Signal Express / Analysis / Time Domain Measurements / 15. Time Delay: Functions / Express / Execution Control / >Set time delay = 0.1s 16. LEDs: Controls / Express / > double click Boolean label -> enter "Warning" 17. Comparison: Functions / Express / Arithmetic & Comparison / Express Comparison / >Choose ">" Greater, Value=2 18. Wire Peak to Peak -> Operand1, Result (Greater) -> LED (Warning) 19. Write To Measurement File: Functions / Express / Output / >Configure File Name=C:\LabVIEW Data\test.lvm Save to one file, Overwrite file, Text (.lvm), one header 20. Wire Peak to Peak (Amplitude and Level) -> Signals (Write to Measurement File) 21. Rocker Button: Controls / Express / Buttons and Switches / >Change label to "Write to File" 22. Wire Rocker button -> Enable (Write To Measurement File)

University of Saskatchewan EE 392 Electrical Engineering Laboratory III

8-8

Your LabView Program

Procedure (2) Connect THERMISTOR output to ACH0 input of the DAQ Board, COMP THERMISTOR output to ACH1 input, the LM35 output to ACH2 and DIO0 from the DAQ to the control input. Procedure (7) In LabVIEW, setup a routine which sends out +5V to DIO0 in the DAQ when the temperature reaches 58OC in ACH2 and send out 0V when the temperature falls below 56OC. This signal will turn off the heater at 58OC and turn it back on at 56OC. Demonstrate the working control routine to your lab instructor. The procedure (2) and (7) require connections to Analog Inputs of the DAQ Board from thermistors and LM35, and from Digital Output to a relay controlling the heating element. Those DAQ Board related controls and functions are locally set up for the specific DAQ board installed in the lab computers. In order to locate the Analog Inputs and Digital Output, follow the steps given below.

University of Saskatchewan EE 392 Electrical Engineering Laboratory III

8-9

Analog Input Setup

Block diagram / functions / express / input / DAQ assistant analog input > voltage > Ai0, Ai1, Ai2 Configuration Right click > voltage_0 > rename: therm Settings Max: 7 NRSE 1 sample on demand Right click > voltage_1 > rename: thermcomp Settings NRSE Right click > voltage_2 > rename: lm35 Settings NRSE
Digital Output Setup

Controls / modern / I/O / DAQmx name controls / DAQmx task name Front panel > right click on DAQmx task name New NiDAQmx task > max Digital I/O Line O/p Port 0 / line 0 Enter name: eg: digital line out Finish Front panel / DAQmx task name > select: digital line out Function / measurement I/O / Ni-DAQmx / DAQmx start task Function / measurement I/O / Ni-DAQmx / DAQmx write Right click on DAQmx write Select type Digital Single channel Single sample Boolean ( 1 line ) Function / measurement I/O / Ni-DAQmx / DAQmx clear task

University of Saskatchewan EE 392 Electrical Engineering Laboratory III

8-10

The front panel of a possible VI configuration is shown below. Examine the structure to determine what functions and controls may be needed to construct your own VI.

Anda mungkin juga menyukai