Skip to content
higuchi-toshio-intec edited this page Oct 3, 2019 · 9 revisions

Using Lepton 3.x on Raspberry PI (en)

Introduction

  • I wanted to know how to measure temperature easily.
  • It's possible by combining Raspberry PI and FLiR Lepton. ( it's affordable. )
  • There are some examples. I thought it was easy.

But it is not easy way.

Specification about Lepton

  • There are 2 series of Lepton. ( 2.x / 3.x )
  • The big difference is the number of pixels.
    • Lepton 2.x : 80x60 (4800) pixels.
    • Lepton 3.x : 160x120 (19200) pixels.
    • Actual imagelepton2.png lepton3.png
    • Even expensive, Lepton 3.x is more attractive than 2.x
  • Breakout Board support Lepton 2.x and 3.x.
  • I found a bad explanation on the link.
    • FLIR reports that combining Breakout Board and Lepton 3.x have some problems ......

Inquiry result

FLIR reports that combining Lepton 3.0/3.5 and Breakout Board have some problems.
Basically, if you keep SPI bus cycle for Lepton 3.x, there is no problem.
In multitasking OS such as Linux, scheduling and other problems may occur.
It's not a hardware issue with Lepton 3.x or Breakout Board.
You must be handled by software.

FLIR recommends that Lepton 3.x be combined with PureThermal2.
There is no reference on the use of breakout boards.
Some examples are posted on the web, but basically you have to check the program and its execution results yourself.

Purchase list

Name Quantity Remarks
Lepton 2.5 1 I thought it works without problems (probably)
Lepton 3.5 1 I didn't know that it works good or not.
Breakout Board 2
cable *
  • Such an atmosphere.(Lepton 2 and 3 look same parts. This labeled '3') raspberrypi3+lepton3.JPG

Using Lepton 2.x

Using Lepton 3.x

  • PullRequest status on GitHub(groupgets/LeptonModule) is 'PENDING' .
  • I read some documents and edited some source files about raspberrypi_video.
  • Main editing points for Lepton 3.x
    • change pixels (80x60 --> 160x120)
    • get 'segment number'
    • recalcuration rows/cols
    • cahnge SPI bus speed
      • IMPORTANT
      • Data size increased 4 times. Then data transfer is not in time.
  • Improve difficult-to-use features
    • Colored by fixed range.
      • Lepton 2.x diaplays image
      • In the worst case, Lepton 3.x displays images colored in 4 ranges.
    • Selectable colormap
    • Display easy help messages

Execution

$ ./raspberrypi_video -h
Usage: raspberrypi_video [OPTION]...
 -h      display this help and exit
 -cm x   select colormap
           1 : rainbow
           2 : grayscale
           3 : ironblack [default]
 -tl x   select type of Lepton
           2 : Lepton 2.x [default]
           3 : Lepton 3.x
               [for your reference] Please use nice command
                 e.g. sudo nice -n 0 ./raspberrypi_video -tl 3
 -ss x   SPI bus speed [MHz] (10 - 30)
           20 : 20MHz [default]
 -min x  override minimum value for scaling (0 - 65535)
           [default] automatic scaling range adjustment
           e.g. -min 30000
 -max x  override maximum value for scaling (0 - 65535)
           [default] automatic scaling range adjustment
           e.g. -max 32000
  • It works mode 'Lepton 2.x' by no option.
$ sudo ./raspberrypi_video
  • Using Lepton 3.x
$ sudo ./raspberrypi_video -tl 3
  • Using Lepton 3.x and colored by rainbow
$ sudo ./raspberrypi_video -tl 3 -cm 1 -min 30000 -max 32000

Such an atmospherelepton3-rainbow.png

  • use 'nice' command as you like
$ sudo nice -n 0 ./raspberrypi_video -tl 3 -cm 1 -min 30000 -max 32000
  • Using Lepton 3.x and colored by rainbow without min/max options
$ sudo ./raspberrypi_video -tl 3 -cm 1

Such an atmosphereauto_scaling_range_adjustment.png

GitHub

Appendix

2019/09/24

  • I got a good suggestion.

    the original automatic range adjustment feature is also convenient, especially for the first time user.

    • If there ware not automatic scaling range adjustment function, I could not reach this state.
    • Never forget beginners's spirit

2019/09/26