Virtual Instrumentation Design Task of a pressure meter and a spectrum analyser - Essay Example

1. Introduction

We Will Write A Custom Essay Sample On

For Only $13.90/page

order now

The task was to design and build a three op-amp instrumentation amplifier that interfaces between the TSP 410A pressure transducer and a PC computer fitted with an Amplicon PC30 AT data acquisition unit and running National Instruments Labview. A variable parameter is measured using the pressure transducer and the Labview software is used to measure and convert the output from the transducer and display the result in user friendly manner on the monitor.

The instrumentation amplifier must be such that it gives a maximum output of 5V for a pressure range of 0 to 0.49 Bar.

The instrumentation amplifier itself consists of two stages, namely:

* Input Buffer Stage (741 op-amps)

* Differential Amplifier (Texas Instruments INA 106)

The INA 106A differential amplifier consists of precision op-amp and resistors which are laser trimmed for accurate gain and common mode rejection. Its gain is fixed at G=10 and this was confirmed during the laboratory exercise.

2. Method

The laboratory work was carried out as described in the handout “Virtual Instrumentation Design Task of a Pressure Meter and a Spectrum Analyser “, and the supplementary worksheet.


3.1.1 Transducer Characteristics

The transducer was a four resistor bridge configuration with a DC supply. As can be seen from Figure 1, the transducer has a linear characteristic of the form .

Figure 1 – Transducer Characteristic

Where m= Gradient and C= the Intercept.

Thus C=2.968


and hence,

This formula will be required in the Labview virtual instrument to interpret the transducer input.

3.1.2 Effects of IN106A on the Transducer

The INA106 is forms the foundation for many commonly used circuits and provides a precision circuit function without the need for any expensive resistor network.

With the transducer connected directly to the differential amplifier stage the input voltage from the transducer was measured and recorded. This measurement was repeated a second time with the differential stage disconnected. The results are presented in Table 1.

Table 1 – Transducer Output Voltage

Amplifier Connected

Amplifier Disconnected

Transducer Output Voltage



It can clearly be seen from the results that the differential amplifier alone causes loading of the transducer.

3.1.3 Reasons for Effects

The pressure transducer is a wheatstone bridge configuration. The results given in Table 1 show that connecting the transducer directly to the differential amplifier results in the amplifier loading the transducer. Consequently, this loading effect will result in errors.

This loading effect occurs due to the low input impedance of the differential amplifier. By using a Buffer stage before the differential amplifier, this effect can be overcome. This is because the Buffer stage will offer high input impedance since it is a non-inverting amplifier at each input.

3.2 IN106A Amplifier

3.2.1 Gain Measurement

Data sheets for the INA 106 differential amplifier state that it has a fixed gain of 10. The differential amplifiers gain is set by the on-chip resistors , where , and so the gain is .

In order to prove that the gain of the INA 106A amplifier was actually 10, zero volts was applied to terminals A and B (Fig 1), and the offset was adjusted to give zero output.

Figure 2 – INA 106A Differential Amplifier

A differential input signal was then applied to the amplifier and the gain was measured, the results of which are given in Table 1.

Table 2 – Proof Of INA 106 Gain

Pressure Input

Differential Input Voltage

Output Voltage Vo

Gain =





3.2.2 CMRR

From the INA106A differential amplifier data sheet the CMRR is given as 86dB(min) .

To obtain the Common Mode Gain the inputs of the differential stage were initially shorted together and connected to ground. The output voltage was then checked to ensure it was zero. These connections were then removed and a voltage was applied to both inputs simultaneously. With this common 5 volt signal connected, the output voltage was measured at 0.29mV.


CMRR values above 80dB are considered to be good.

3.3 Overall Instrument Amplifier

3.3.1 Design of the Buffer Amplifier Values

Figure 3 – System Diagram

The overall differential gain of the instrumentation amplifier needs to be


3.3.2 Setting up the Buffer Amplifier

The Buffer stage of the amplifier was then built using the component values calculated above for resistors . Before connecting the Buffer stage to the Differential stage of the amplifier, the operational amplifiers used in the Buffer stage were adjusted to set any output offset to zero. This was done by setting one end of to both and applying 0 volts at the non-inverting inputs. The offset trim was then adjusted to give zero output. This procedure was repeated for both amplifiers.

3.3.3 Gain and CMMR measurements

From the previous sections the following measurements for both the Buffer stage and the Differential stage were obtained :

Buffer Stage

Common Mode Gain

Differential Stage

Overall Instrument Amplifier

Hence, the overall theoretical CMRR of the instrument amplifier is given by:

Overall CMRR = CMRR of Buffer Stage +CMRR of Differential Stage

= 9.43 + 104.73

= 114.16dB

The overall theoretical amplifier gain is given by:

Overall differential gain = Buffer stage gain * Differential stage gain

= 2.96 * 10

= 29.6

To check the overall gain of the instrument amplifier an arbitrary signal was applied from the transducer of 159.3mV to the amplifier inputs and the output voltage was measured.


To check the actual overall CMRR of the instrument amplifier further measurements were taken.


3.4 Conclusions

In theory the common mode gain of the differential stage should be zero. In practice however it is impossible to achieve this as resistor mismatch causes the amplifier to have a small amount of common mode gain. The CMRR of the differential stage should, in theory be infinite if it were possible to have zero common mode gain. As we have seen in practice this is not achievable and hence we see a much lower value for the CMRR.

For the Buffer stage, the theoretical common mode gain is unity.

The required gain for the Buffer stage was 2.96. Since the values of the resistors used in the Buffer stage would have been standard values and with a probable tolerance of +/- 2% then errors would have been introduced. These errors could have been reduced if precision resistors had been used.

The above factors would have contributed to the actual overall CMRR of the instrument amplifier being significantly lower than the predicted theoretical value. Having said that, a figure of 83dB is still a very good CMRR.

The actual overall gain of the system was very close to the theoretical value calculated, and can therefore be considered to meet the original design criteria.

The system was calibrated against a pressure gauge whose accuracy was unknown and hence there could have been errors in the readings used to undertake the design. Since this was the standard against which the design was going to be calibrated, any errors would have to be tolerated. Other errors attributed to the accuracy of measurements are the voltmeter used to make any measurements, the tolerances of bridge resistors and the fact the standard resistor values will have been used through out the design rather than calculated values.


The Lab equipment was assembled as in the Lab Handout and the Labview package was configured as below following the Top down design method for our Groups PRESSURE VI indicator.

4.1 Top Down Design Structure

1. Acquire Voltage input.

1.1 Acquire Voltage Input through AI Acquire Waveform.

1.2 Take mean value of input voltage.

2 Calculate Pressure from Voltage input.

2.1 Using y=mx+c relationship compute Voltage to Pressure.

2.2 Add Offset to calculated pressure.

3 Output Pressure to front panel.

3.1 Output Pressure to front panel via Dial and Digital indicator.

4.2 Front Panel and VI Diagram Design

This VI’s design began by placing the necessary user interface tools on the front panel. These included an analogue pressure dial with digital indication and a Knob for offset adjustment. The pressure dial was to simply display the final computed pressure value. The offset knob was for the fine trimming of zero errors that may come from the equipment, which is common function found in most transducers.

This layout can be seen in the figure Fig 4.2a

Fig 4.2a Front Panel for the Pressure Indicator VI.

Fig 4.2b Pressure Indicator Diagram

The wiring diagram for this VI was fairly straightforward. The voltage measurement was brought in through the AI Acquire Waveform which by configuration outputs the value of the voltage from the selected channel on the DAQ board. The signal from the

AI Acquire Waveform was fed directly into the which outputs the mean voltage value for the voltage signal input, it could be said to act as a very simple noise filer. This is then connected in to the formula node which computes the pressure value according to the formula within it, which is explained in detail later. The computed value is then output from the formula node out to the front panel indicator. The final element included was the wait for tick count which was introduced to stabilise the final indication as due to the speed of the computer the pressure indicator was found to be some what unstable. A constant setting of 500 which was the equivalent of 0.5 Seconds was found to be sufficient.

4.3 Definitions of the Elements from Labview 6.1 help

AI Acquire Waveform

Acquires a specified number of samples at a specified sample rate from a single input channel and returns the acquired data. The AI Acquire Waveform VI performs a timed measurement of a waveform (multiple voltage readings at a specified sampling rate) on a single analogue input channel. If an error occurs, a dialog box appears, giving you the option to stop the VI or continue.

device is the device number you assigned to the DAQ device during configuration.

Channel identifies the analogue input channel you want to measure. The default input is channel 0.

Number of samples is the number of single-channel samples the VI acquires before the acquisition completes. The default for this parameter is 1000 samples.

Sample rate is the requested number of samples per second the VI acquires from the specified channel. The default for this parameter is a rate of 1000 samples/s.

High limit is the highest expected level of the signals you want to measure. The default input is 0. If you enter 0, the system uses the limits entered in MAX, or if you are using channel names, select the best limits for your channel configuration. You express the limit value in the units of your readings. Use this value to compute the gain.

Low limit is the lowest expected level of the signals you want to measure. The default input is 0. If you enter 0, the system uses the limits entered in MAX, or if you are using channel names, select the best limits for your channel configuration. You express the limit value in the units of your readings. Use this value to compute the gain.

Waveform contains scaled analogue input data.


Computes the mean (average) (�) of the values in the input sequence X.

This VI uses the following formula:

Where n is the number of elements in X.

Formula Node

Evaluates mathematical formulae and expressions similar to C on the block diagram.

Wait for tick count

Functions > Time & Dialog > Wait Until Next ms Multiple

Stalls the program until the internal clock reaches the multiple of a specified time interval (in ms). Useful for timing loops.

4.4 Translation of Voltage to Pressure

Formula Node Expression

To convert the measured voltage to a pressure value the assumption that the voltage signal was linearly proportional to the pressure applied hence relating it to the mathematical expression y=mx+c.

y= Measured Voltage

x= Pressure

m= (Constant)

c=The Pressure at which the line intercepts the y axis (Constant).

So from previous results in this experiment the following was recorded for applied pressures.

Fig 4.4a Pressure against Instrument Amplifiers voltage output.



? From y=mx+c; Voltage=m x Pressure + c


Giving the formula node expression Pout= ((Vin-3)/4.33).

Added to this expression was offset this was to allow for zero error adjustment which in real world transducer’s is common requirement.

4.4 Accuracy

To check the accuracy of the VI the VI was run and pressure applied to the apparatus, then the Pressure measured on the Druck was recorded against the Labview indicated pressure. The results of this can be seen below.

4.5 Discussion

From the above results and plots it can be said that from the VI instrument is linear but the accuracy over the range varies. It should be noted the calculation of %Error is using the point at which the measurement is being taken to give a %Error and not using the constant of full range to calculate %Error. These are obviously to very different calculations, the first which we have used in normally used in industry; This is used as transducers have sensor ranges which are then calibrated to work over a specified range for the user, so when accuracy is quoted maximum %Error for the working range is known to comply. How ever the other is not normally used.

By just comparing the difference between the Druck reference and the VI’s indication value’s I would say that the VI has a Zero and Span error, which is a function of our m and c values from the y=mx+c formula. The reason for this difference could be due to the resolution of the values used or the DAQ conversion. This is more visible in the Accuracy plot, if there were no zero or span error then there would be a constant % Error giving a horizontal straight line across the graph.

From the results there is no obvious indication of Hysterisys but to obtain a true indication of this the Pressure should have been ramped down as well as up.

4.6 Conclusions

The Lab went smoothly with no real problems up until the point of the accuracy test, the results show the Virtual Instrument designed works. Whilst carrying out the accuracy test the VI indication was not stable, this was pointed out to the tutor who suggested the introduction of the timer. Although improving stability of the reading this did not eliminate the problem.

The Pressure Druck is a standard piece of test equipment known to have a high accuracy, and as there was no definition of required accuracy from the VI in the scope then my assessment of the overall accuracy would be that it was relatively poor and requires improvement. For this further investigation would be required to where the error or errors are being introduced to improve or eliminate them. What I consider to be an acceptable accuracy for general use would be +/- 1%; however certain real life application can require much High or Lower accuracies.

4.7 References:

Deloughry, R. 2000. Virtual Instrumentation using Labview. Manchester Metropolitan University. Dept. of Engineering & technology.

Deloughry, R. 2000. Electrical Engineering Analysis II course notes. Manchester Metropolitan University. Dept. of Engineering & technology.

[IEEE 90] Institute of Electrical and Electronics Engineers. IEEE Standard Computer Dictionary: A Compilation of IEEE Standard Computer Glossaries. New York, NY: 1990.


In this task, a physical system comprising of an actuator driven by an amplified digital source was connected to a bar, upon which a Wheatstone bridge strain gauge arrangement was mounted. When the actuator was driven by the digital source, a vibration was set up in the bar, which the strain gauge arrangement measures.

The raw output of the strain gauge was fed into a two stage instrumentation amplifier, which has been analysed previously.

This filtered vibration data was fed into a National Instruments data acquisition board, for use by the LABVIEW package. The task being to construct a VI to measure this data and plot the frequency spectrum of this data, to ascertain the frequency components of the input signal.

5.1 Elements of FFT and Spectrum Analyser

The VI was constructed from various function blocks from the library. These are explained below. See also fig.2 for the circuit diagram for the VI design.

Acquire Waveforms:

“[This function block] acquires data from the specified channels and samples the channels at the specified scan rate. The AI acquire waveforms VI performs a timed measurement of multiple waveforms on the specified analogue input channels.”

LABVIEW 6.1 online help.

Index Array:

“Returns the element or sub-array of n-dimension array at index. When you wire an array to this function, the function resizes automatically to display index inputs for each dimension in the array you wire.”

LABVIEW 6.1 online help.

Real FFT:

“…computes the real Fast Fourier Transform (FFT) or the real Discrete Fourier Transform of the input sequence. The input sequence is real valued. The real FFT VI executes FFT routines if the size of the input sequence is a valid power of 2.”

LABVIEW 6.1 online help.

Absolute value:

“This block returns the absolute value of the input.”

LABVIEW 6.1 online help.

Case structure:

“Has one or more subdiagrams, or cases, exactly one of which executes when the structure executes. The control element wired to the selector terminal determines which case to execute, and can be Boolean, string, integer, or enumerated type.”

LABVIEW 6.1 online help.

Write to spreadsheet file:

“Converts a 2D or 1D array of single-precision numbers to a text string and writes the string to a new byte stream file or appends the string to an existing file. You can also transpose the data. The VI opens or creates the file before writing to it and closes it afterwards. You can use this VI to create a text file readable by most spreadsheet applications.”

LABVIEW 6.1 online help.


The divide block is self explanatory.

From these blocks a working VI is created.

The ‘acquire waveforms’ VI grabs the vibration input data from the data acquisition board. The ‘index array’ blocks select the correct waveform data from the input signal, i.e. ‘channel 0’. One ‘index array’ output is wired to a ‘waveform graph’ output on the front panel. The other ‘index array’ is wired to the ‘FFT’ block, for Fourier analysis to be carried out on the output.

To scale the ‘FFT’ output, a wire is taken from the ‘number of samples’ control element on the ‘acquire waveforms’ block, this is fed into a ‘divide’ block, for division by a constant i.e. ‘2’. The output of the ‘FFT’ block is divided by this result, and in turn fed into an ‘absolute value’ block to give a scaled FFT output. This is then wired to a ‘waveform graph’ for output on the front panel.


Output X(K) =

Where N = number of samples.

To perform the data capture facility, a ‘case statement’ is added, controlled by a ‘Boolean switch’ on the front panel. Inside the ‘true’ case, a ‘write to spreadsheet file’ block is placed. It should be noted that the ‘false’ case is left empty.

Therefore, the ‘write to spreadsheet file’ block is only executed when the ‘true’ case is enabled, that is, when the button on the front panel is pressed. The front panel can be seen in fig.1. The ‘write to spreadsheet file’ block will prompt for a filename and path when the button is pressed, if a filename and path are added as a constant string to the block then Labview will automatically save the data to the selected file. The ‘true Boolean constant’ wired to the block enables the ‘transpose’ option to transpose the data from being saved in 1 row to being saved in 1 column, this being easier for manipulation in Excel for graph plotting. This graph of results can be seen in fig.3.

The ‘FFT’ block analyses the input data to give a spectrum showing the main frequency components in a waveform, but why use the FFT, why not use the DFT?

“The discrete Fourier Transform (DFT) is used to produce frequency analysis of discrete non-periodic signals. The FFT is another method of producing the same result, but with less overhead involved in the calculations.

If you look at the equation for the DFT you will see that it is quite complicated to work out as it involves many additions and multiplications involving complex numbers. Even a simple eight sample signal would require 49 complex multiplications and 56 complex additions to work out the DFT. At this level it is still manageable, however a realistic signal could have 1024 samples which requires over 20,000,000 complex multiplications and additions. As you can see the number of calculations required soon mounts up to unmanageable prpportions.

The FFT is simply a method of laying out the computation, which is much faster for large values of N, where N is the number of samples in the sequence. It is an ingenious way of achieving rather than the DFT’s clumsy P^2 timing.

The idea behind the FFT is the divide and conquer approach, to break up the original N point sample into two (N/2) sequences. This is because a series of smaller problems is easier to solve than one large one. The DFT requires (N-1)^2 complex multiplications and N(N-1) complex additions as opposed to the FFT’s approach of breaking it down into a series of 2 point samples which only require 1 multiplication and 2 additions and the recombination of the points which is minimal.”

5.2 Results:

The true frequency components of this waveform are those situated at frequencies of 56 and 131, designated and respectively.

The other two frequency components, those at frequencies of 171 and 246, designated and respectively. These are known as sidebands, produced as a result of the sampling process.

It should be noted at this point that the sampling frequency at the time of these results was 300.


Sideband at frequency 171: equals: 300 – 131 = 171

Sideband at frequency 246: equals: 300 – 56 = 244

It should also be noted that the amplitudes of the sidebands correspond with the amplitudes of the true frequency components.

Another phenomena which should be noted is that of the amplitude of the ‘dc’ term, in the results table, frequency 2 and amplitude 0.004. This component changed amplitude depending on the sampling frequency set on the front panel. That is, for a low sampling frequency, as that above of 300, the amplitude was low, 0.04. But if the sampling frequency was increased, this amplitude increased. This is explained below;

If the equation for the DFT analysis is considered;


X(K) = DFT value.

X(n) = discrete samples in the range 0 to N-1.

N = number of discrete samples per period.

= convenient notation for the expression:


K = 0 to (N-1)

.n = 0 to (N-1)

Electronic Engineering Analysis II course notes

If the dc term alone is considered:

By observation, it can be seen that a sum of 300 values will be less than a sum of 1000 values, for example. This explains the phenomena of the dc term amplitude changing with sampling frequency. This is also to be taken into account when setting the sampling frequency for a system, too high and the processor will be swamped with data, and too slow and aliasing and errors such as this shown here become apparent. Hence the need to comply with the Nyquist sampling criterion.

5.3 Conclusions:

It can be seen from the results above that according to the brief given, the experiment was successful, in that, a VI was designed/constructed to capture, display, and file data from a vibration rig for analysis. Further work is required on the front panel aesthetically to make it easier to use. Also, it should be noted that the use of two ‘index array’ blocks is unnecessary and wasteful of memory and one block could be used to feed both ‘waveform graphs’.

Further work could be done to expand the features available on the system. A possible use of this system is to monitor machinery for vibration. Therefore a good feature would be the addition of an alarm function using a ‘waveform max/min’ block to determine if any vibrations are getting excessive and the machine can be shutdown and repaired before any damage is incurred. Also, a further refinement could be to employ a low pass filter to remove the sidebands, the cutoff point being N/2, this could be done in Labview quite easily.


Deloughry, R. 2000. Virtual Instrumentation using Labview. Manchester Metropolitan University. Dept. of Engineering & technology.

Deloughry, R. 2000. Electrical Engineering Analysis II course notes. Manchester Metropolitan University. Dept. of Engineering & technology.

Fig.1 Labview 6.1 Spectral analyser front panel :

Fig.2 Labview 6.1 Spectral analyser circuit diagram:

Fig.3 Excel plot of data exported from Labview 6.1: