Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
20 views

LabVIEW in Automation - DAQ in LabVIEW

The document discusses using LabVIEW and DAQ hardware to measure temperature sensors. It provides an overview of DAQ systems and describes using a National Instruments USB-6008 device to read analog sensors like a TMP36 temperature sensor and 10K thermistor. The document outlines setting up the hardware, developing LabVIEW code to read the sensors, applying a low-pass filter to reduce noise, logging data to a text file, and displaying measurements on a GUI with indicators and alarms. The goal is to collect temperature data from multiple sensors, analyze and plot the readings, and store the results in a file for further examination in Excel.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

LabVIEW in Automation - DAQ in LabVIEW

The document discusses using LabVIEW and DAQ hardware to measure temperature sensors. It provides an overview of DAQ systems and describes using a National Instruments USB-6008 device to read analog sensors like a TMP36 temperature sensor and 10K thermistor. The document outlines setting up the hardware, developing LabVIEW code to read the sensors, applying a low-pass filter to reduce noise, logging data to a text file, and displaying measurements on a GUI with indicators and alarms. The goal is to collect temperature data from multiple sensors, analyze and plot the readings, and store the results in a file for further examination in Excel.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

https://www.halvorsen.

blog

LabVIEW in Automation
DAQ in LabVIEW

Hans-Petter Halvorsen
Contents
• Introduction to DAQ
– What is DAQ?
• Hardware Overview
– USB-6008, Sensors, Electronic components
• Software Overview
– LabVIEW + DAQmx Driver
• Temperature Sensors
– TMP36 Temperature Sensor
– Thermistor Temperature Sensor
• LEDs
• Lowpass Filter
• Log Data to File
• Delivery
DAQ System
DAQ – Data Acquisition
Input/Output Signals
Analog Signals
Software
Analog IO
Digital Signals Application

USB, etc. Hardware Driver

Sensors Digital IO
(Analog/Digital
Interface) Data Acquisition PC
Hardware
We will use an USB-6008 as the DAQ Hardware
I/O Module
Analog Signals

0 − 5𝑉 Analog Input (AI)


Analog Sensors
Analog IO Analog Output (AO)

I/O Module

Digital IO Digital Signals


True
Digital Input (DI)
False
Digital Output (DO)
Sensors with Digital Interface (e.g., SPI, I2C)
Hardware
• DAQ Device (e.g., USB-6008)
• Breadboard
• Wires (Jumper Wires)
• TMP36 Temperature Sensor
• Thermistor 10K (Temperature Sensor)
• Resistors, 𝑅 = 270Ω, 𝑅 = 10𝑘Ω
• LEDs (Colors: Red, Green)
Hardware
USB-6008
• USB-6008 is a DAQ Device from NI
• Can be used within LabVIEW
• NI-DAQmx Driver
• It has Analog and Digital
Inputs and Outputs
USB-6008
4 different types of Signals:
• AO – Analog Output
• AI – Analog Input
• DO – Digital Output
• DI – Digital Input
Temperature Sensors
• TMP36 Temperature Sensor
• Thermistor 10K Temperature Sensor
TMP36

TMP is a small, low-cost temperature sensor and cost about $1 (you can buy it “everywhere”)
TMP37 LabVIEW Example
TMP
36 Hardware Setup TMP36
5V GND
AI+

We connect the TMP36 to LabVIEW using a USB DAQ Device from National
Instruments, e.g., USB-6001, USB-6008 or similar. I have used a breadboard for
the wiring.
Thermistor
A thermistor is an electronic component that changes
resistance to temperature - so-called Resistance
Temperature Detectors (RTD). It is often used as a
temperature sensor.
Our Thermistor is a so-called NTC (Negative Temperature Coefficient).
In a NTC Thermistor, resistance decreases as the temperature rises.
There is a non-linear relationship between resistance and excitement. To find the
temperature we can use the following equation (Steinhart-Hart equation):
1 % where 𝐴, 𝐵, 𝐶 are constants given below
[Wikipedia]
= 𝐴 + 𝐵 ln(𝑅) + 𝐶 ln(𝑅)
𝑇 𝐴 = 0.001129148, 𝐵 = 0.000234125 𝑎𝑛𝑑 𝐶 = 8.76741𝐸 − 08
Hardware Setup Thermistor
Thermistor LabVIEW Example
Light-emitting diode - LED
A light-emitting diode (LED) is a semiconductor light
source that emits light when current flows through it
Hardware Setup LED

DO-0
𝑅 = 270Ω

GND
LED LabVIEW Example
Lowpass Filter
Purpose:
Remove Noise
from the
Measured Signal

White: Measured Signal with lots of Noise


Red: The results after applying a Lowpass Filter
Logging Data to a Text File
Logging Data to a Text File
Delivery
Use a USB-6008 I/O Module to collect data and do some basic analysis of the data using both the 2 different temperature
sensors (both "TMP36" and 10K Thermistor)
Requirements:
• You should create a proper GUI. You should see the current temperature value(s) from the sensor(s) on the Front
Panel. The values should be presented in both degrees Celsius and degrees Fahrenheit.
• Make sure to use proper numbers of decimals in your GUI, etc. Showing e.g. temperature values with 4 decimals
makes no sense.
• You should Plot the values from the Sensor(s).
• You should also find the average values for each sensor and the average value for the temperature in total (if you use
more than one sensor).
• Alarms: Turn on a Boolean indicator when the temperature reach a specific limit. If you have a LED: Turn also on a red
LED when the temperature reach the specific limit. If the temperature is below the limit, a green LED should be on.
• You should see if using a Lowpass Filter will improve your readings from the sensor(s). Use one of the built-in filters in
LabVIEW or make your own Lowpass Filter.
• The Data should also be stored in a Text File, which should later be analyzed in Excel (make a plot, do some basic
statistics like mean standard deviation, etc.).
• The code should be well structured and intuitive.
• It should contain basic LabVIEW features like While Loop, Case Structure, SubVIs, Arrays, Property Nodes and Clusters,
etc.
• You should use the Project Explorer.
Hans-Petter Halvorsen
University of South-Eastern Norway
www.usn.no

E-mail: hans.p.halvorsen@usn.no
Web: https://www.halvorsen.blog

You might also like