MAKE-ing with LabVIEW & Raspberry Pi: Part 1 – Introduction
This is the first part in a series about using the Raspberry Pi with LabVIEW and the LINX Toolkit. It follows the announcement of the release of the free LabVIEW Community Edition from National Instruments.
I recently posted about the big news from National Instruments that they would be releasing a free LabVIEW Community Edition in 2020 with a beta/preview version available later this year.
Of course, as an NI Alliance partner I use LabVIEW professionally on a daily basis so LabVIEW being free for non-commercial use doesn’t really affect me but the updates to the LINX Toolkit are very interesting – namely that it can now be used in commercial applications. Of course, making LabVIEW free will help to grow its adoption as a language which is definitely a good thing.
To celebrate this announcement, over the coming weeks and months (as I find the time) I am going to be posting a series of articles about using the LINX Toolkit with the Raspberry Pi in LabVIEW.
Over the years I have built up a pretty extensive collection of Raspberry Pis and various bits of useful hardware to that allow a Raspberry Pi to interact with the outside world as you might using LabVIEW and DAQmx/cRIO etc. The goal of these articles is to help you get started with the Raspberry Pi and LabVIEW and to show you some of the things you can do with it.
An extra bonus to this is the recent launch of the Raspberry Pi 4 – the latest Raspberry Pi board with a more powerful processor (1.5GHz quad core, 1/2/4GB of RAM, USB 3, onboard Wifi/Bluetooth and Gigabit Ethernet. Although not officially supported by the LINX Toolkit yet, I’ll be having a go at getting it up and running with LabVIEW.
MAKE-ing with LabVIEW & Raspberry Pi – Series Topics
I haven’t fully planned out each article but over the course of the series I’d like to cover the following:
- Getting Started with the LINX Toolkit, Raspberry Pi and LabVIEW
- Installation & Configuring the Raspberry Pi
- Building and deploying your first application
- Raspberry Pi 4
- On-board communications
- Networking (TCP/IP over Ethernet/WiFi)
- Serial / RS-232
- Data Acquisition / Interacting with the real world
- Analog I/O
- Digital I/O
- Other Sensors
- User Interface / Display Options
- Nextion Touch Screen
- LabVIEW NXG Web Module (which will also be available for free with the Community Edition)
- Configuring the Raspberry Pi to run a web-page in Kiosk mode
That covers the basics (and there’s a lot there already!) but some other topics I could cover include GSM/GPS. the Pi Zero, using an Arduino as an additional I/O device, Bluetooth communications etc. – please leave a comment if there’s something you’d like me to cover and I’ll try to include it in a future article.
Prerequisite LabVIEW Knowledge?
For this series I’m going to be assuming that you are already fairly familiar with LabVIEW but that are maybe new to the LINX Toolkit and using it with a Raspberry Pi. If you’re new to LabVIEW (maybe you’re checking out the free Community Edition – great, welcome!) then I would suggest starting here or here to learn some of the basics first.
Why use a Raspberry Pi?
The main reason for using a Raspberry Pi is that it is a low-cost and small form-factor computer with plenty of GPIO pins increasing its hardware capability. As an open-source platform, there are 100s of sensors, hats (addon boards), cases and display options available.
Some commercial applications that might be suited to a Raspberry Pi could be:
- Low-cost low-channel count data acquisition system (e.g. monitoring a handful of analog inputs where timing/accuracy aren’t critical)
- Headless monitoring system (to monitor a system and report data to the cloud)
- Low-cost HMI / display module (instead of using a PC alongside a CompactRIO, for example)
Of course, while a Raspberry Pi can be a neat low-cost solution for a headless data acquisition system, it definitely doesn’t replace NI’s other platforms like the sbRIO/CompactRIO or PXI. These systems still have their place as they offer things like:
- Deterministic control applications with LabVIEW Real-Time and high-speed control/processing with LabVIEW FPGA
- CompactRIO C-Series modules and PXI cards offer a much wider range of input/output options and much higher measurement specifications (e.g. ranges, resolution, accuracy, channel counts etc.)
- CompactRIO is a robust/rugged platform that can operate in industrial environments
For this series of articles, I’m going to be exploring the Raspberry Pi’s capabilities through my own hobby project – a storm/weather monitoring station.
Application: Raspberry Pi Storm Station
Most of the time when I’m learning new technologies, I like to have an application in mind as it gives me something to work towards. For this Series, I’m going to be looking at building a Storm Watcher / Weather Station. This is very much a hobby project but it will demonstrate a number of capabilities
Here’s a rough idea of what I want it to be able to do:
- Temperature, Pressure & Humidity Measurements
- Lightning Detection (using one of these)
- On-board display of measurements
- The ability to push measurement data to the cloud
- Retrieve current/forecast weather information
Why? My mum is a keen weather watcher and often uses websites like this one to see where there are storms etc. – I thought it would be a nice little project so she can start detecting her own storms. The Raspberry Pi is ideal for this as it’s a low-cost piece of hardware with built-in WiFi and there are lots of options for small displays etc.
Up Next: Part 2
Stay tuned for Part 2 where we’ll get started with installing and configuring the necessary software on our PCs. For this we’ll be using LabVIEW 2019 and the latest beta version of the LINX Toolkit.
This is great! I may have to reuse your work for a home weather station that I can integration with my home automation system!