Anda di halaman 1dari 38

See

discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/299602749

LabVIEW-Arduino Interfacing for Data Acquisition and Telemetry System

Presentation · January 2016


DOI: 10.13140/RG.2.1.3654.0568

CITATIONS READS

0 1,808

1 author:

Tommy Sugiarto
National Taiwan University of Science and Technology
4 PUBLICATIONS 0 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

LAPAN UAV Development View project

All content following this page was uploaded by Tommy Sugiarto on 04 April 2016.

The user has requested enhancement of the downloaded file.


LabVIEW-Arduino Interfacing for
Data Acquisition and Telemetry
System
P R E PA R E D BY:
TO M M Y S U G I A RTO
P U S AT T E K N O LO G I P E N E R BA N G A N
L E M BA G A P E N E R BA N G A N &
A N TA R I KS A N A S I O N A L
Outline
1st Day:
Data Acquisition and Telemetry System
LabVIEW-Arduino Interfacing:
Interfacing Arduino to LabVIEW with NI-VISA
Interfacing Arduino to LabVIEW with LIFA (LabVIEW Interface for Arduino)
2nd Day:
Build a UAV Telemetry Sytem with Arduino and LabVIEW
Creating Quality UIs with LabVIEW
Build an Installer and .exe Application for Your LabVIEW Project
Data Acquisition
Data acquisition (DAQ) is the process of measuring an electrical or physical phenomenon such
as voltage, current, temperature, pressure, or sound with a computer.
A DAQ system consists of sensors, DAQ measurement hardware, and a computer with
programmable software
(www.ni.com/data-acquisition/what-is/)
Telemetry System
Telemetry is an automated communications process by which measurements
are made and other data collected at remote or inaccessible points and
transmitted to receiving equipment for monitoring
("Telemetry: Summary of concept and rationale". NASA report. SAO/NASA ADS Physics Abstract
Service. Retrieved 19 December 2014)
LabVIEW-Arduino Interfacing
Use VISA (NI Serial Communication)

Use LIFA (LabVIEW Interface for Arduino)


NI-VISA
The Virtual Instrument Software Architecture (VISA) is a standard for configuring,
programming, and troubleshooting instrumentation systems comprising GPIB, VXI, PXI, Serial,
Ethernet, and/or USB interfaces.
VISA provides the programming interface between the hardware and development
environments such as LabVIEW, LabWindows/CVI, and Measurement Studio for Microsoft Visual
Studio.
NI-VISA (cont)
Some important block diagram from VISA’s Pallete
VISA Open
Opens a session to the device specified by VISA resource name and returns a session identifier
that can be used to call any other operations of that device.

VISA Read
Reads the specified number of bytes from the device or interface specified by VISA resource
name and returns the data in read buffer.
NI-VISA (cont)
VISA Write
Writes the data from write buffer to the device or interface specified by VISA resource name.

VISA Close
Closes a device session or event object specified by VISA resource name.
NI-VISA Example
Read serial data from arduino:
void setup() {

// initialize serial communication at 9600 bits per second:

Serial.begin(9600);

}
// the loop routine runs over and over again forever:

void loop() {

// read the input on analog pin 0:

int sensorValue = analogRead(A0);

// print out the value you read:

Serial.println(sensorValue);

delay(100); // delay in between reads for stability}


LIFA (LabVIEW Interface for Arduino)
The LabVIEW Interface for Arduino (LIFA) Toolkit allows developers to acquire data from the
Arduino microcontroller and process it in the LabVIEW
Install LIFA on your LabVIEW
Download LIFA Firmware to your Arduino (via Arduino IDE)
Build your code in Arduino with LIFA Block Diagram
LIFA (Cont)
Some important block diagram from LIFA’s pallete
Initialize a connection to an Arduino running the LIFA sketch

Close the active connection with Arduino


LIFA (Cont)
Analog Read: reads the analog voltage on the selected Arduino Analog Input Pin (A0-A5)

Digital Read: reads the digital value of the selected Arduino Digital Input Pin (D0-D13)
LIFA (Cont)
Digital Write Pin: Write the specified value on the selected digital output pin (D0-D13)

Set Digital Pin Mode: Configure the specified digital I/O pin as either input or output
LIFA Example
Simple Analog Read sketch:
Exercise
1. Make a Voltage Measurement with VISA and display it on LabVIEW User
Interface

2. Make 3 channel Voltage Measurement with LIFA and display it on LabVIEW


User Interface

3. Make a blink LED control with LIFA


Build a UAV Telemetry System with
Arduino and LabVIEW
To make a good Telemetry System for UAV with Arduino and LabVIEW, we need some important
things:
Arduino Programming (with Arduino IDE)
LabVIEW programming
Data Encoding and Parsing
Sensor calibrating and data processing
Radio Communication (RF)
Arduino Programming
Setting the Arduino baudrate, make sure that the baudrate on the Arduino and the Radio
Modem are the same
Setting the SDcard for datalogger
Make a sketch for ADC reading and convert it into Voltage Reading
Make the encode for each sensor data
Write data to SDcard
Display it on serial communication
Arduino Programming (Cont)
LabVIEW Programming
Open a VISA Serial session
Initialize excel file saving
Read Serial data from Arduino
Parse the Serial data
Convert the Data from string to decimal data
Input the calibration factor (if any) and process the data by averaging it
Write the data to .xls file and display it on LabVIEW User Interface
Close VISA Serial session
LabVIEW Programming (Cont)
LabVIEW Programming (Cont)
Data Encoding and Parsing
Data Encoding and Parsing (Cont)
Serial Data Format:
AABBCCDD

Sensor 1 Volt. Data Encoding code1 Sensor 2 Volt. Data Encoding code2
Convert String Data to Decimal
Convert Fract or Exp or Decimal String into Number
Calibrating and Averaging the Data
Insert the calibration factor into the Formula Node blokc diagram for calibrate the sensor data

Input the data to Time Averaging block diagram for getting smoother data output
Write Data to Ms.Excel
Creating Quality UI with LabVIEW
Some General Rules:
1. Dont be innovative
Use familiar elements

2. Less is more
Too much on screen at once is distcracting
Allow your user to focus on what is important

3. Think about your user


Explains what button do
Know how the user plans on using your application
Build an Installer and .exe Application
for Your LabVIEW Project
Click Tools  Build Application (EXE) from VI
On the Project dialog box, right click on Build Specification
 New  Application / Installer
Build Application (.EXE) from VI
Insert your VI to app
builder and then costumize
your app setting by adding
some icon or app version
information
Build Installer for Your .EXE Application
After build application (.exe) from
your VI, now build your .exe
installer so user with no LabVIEW
installed on their computer can
use your program
On the Build Installer dialog box
insert your .exe app to source file
Build Installer for Your .EXE Application
On Additional Installer
option, checklist the box
Automatically select
recommended installer
For Your Advance Reference
http://www.ieee.li/pdf/viewgraphs/creating_quality_uis_with_labview.pdf
https://www.ni.com/visa/
www.ni.com/pdf/manuals/370423a.pdf
https://drive.google.com/file/d/0B1npovSveBOSQ0lUUFYxUUVCdms/view?usp=sharing
https://drive.google.com/file/d/0B1npovSveBOST1YwcWJMV0p1YjQ/view?usp=sharing
Thank You
View publication stats