Mechatronics 3

.docx

School

Georgia Southern University *

*We aren’t endorsed by this school

Course

3331

Subject

Mechanical Engineering

Date

Feb 20, 2024

Type

docx

Pages

6

Uploaded by AgentStar96299

Report
INTRO TO LABVIEW AND DATA ACQUISITION WITH A NI-USB-TC01 THERMOCOUPLE Sean McDaniel October 15, 2023 MENG 3511 Introduction to Mechatronics ABSTRACT The combination of these two labs is to introduce the use of LabVIEW (Laboratory Virtual Instrument Engineering Workbench) to students as well as show how to perform data acquisition with a NI-USB-TC01 Thermocouple. LabVIEW can be used to imitate physical instruments that students will use such as oscilloscopes and multimeters. Learning LabVIEW is a necessity because it allows students to have better convenience and organization when performing complex tasks. To achieve this objective, Students are given simple tasks that require the basic operations needed to run a VI program on LabVIEW. This consists of showing the students how to change and program graphs that can simulate circuits in the real world and compare multiple waves at the same time. Some of the graphs used are saw tooth, sine, cosine, and square graphs. The properties are changed throughout the process to show students how to manipulate the properties of tools added onto LabVIEW. Afterwards, students are taught how to use thermocouples to find temperatures and voltages of objects in the actual world. In this lab. Students measure the voltages and temperatures of their own hand, an ice pack, and the ambient temperature of the room. The results of the measurements found using thermocouple VI are as follows: An average of 83.3 for the palm of the student’s hand, 33.4 for the ice pack given during the experiment, and 68.2 for the ambient temperature of the room. The time constant for the thermocouple was calculated to be 4.9s by taking 63.2% of the time it took the measurements to reach a steady-state temperature. NOMENCLATURE ° F Fahrenheit (Degrees) Celsius (Degrees) V Volts (Volts) T Temperature ( ) t Time (seconds) INTRODUCTION In the first part of this laboratory, Students are introduced to the basic programming skills of LabVIEW. In the second part of this laboratory, Students are introduced to the idea of temperature measurement with thermocouples and data acquisition using the LabVIEW DAQ Assistant. LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is a virtual instrument that can be used to imitate physical instruments such as oscilloscopes and multimeters. LabVIEW has a large set of tools for acquiring, analyzing, displaying, and storing data, as well as tools to help troubleshoot the codes that are written. A user can build a user interface (Front Panel) with controls and indicators. Some examples of input mechanisms in LabVIEW are knobs, push buttons, and dials. Some examples of output indicators are graphs and LEDs. LabVIEW can also be used in pair with a NI-USB-TC01 thermocouple data acquisition board to investigate temperature measurements, gain data acquisition and log data into LabVIEW. The NI-USB-TC01 is a device that consists of a J- type thermocouple, amplifier, single channel analog data acquisition and USB interface. A thermocouple is a temperature measurement device made of a junction of dissimilar metals. The different thermal characteristics of the two types of materials at a thermocouple junction result in a small voltage visible on the thermocouple leads that is related to the temperature of the junction. An amplifier is then used because the voltage that is visible is small and needs to be accurately inputted into an analog to digital converter. Thermocouples can be made from many different metals and the choice of the conductors determines the operating temperature range and other details of the measuring device. In this experiment, a J-Type thermocouple is used along with the NI-USB-TC01. The J- Type thermocouple is made of iron and constantan and has a temperature range of 0 to 750 . Most of the second part of the laboratory experiment is creating the LabVIEW VI that measures the output of the
thermocouple amplifier, displaying the information, and storing temperature and time records to a file so it can be used later. EXPERIMENTAL METHODS The first part of this laboratory is introducing students to LabVIEW. We start by launching the program and opening a new VI by selecting VI>From Template>Simulated>Generate and Display and then pressing ok. Students are shown the first example of a front panel. Students then are asked to press window>show block diagram. So that the block diagram will appear. It is recommended the students put the front panel on one side of the computer screen and the block diagram on the other side. Students are then asked to add a control to the front panel. Select view>controls>palette. The express menu is then presented, and students enter a numeric controls palette onto the front panel of the program. Students then learn how to change the signal type. This can be done by right clicking the Simulate Signal Express VI button and selecting Properties. Properties can be changed to show different signal types, frequencies, phases, amplitudes and more. Next students are shown how to wire objects on the block diagram. This is demonstrated by explaining how to wire a physical knob onto the amplitude of the signal output so that we can adjust the signal amplitude just by using the knob instead of going to the properties tab. Students then run the program and are shown the graphs of the signal type they have selected. Students modify these graphs by adding a Scaling and Mapping program to the block diagram. The user is then told how to change the waveform properties and add multiple inputs onto the same graph so that they all display as one unified graph. The second part of this experiment shows students how to perform data acquisition using a NI-USB-TC01 Thermocouple in LabVIEW. Students start off by plugging in the NI-USB- TC01. The user then opens LabVIEW and creates a blank VI. A while loop is added to the block diagram by right clicking the block diagram and expanding the list using the double down arrow symbol at the very bottom of the pop-up menu. The while loop is made by making the selections Programming > Structures > While Loop. The user then left clicks the bottom corner of the block diagram and drags from the bottom left to the upper right to make a large grey rectangle outline. A Boolean input is then used by the VI to determine if the while loop should be processed. We add an on/off button by changing to the front panel and selecting Express > Buttons > Push Button and place it somewhere on the front panel. Students then change the view back to the block diagram and wire the button to the stop symbol on the bottom right of the while loop. A DAQ Assistant VI is now needed to be added to the block diagram. The VI function can be found in the functions palette by selecting Express > Output > DAQ Assist. After placing the DAQ Assistant onto the block diagram we configure the VI to measure temperature by selecting Acquire Signals > Analog Input > Temperature > Thermocouple. Select the available channel ai0. Another DAQ assistant configuration then appears. Students change the Display Type drop down menu to the Chart Setting to visualize numerical. The user now needs to be shown how to display and log the temperature data that they will be collecting. We add a chart and wire the data port on the DAQ Assistant icon to the chart icon on the block diagram. Run VI to verify that the data is being displayed on the chart. Stop the VI using the loop stop button on the front panel. Students then add a Write to measurement file VI to the block diagram to set up data logging. The VI is found in the functions palette by selecting Express > Output > Write Measurement File. The VI is then saved and if any preexisting files are present then the user must override those. A functionality to view temperatures both in Fahrenheit and Celsius is then added. We do this by adding the equation to the Block Diagram by selecting Mathematics > Numeric > Conversion > To Double Precision Float. Add the conversion block to the diagram and wire the signal to the input. Students then determine the Thermocouple Time Constant by opening the. LVM file that was created containing the temperature and time data. This can be done by opening an Excel spreadsheet and dragging and dropping them into the new file. LVM file into the first sheet. The time constant of the thermocouple is the time it takes for the measurement to make it to 63.2% of its steady state. Data is now collected for Calibration. To do so, students make a calibration curve for the thermocouple by comparing the steady-state voltage output to the steady- state temperature output. The only difference
in configuration will be the selection to acquire an analog voltage instead of an analog temperature. Students plot the voltage versus temperature data for the three data points and find a best fit straight line that will represent the sensitivity of the thermocouple. Lastly, students need to determine the statistical precision of the measurements. Start off by running the VI and making ten measurements of the temperature on your hand, letting the temperature start to move back toward room temperature between each measurement. Record the steady state value at each measurement. Users then open the VI block diagram and add a statistic VI outside the while loop. The statistics VI can be found in the functions palette by selecting Mathematics > Probability and Statistics > Statistics. A window will appear when the VI is placed on the block diagram. Check arithmetic mean, standard deviation, maximum and minimum. Click ok to close the dialog box. We then wire all these components together. We then add a read from measurement file VI to the block diagram. The VI can be found in the functions palette by selecting Express > Input > Read Measurement File. When the configuration window opens use the filename section and the browse files button to point to the. LVM file that was created with ten data points. Click the read file now button and ensure the data is displayed correctly in the spreadsheet. Wire together the signals ports of the read from measurement file and statistics blocks. Switch to the front panel and position the numeric indicators you created where you would like and run the VI to see the calculation results. Stop the VI and save the program. Make sure to record all values and screenshot pictures of the graphs that you have created from this program. DATA Temperature for Calibration Table 1. Calibration environment Temperature, T(C) Voltage, Vo(mV) Ice -4.49087 -1.505 Room 18.592628 -0.275 Hand(P1) 27.320341 0.156 Hand(P2) 29.381207 0.284 Table 2 Time Response Time t (sec) T(t) T(t)- To/Tf- T0 -ln(1- T(t)-T0/ Tf-T0) 0 20.3203 3 0 0 0.231353 20.5259 58 0.07886 5978 0.082149 735 0.471268 20.7558 92 0.16822 8894 0.184197 989 0.71139 20.9776 65 0.25547 058 0.295002 912 0.950734 21.1696 53 0.33008 5937 0.400605 84 1.191005 21.3318 7 0.39313 0916 0.499442 189 1.430996 21.4778 46 0.44986 3896 0.597589 57 1.670291 21.6427 22 0.51394 2285 0.721427 906 1.910606 21.8210 84 0.58326 1952 0.875297 437 2.149879 21.9615 92 0.63786 9816 1.015751 508 2.389969 22.0696 64 0.67987 156 1.139032 99 2.629299 22.1750 23 0.72081 8908 1.275894 633 2.869993 22.3019 81 0.77016 062 1.470374 56 3.109367 22.4370 28 0.82264 6088 1.729608 041 3.349488 22.5828 6 0.87932 3103 2.114638 579 3.588405 22.7205 73 0.93284 4702 2.700747 457 3.828979 22.8231 72 0.97271 9387 3.601578 966 4.068993 22.8933 66 1 0 Tim e Con stan t Ris e tim e, tR(s %D iffer enc e for Sens itivit y, K (mV /C) Expec ted Range of k (mV/ %Differe nce for k from mid- range
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help