Home > News & Updates > Electronics News Updates > Display Arduino analog input using LabVIEW

Display Arduino analog input using LabVIEW

Summary of Display Arduino analog input using LabVIEW


This article details integrating an Arduino Nano with National Instruments LabVIEW to visualize analog sensor data. It explains how the Arduino reads signals from two channels (A0 and A1) using a non-blocking timing method similar to "BlinkWithoutDelay" to ensure accurate, fixed-rate sampling before transmitting data via serial communication to a PC for graphing in LabVIEW.

Parts used in the Bridge Monitoring System:

  • Arduino Nano
  • Laboratory Virtual Instrument Engineering Workbench (LabVIEW)
  • National Instruments DAQ devices
  • Analog input channel A0
  • Analog input channel A1
  • PC
  • Serial communication interface

In my previous article, I have made the Bridge Monitoring System using Wireless Sensor Network project, which allows me to display all the related measurements from Arduino on my PC. Therefore, in this article, I am going to explain in details on how to display the Arduino measurements using Laboratory Virtual Instrument Engineering Workbench (LabVIEW). Two analog inputs of Arduino will be measured and displayed on a graph in LabVIEW.

Display Arduino analog input using LabVIEW

A brief introduction to LabVIEW, according to Wiki, LabVIEW is a system design platform and development environment using graphical programming made by National Instruments. In other words, it can be used for various purposes such as creating graphical user interface (GUI), programming and simulation, hardware interface and data acquisition (DAQ).

Even though there are many platforms or tools available that can be used to create GUI for Arduino, my personal preference is using LabVIEW, mainly is due to the my previous experience with LabVIEW. The graphical programming is also an advantage as it eliminates the need to learn a new programming language. Creating user interface is also an easy task as LabVIEW was designed to enable engineers without heavy programming background to easily configure and display measurements from DAQ devices.

To get started, I will explain what is actually going on in Arduino. In this project, I am using an Arduino Nano to acquire signals and send the data to PC. As mentioned earlier, two analog input channels (A0 & A1) will be used to measure input signals. To ensure an accurate measurement is performed at fixed sample rate, the Arduino is configured to wait the predefined interval before taking a measurement and send to PC serially. The concept used is similar to the BlinkWithoutDelay example in Arduino. The benefit of using this method is that there is a while loop that always checks if it has crossed the desired interval. If it is reached, it will take the measurement, else it will skip and you can make it to work on other task.

Here is the code for Arduino, it is also available at my github.

Read more: Display Arduino analog input using LabVIEW

Quick Solutions to Questions related to Bridge Monitoring System:

  • What is LabVIEW?
    LabVIEW is a system design platform and development environment using graphical programming made by National Instruments.
  • Why did the author choose LabVIEW for this project?
    The author prefers LabVIEW due to previous experience and its graphical programming which eliminates the need to learn a new language.
  • Which Arduino board is used in this project?
    An Arduino Nano is used to acquire signals and send the data to the PC.
  • How many analog input channels are measured?
    Two analog input channels, specifically A0 and A1, are used to measure input signals.
  • How does the Arduino ensure accurate measurement at a fixed sample rate?
    The Arduino waits for a predefined interval before taking a measurement and sending it to the PC serially.
  • What concept is similar to the BlinkWithoutDelay example?
    The concept of a while loop that checks if a desired interval has been crossed is similar to the BlinkWithoutDelay example.
  • What happens if the desired interval has not been reached?
    If the interval has not been reached, the code skips the measurement and allows the program to work on other tasks.
  • Can LabVIEW be used for hardware interface and data acquisition?
    Yes, LabVIEW can be used for various purposes including creating GUIs, programming, simulation, hardware interface, and data acquisition.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top