Download Thermistor Temperature Logger (DAQ)

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Integrating ADC wikipedia , lookup

Test probe wikipedia , lookup

Power electronics wikipedia , lookup

CMOS wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Negative resistance wikipedia , lookup

Transistor–transistor logic wikipedia , lookup

Superconductivity wikipedia , lookup

Valve RF amplifier wikipedia , lookup

Schmitt trigger wikipedia , lookup

Surge protector wikipedia , lookup

Electrical ballast wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Thermal runaway wikipedia , lookup

Power MOSFET wikipedia , lookup

Operational amplifier wikipedia , lookup

Current source wikipedia , lookup

Multimeter wikipedia , lookup

Rectiverter wikipedia , lookup

Opto-isolator wikipedia , lookup

Current mirror wikipedia , lookup

Lumped element model wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Ohm's law wikipedia , lookup

Transcript
EECE 327
Project 4
LabVIEW Thermistor Program
A Basic Temperature Logging Program using LabVIEW
Jeffrey Bach
UNM PURSUE Program
LabVIEW is an icon-based software allowing control of processes and instrumentation,
and creation of virtual instruments (VI’s) on the PC. The LabVIEW programming
language is generally easier to write and understand than traditional text-based
programming languages.
This project uses the capabilities of LabVIEW to determine the temperature of a
thermistor. Thermistors are special blends of metal-oxides that have a well-defined
resistance characteristic over a specified range of temperature. The resistance of a
thermistor at a given temperature can be approximated by the Steinhart-Hart equation:
1
 a 0  a1 ln( R )  a 2 [ln( R )] 3
T
Where T is the temperature in Kelvins, R is the resistance of the thermistor in Ohms, and
a 0 through a 2 are data fitting constants. Some manufacturers may explicitly state the
values of the constants, while others provide a table of resistances and temperatures. In
this latter case, the values for the constants must be determined. The simplest way is to
pick three values from the table, spaced over the range of temperatures expected to be
encountered, and solve the resulting 3x3 system of variables.
A thermistor functions as a variable resistor. There are two types of thermistors, negative
coefficient and positive coefficient. Negative coefficient thermistors (NTC) have a
decreasing resistance with increasing temperature. Positive coefficient thermistors (PTC)
have an increasing resistance with increasing temperature. Negative coefficient
thermistors are required for the Steinhart-Hart equation to be valid and are generally
easier to find. Radio Shack part number 271-110A is a suitable thermistor for
temperature measurements from –50C to +110C, with a nominal resistance of 10k
Ohms at room temperature.
Data Acquisition (DAQ) is the term used to describe the process of gathering data using
digital means. Computers equipped with DAQ cards may have combinations of analog
inputs, analog outputs, digital inputs, digital outputs, and counters. The particular boards
that we have in the electronics lab contain eight differential analog inputs (or 16 singleended inputs), two analog outputs, eight digital I/O lines, and two counters. The
difference between a differential input and a single-ended input is that the single-ended
inputs are all referenced to the same ground as the computer and DAQ card. The
differential inputs are preferred, and are the only setup available in the lab on the
breadboards that are connected to the computers.
Page 1 of 4
EECE 327
Project 4
LabVIEW Thermistor Program
The desired measurement is the resistance of the thermistor. However, resistance is not a
directly measurable quantity; it must be inferred using Ohm’s law. The proper way to
measure the resistance involves sourcing a current and measuring the voltage, or soucring
a voltage and measuring the current. The DAQ boards in the lab are voltage-only devices
– that is, they only measure or supply voltages, but not currents. The preferred way to
measure resistance is to set the current and measure the voltage. Since this cannot be
accomplished directly using the DAQ board, a circuit must be created that will generate a
constant current.
Another way to measure the resistance of the thermistor is to use a reference resistor.
Use a high-precision (1% accuracy or greater) resistor to infer the current flowing
through the circuit. By applying a known voltage through the circuit, the resistance of
the thermistor can be inferred. The circuit diagram would be as follows:
From Ohm’s Law, the resistance of the thermistor is equal to the thermistor voltage
divided by the current flowing through the circuit. This is equal to:
R Therm





 R ref Vout
Vout


  Vin  Vout   Vin  Vout

 R
ref


Choose the applied voltage Vin  and reference resistor such that the circuit is biased with
a minimum of current. An undesired effect is heating of the thermistor, which would
give temperature readings lower than expected. The circuit should be biased under one
milliamp, but reduced thermistor heating and thus better temperature accuracy is obtained
in the tens of microamps range. The drawback to using lower current is higher noise in
the voltage measurement. A suggested bias arrangement uses a 10k to 50k Ohm 1%
reference resistor and a Vin of 5 volts.
Page 2 of 4
EECE 327
Project 4
LabVIEW Thermistor Program
LabVIEW is used in this project to set voltages and obtain readings from the DAQ card.
The input voltage to the circuit can be obtained in a variety of ways. The easiest way is
to use the fixed +5V output available on the jumper bus to the left of the breadboard area.
If you choose to use a different output voltage, or desire to have a variable output voltage,
the channel 0 or channel 1 analog output should be used (upper mid-left corner of the
SC-2075 board). The voltage inputs to the DAQ card are found either on the jumper bus
(channels 3-7) or in the upper right corner of the SC-2075 board (channels 0-2).
Remember that these inputs and outputs are differential, meaning that their references
should be connected to the lowest potential in the circuit (i.e. whatever is defined to be
ground).
The vi must have the following features:
 A thermometer display showing the current temperature graphically
 A digital indicator on the thermometer showing the current temperature
numerically
 A chart or graph logging the temperature over time (from start to finish)
 A sample rate that can be adjusted before starting the program, but fixed during
operation.
 The ability to save the temperature data in a file. The time of each temperature
reading must be recorded also.
Please note that even though there are pre-built functions for manipulating thermistor
readings available, you must create the thermistor voltage to resistance and thermistor
resistance to temperature components from scratch. The equations given above are easy
to implement using formula nodes.
The sample rate must be variable so that fast temperature changes can be measured (for
example, a chemical reaction) or slow temperature changes can be measured (for
example, a week’s worth of hourly temperatures). In LabVIEW, this is easily
accomplished using the Wait Until Next ms Multiple element:
The following example shows a loop which will execute once every hour (3600000 ms):
Page 3 of 4
EECE 327
Project 4
LabVIEW Thermistor Program
This program takes a number and doubles it every hour. Notice that the Wait Until Next
ms Multiple element is only wired to a time in milliseconds value. A similar construction
will be used for the temperature logger. Since the sample rate should not be changed
during the program, it is acceptable to use a constant for the number of milliseconds
between loop executions.
A VI has been written that demonstrates the thermistor logger. You must have similar
features on the front panel. Some features are not visible, such as the sample rate.
Page 4 of 4