FLIR Lepton Hookup Guide

Introduction

Note: This tutorial was originally written for the FLiR Lepton [KIT-13233]. However, the FLiR Lepton 2.5 with Radiometry should function the same.

Upon discovering that we would be evaluating a Long Wave Infrared (LWIR) camera, our team repeatedly exclaimed two words: Predator Vision. Yes, we were finally going to see the unseen realm of heat, which would be very helpful if we ever had to track a group of elite agents in a faraway jungle… or simply avoid burning ourselves with a hot mug of tea.

The FLIR Lepton is a great module for its price, Pure Engineering did a great job with the breakout board and documentation.

Nevertheless, there are a couple of small challenges in the setup procedure, so we felt it would be beneficial to share our findings from experimenting with this product. However, let’s start with some theoretical background first.

Required Materials

To participate in this tutorial, you will require these specific hardware and software components. Depending on your possessions and configuration, you might not require all items. Place the hardware in your cart, review the guide, and make any adjustments to the cart if needed.

Hardware

Today, we are going to install the Raspberry Pi example code from Pure Engineering that is shown in our product videos. We’ll need nothing more than a Raspberry Pi at the very least. Only a few jumper wires, plus a monitor, keyboard, necessary cables for your Raspberry Pi, and your chosen FLIR Lepton camera.

Below is a wishlist of the suggested parts:

FLIR Lepton Hookup Guide Wishlist SparkFun Wish List

Note:  To minimize the components utilized, connect the thermal camera directly to the Pi using F/F jumper wires. To ensure a safe connection, you could also market a personalized Raspberry Pi hat with a prototyping board.

Be alert! When purchasing the PureThermal 2: FLIR Lepton Smart I/O Board, please note that it does not come with the FLIR Lepton camera module. Yet, this manages the monitoring of the camera and unprocessed video information through USB. This is beneficial if you plan to connect it to your computer and utilize it as a USB webcam.

Software

The sample code has been tried on a Raspberry Pi model B, but it should function well on any model as long as Raspbian is installed.

RASPBERRY PI: RASPBIAN IMAGE

You will also need to install the QT dev tools and example. Check out the Software later in the tutorial for more information.

Theory

Electromagnetic radiation, which ranges from gamma rays to radio waves, surrounds us both inside and outside. Although many imaging sensors pick up radiation within the visible spectrum (380 to 700 nanometers), long wave infrared sensors detect radiation ranging from 900 to 14,000 nanometers. It is called the infrared spectrum, and it represents the majority of the thermal radiation given off by objects close to room temperature.

500PX-~1

 

Electromagnetic spectrum with visible light highlighted. Image courtesy of Wikimedia Commons.

A microbolometer array is the sensor found within the FLiR Lepton. Microbolometers consist of materials that alter their resistance when heated by infrared radiation. By taking the resistance measurement, you can establish the temperature of the object that produced the radiation and generate a false-color picture that represents that information.

This kind of thermal imaging is frequently utilized in conducting building inspections (for finding insulation leaks), examining cars (to check cooling efficiency), and diagnosing medical conditions. Thermal imaging is perfect for night vision cameras as it can create images without using visible light.

In the field of robotics, thermal cameras serve as efficient heat sensors due to their ability to generate images that can be analyzed using familiar techniques and software like those used for visible light images. Picture using OpenCV to detect heat centroids instead of just color centroids! Yes, you have the opportunity to create heat-seeking robots right in the comfort of your own home!

What exactly are we waiting for? Allow me to show you around…

Hardware Overview

Here are a few of the FLIR Lepton’s specifications. The blue-highlighted cells show the minor variations between the two editions of the FLIR Lepton camera module.

FLIR Lepton FLIR Lepton v2.5 w/ Radiometry
Resolution (h x v) 80 pixels x 60 pixels 80 pixels x 60 pixels
Spectral Range 8µm to 14µm 8µm to 14µm
Horizontal Field of View 51° 50°
Thermal Sensitivity < 50mK < 50mK
Frame Rate < 9Hz < 9Hz
Control Interface I2C I2C
Video Interface SPI SPI
Promised Time to Image < 0.5 sec < 1.2 sec (~0.5 sec in real world testing)
Integral Shutter
Radiometry 14-bit pixel value 14-bit pixel value, Kelvin
Operating Power ~150 mW ~150 mW

Hardware Hookup

Circuit Diagram

Follow the diagram provided to connect the FLIR breakout to the Raspberry Pi GPIO. Visit our Raspberry Pi GPIO tutorial for a review on the orientation of GPIO pins. Ensure that the Lepton module is firmly attached to the socket on the breakout board.

RPi-FLIR-Diag-FIXED

There are several methods of connecting and mounting your system together. If you used a breadboard and LCD touchscreen with the Pi, your setup should look similar to the image below.

Raspberry_Pi_FLIR_Lepton_Thermal_Imaging_Setup

 

Congratulations, that’s the hardware part done. Now onto the software configuration!

Software

Like I said before, it’s important to make sure the Raspbian operating system is set up on your Raspberry Pi. Turn on the computer and launch the Terminal application. Our initial task will involve activating the SPI and I2C interfaces on the Pi. Fortunately, Raspbian simplifies this process by providing a tool known as raspi-config. Simply input the following command to operate the utility:
sudo raspiconfig

You should be presented with the following screen as shown below. Click on the “Advanced Options” menu.

2015-0~1

 

Having a hard time seeing the circuit? Click on the image for a closer look.

Select SPI and follow the instructions on the following screens. After you’ve completed the SPI steps, do the same thing for I2C. When you exit raspi-config, it will ask if you want to reboot. Go ahead and do it so that the changes we just made will stick.

2015-0~3

 

Having a hard time seeing the circuit? Click on the image for a closer look.

We must install the QT application dependency for Pure Engineering’s example code before compiling it. Have no fear, it’s simple to accomplish. Ensure the Raspberry Pi is connected to the Internet, and execute the specified command to install the QT development tools.                                                    Install qt4-dev-tools using the command sudo apt-get.

Which will look something like this…

2015-03-22-201434_1184x624_scrotOnce the installation is finished, visit the Pure Engineering GitHub repository to download the …/software/raspberrypi_video directory. If you know how to use git, you can accomplish this task through the command line. For the majority of individuals, accessing the link above and selecting “Download ZIP” is just as simple. You have the option to save the file in any directory, then navigate to that directory in the Terminal, and extract it by running the specified command.
unzip LeptonModulemaster.zip

20811D~1

Now cd into the unzipped folder “LeptonModule-master” and the directory “…/raspberrypi_video”. This directory contains all of the files you need to compile the example code. First, we need to “make” the Lepton SDK. Use the cd command to navigate to the “…/software/raspberrypi_libs/LeptonSDKEmb32PUB” directory and run the make command.

Once that process has completed, cd back out to the “…/raspberrypi_video” directory and run qmake && make:

 

 

Congratulations! You’ve just compiled the example code, and you’re ready to run it. Simply type the following into your command line:

Read More info…..

FLIR Lepton Hookup Guide


About The Author

Muhammad Bilal

I am highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Leave a Comment

Your email address will not be published. Required fields are marked *