The objectives of this laboratory are to:
· calibrate a pressure transducer;
· recognize the NEED to monitor the source voltage (V = I R) and power (P = V I);
· perform a linear regression of data;
· develop an intuitive VI for the project; and
· determine the correlation of the regression analysis for the lab report.
A pressure gage, such as that shown in Fig. 1, requires manual readings and subsequent data entry of the pressure values. This manual recording mechanism is a bottleneck in an automated process. Alternately, a pressure transducer produces an electrical output which can be calibrated to the applied pressure. The electrical signal can be transmitted over large distances, especially relative to manual inspection. Further, the transducer can record data continuously. It can be entered directly into an automated data acquisition system. The pressure transducer type used for this lab is shown in Fig. 2. You can sign onto omega and find out additional specifications for this pressure transducer, which is rated from 0 to 100 psig.
A compressed-air tank, circa 3 gallon volume, is displayed in Fig 3 and Fig 4. Note the pressure gage and pressure transducer on the tank, as well as the air intake and exhaust ports and valves. Make sure all connections are secure before beginning the physical components of the lab. Make sure all lab partners are wearing safety glasses!
The ‘red’ and ‘black’ wires are used to power the transducer. They need to be connected to a power source positive and negative connections, respectively. You will program one of your Analog Output channels to supply the source voltage. The ‘green’ and ‘black’ wires are used to read the output voltage, which is a function of the pressure. Note, the black wire is ground for both excitation and output readings. The source (or excitation) and output voltages need to be read by your LabView program. Therefore, one analog output and two analog input channels need to be configured.
Before you get too far along, check the voltages with a hand-held digital voltmeter, DVM. Make sure the source voltage is what you programmed and the output voltage (green and black connections) is approximately +1 volt when the tank is NOT pressurized.
Build a VI that is suitable to calibrate the pressure transducer. Recall the figure detailing the pressure transducer, Fig. 2. It stated for a "regulated" excitation (source) voltage of 8V the output would range between 1V to 6V corresponding to zero to full pressure (100 psig in our situation). Therefore, a 5V change is expected for a 100 psig change that the transducer reads, or 20 psig per volt change is expected. The pressure transducer reads 1 volt at 0 psig. This latter feature is standard. It verifies that the transducer is working prior to any applied pressure. (It also consumes power continuously.)
One would expect a pressure calibration similar to:
Pressure = (20psig/V) * (Voltage_Read – Minimum_Volt_Reading)
Or:
Pressure = Slope*Voltage_Read + Intercept
Where Slope = 20psig per volt
Intercept = - 20*Minimum_Volt_Reading
This calibration expression is not the exact solution to your task. Simply stated: it is difficult to get a regulated voltage source of 8V.
The USB-6229BNC unit cannot provide sufficient power to maintain a constant 8V source. The 6229 is rated for 5 milliamps max per analog output channel. If more amperage is required, the unit looses its linearity. Consequently, the monitored source voltage will read less than 8V, perhaps about 7.5V. It will still work, but is not a regulated 8V source. Similarly, if you use a 9-volt battery, it can provide the power, but it too is not 8 volts. If you use the 2310 power supply (Signal Conditioner) the excitation voltage can be set to 10 V, it has sufficient power to drive the transducer, but it isn't 8V.
We need to work around the lack of a programmable regulated power source. The transducer specifications list 8Vdc regulated, but will remain linear with a source supply of 16V or less. Therefore, a linear regression that predicts the pressure based on a relative or normalized output voltage i.e. output_voltage/source_voltage can be implemented. This calibration strategy is more reliable in situations where the source voltage changes.
Your final VI must have Slope and Intercept ‘CONTROLS’, which will initially be set to 1 and 0, respectively. Your VI must have analog inputs within a While-Loop to read the two channels. The normalized voltage needs to have slope multiplier and an intercept. You need to apply numeric operators coupled with the output and source voltage readings to create the normalized voltage value. The VI needs to display the calculated pressure, output_voltage, and source_voltage using INDICATORS. A CONTROL is required for entry of the visual pressure gage (not transducer) reading. This control entry will be used to calibrate the pressure transducer reading. Create a pressure gage CONTROL icon as a dial that you set based on the pressure gage display.
The VI needs to “write to disk” the following Headings and Values in order to a spreadsheet:
Elapsed Time, Output V, Source V, Transducer, Relative V, Pressure Gage
A Boolean button or switch is required that, when activated, sets a ‘case select‘ status to ‘true’ and records the data to disk. If the button/switch is not activated the ‘case select’ is ‘false’ and data is not recorded to disk.
Initially the slope and intercept are set to 1 and 0. In this situation the transducer values should be the same as the relative voltage values.
Your Front-Panel needs to have These Items available, at minimum.
How you ‘design’ the front-panel is up to you. You must consider function, aesthetics, and intuitiveness for your front-panel layout. The ‘Pressure-Gage Reading’ control dial provides immediate visual confirmation of user setting. It also has a coupled digital display for the exact number entered by the user. Adjusting either control is mirrored in the other display. Similarly, you need to consider the logical-layout in your Block-Diagram window.
The pressure transducer requires that both source and output voltage are monitored. Therefore, multiple voltage input channels are required (see Multiple Input Readings which used the SCXI-1122 module. You will use the 6229 device). Operations are required from these input values. The VI must be able to divide the output voltage from the transducer by the source voltage provided to the transducer (see Relative Voltage or multiple Channel I/O with 6229).
Once these items are tested the VI can be expanded to include Pressure Gage readings (which is a CONTROL) and Pressure Transducer display (which is an INDICATOR) (see Pressure Gage - Pressure Transducer VI). Finally, we can add a conditional loop surrounding the write to spreadsheet icon. This will control whether or not to record the data to file. (see True-False Condition Loop)
At this stage you should be able to complete test the operation of your VI. Without pressure in the tank, connect the source voltage (Red-Black) to a channel and the output voltage (Green-Black) to a different channel. Run your VI. The source should read about 8 volts. The output should read about 1 volt. The relative voltage (and transducer pressure with slope=1, intercept=0) should read about 1/8. You should be able to turn the 'record to disk' control for a period of time. Then shut it off (while the VI continues to run). Periodically, turn on the record button. Finally, stop the VI and examine your Excel sheet. Does the Elapsed time agree with your periodic on/off record status? Are the entries in the columns appropriate? Is the resolution sufficient? If so, perhaps you want to save the VI with all the settings preserved. That is, the channel selections, the slope and intercept values, etc. (see Save Panel Settings as Default). Have the TA/Instructor inspect the VI and begin the next part of the lab.
Only after inspection by the TA or instructor:
Experimental Pressure Calibration:
Using one tank per group, calibrate the attached pressure transducer. Be sure to record the excitation voltage during the calibration. (Your results can be a direct consequence of this source, or excitation voltage.) To calibrate: pressurize the tank to ‘full pressure’. Make sure all lab partners are wearing safety glasses! Full pressure might be somewhere from 85-100psig. It depends on the state of the compressor at the other end of the building! Do not exceed 100 psig on the pressure gage! Start your VI which should monitor the analog input readings continuously. However, the ‘record to disk’ flag is false initially. Allow the tank to stabilized, set the pressure-gage control dial on the front panel to the value displayed on the physical pressure gage. Activate the ‘record’ button so that the voltages and the pressure gage control readings are being recorded to disk. Deactivate the ‘record’ button (but leave the VI running) and proceed to the next pressure reading. Open the valve and vent some air such that the pressure gage changes about 10 psig +/- 5psig. Let the system stabilize. Adjust the pressure gage reading to that displayed on the physical gage. Activate the ‘record’ button again for 15-30s approximately. Deactivate the ‘record’ button. Repeat the process until the tank reaches about 10 psig. Stop your VI (do NOT abort). Verify that the data was stored on disk.
Make a duplicate copy of the datafile for insurance. Examine the datafile. The datafile should display reasonably constant voltages for each stage of discharge. Perform a linear regression with the values in column 5 (relative voltage) being the X-Axis (i.e. independent axis) and column 6 (Pressure Gage dial settings) as the Y-Axis. The desired output is the calibrated pressure. So be sure your axes are correctly specified. Within Excel, add a trendline and display the regression parameters on the Excel graph.
One set of discharge data is good, but it is not sufficient. You must perform 3 independent experiments to have statistical confidence. Note, one does not need to use the ‘same’ pressure gage settings for each experiment. What matters is that you have at least 5-7 readings per full range so that the regression line is created with a reasonable number of data points. For the second experiment BEGIN with approximately 10 psig, then increase the pressure to about 20 psig, etc. that is increase the pressure until the tank if fully pressurized. For the 3rd experiment start with the fully pressurized and then discharge it similar to the first experiment. By discharging, then recharging, and discharging one also has the opportunity to see if there is a hysteresis effect with the transducer (or gage!).
Use the slope and intercept calculated during the first run for your front panel VI ‘controls’ when you perform the second discharge. Does the ‘pressure transducer’ display match the pressure gage? When finished with the 2nd experiment perform a data regression and compare the slope, intercept, and correlation coefficient to those of the first regression analysis. Append the 2nd data to the first dataset and perform another regression. Use the calculated slope and intercept values from the joint dataset as the input settings on your front panel for the third experiment.
Combine all 3 tests into one regression. The data should be very consistent. Examine your correlation coefficient. It is a quantitative measure of the goodness of fit. Is the pressure transducer linear?
Calibration: There should be 4 linear regressions. One linear regression for each individual test and a final linear regression for all 3 data sets combined. Each regression should contain the slope, intercept, and correlation coefficient.
VI: The VI front panel and diagram window need to be included as figures within the document. The layout in each window must be clear and informative.
Your final combined regression parameters need to be included in your abstract.
If you need to repeat some of the laboratory procedures or measurements after normal laboratory time it requires safety glasses and a lab partner.
Use the software WinZip.exe to package your entire lab report and supporting data. This single file will be uploaded by the due date listed in the assignments link.