PureThermal 2 board with Lepton 3.5

2,158 views
Skip to first unread message

Andrew Jones

unread,
May 2, 2018, 6:56:55 AM5/2/18
to Flir Lepton
Hello,

I have just purchased my first Lepton (3.5) after considering it for a long time. One thing that "tipped me over the edge" was what appeared to be the simplicity of the "PureThermal" board.

I searched the mailing list, but I didn't see any threads discussing the PureThermal 2 board: does anyone have any experience with this? How well did it work?

Also, does anyone know if the PureThermal 2 board is compatible with purethermal1-uvc-capture [https://github.com/groupgets/purethermal1-uvc-capture]? Is anyone aware of any _downsides_ of using a PureThermal board (with a Raspberry Pi) vs. using the "normal" breakout board?

Cheers,

Andrew

Mana Saedan

unread,
May 2, 2018, 10:56:18 AM5/2/18
to Flir Lepton
Hi Andrew,

      I just got "purethermal 2 + lepton 3.5" about a week ago. First thing that I tried was this "uvc-radiometry.py". It works well with correct temperature reading right from start. I do not know any downside to use with raspberry pi. Even it has one, I still want to use with the Pi anyway since only usb cable is more organised than SPI cables. Also I can use other SBC that mostly will have USB.

      I plan to try the camera on RPi next week, after finish testing the gimbal. My application was using the camera on drone by the way. 

Have a nice day!
Mana

Andrew V. Jones

unread,
May 2, 2018, 10:58:18 AM5/2/18
to Mana Saedan, Flir Lepton
Hi Mana,

Thanks for the reply!

That’s awesome news — I really cannot say how useful your reply is
in knowing that things will (hopefully) just work.

Thanks again — cheers,

Andrew
> --
> You received this message because you are subscribed to the Google
> Groups "Flir Lepton" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to flir-lepton...@googlegroups.com.
> Visit this group at https://groups.google.com/group/flir-lepton.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/flir-lepton/f4d2787d-a79a-4c6f-a9ce-e67bf01588be%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Kurt Kiefer

unread,
May 2, 2018, 11:50:25 AM5/2/18
to Flir Lepton
Andrew,

PureThermal 1 and PureThermal 2 boards are very similar, the only real difference is form factor and that the PT2 board uses a different oscillator for the STM32 so that it can be flashed over USB (DFU mode).

All the examples in the purethermal1-uvc-capture repo should work for Lepton 3.5, and as Mana pointed out at least the radiometry one works without modification. Without looking over that code, I suspect a few others may need to have hard-coded size of 80x60 changed to 160x120, but that would be all.

There shouldn't be any downside to using the PT board vs the breakout board. The huge upside (and the reason we made the thing in the first place) is that now you don't have to worry about maintaining sync with the Lepton in your application because the MCU on the PT board is doing that work.

Kurt

Andrew Jones

unread,
May 4, 2018, 11:59:20 AM5/4/18
to Kurt Kiefer, Flir Lepton

Hi Kurt!

Thanks for the reply!

My PT2 (with 3.5 sensor turned-up today); pairing it with a freshly-installed RPi (3B+) worked as I would expect. To confirm, I did need to modify `uvc-radiometry.py` to use the correct resolution (leaving it as 80x60 caused a UVC runtime error). Apart from that, both GetThermal and `uvc-radiometry.py` worked out-of-the-box via USB (which is just awesome, not having to mess around with wires!).

Some questions:

1) Is it possible to disable the flashing LED on the board while capturing? This isn’t ideal for the situation I want to use it in (wildlife monitoring)

2) The first few times I used the PT2 via Python, it seems that the temperature readings were “off” (see attached comparing GetThermal vs. UVC; these pictures were taken within seconds of each other) — is this a known issue?

3) I quite like the aesthetic of how GeThermal looks vs. the black and white of UVC; has anyone attempted this in Python? Looking at GetThermal, is just achieved by “just” applying the colour pallet [https://github.com/groupgets/GetThermal/blob/master/src/dataformatter.cpp#L168] or is there something more complex going on here?

4) This might be an obvious one, but are the “intensities” controlled by software or by hardware? The reason I ask is that the images “adjust” depending on how hot parts of the scene are, when really I’d like to keep the “base” temperature fixed (to ensure consistency across the images).

Sorry for all the questions; I really appreciate all the help — cheers,

Andrew

--
You received this message because you are subscribed to the Google Groups "Flir Lepton" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flir-lepton...@googlegroups.com.
Visit this group at https://groups.google.com/group/flir-lepton.
get_thermal.png
py_uvc.png

Clive

unread,
May 4, 2018, 4:36:36 PM5/4/18
to Flir Lepton
Andrew 

Could you let me know what version OS you are using on the Raspberry Pi. I have had no end of problems doing what you have managed. I am using Raspbian Stretch with Desktop.

Thanks

Clive

Andrew Jones

unread,
May 4, 2018, 6:17:27 PM5/4/18
to Kurt Kiefer, Flir Lepton

Okay, so I can answer questions 3 and 4 myself:

3) I “ported” the “colormap_grayscale” for GetThermal to a cv2 LUT, which then allows for the same transformation; code is here: https://github.com/andrewvaughanj/purethermal1-uvc-capture/blob/72ecd1d1ee9afe087fdb51ec2fe8f093f6356f62/python/uvc-radiometry.py#L190

4) Because I have a “consistent” temperature (which ranges from 5 degrees to about 25 degrees), I cheat and pin one pixel to be the max and one pixel to be the min — this means that I have the whole range of temperatures across all captures, to ensure that colour scaling is always the same; code is here: https://github.com/andrewvaughanj/purethermal1-uvc-capture/blob/72ecd1d1ee9afe087fdb51ec2fe8f093f6356f62/python/uvc-radiometry.py#L361

The only one I really care about now is turning off the LED!

Thanks to the GroupGets guys for pretty solid example code — made it very to achieve what I wanted to achieve :)

Cheers,

Andrew

20180504-220136.png

Andrew Jones

unread,
May 4, 2018, 6:23:38 PM5/4/18
to Clive, Flir Lepton

Hi Clive,

I purchased a whole new Raspberry Pi 3B+ (revision: “a020d3”) for this and did a fresh install of Raspbian 2018-04-18.

To get things up and running, I followed the guide for GetThermal for the Raspberry Pi:

https://github.com/groupgets/GetThermal/wiki/Building-for-Raspberry-Pi

After confirming that the GetThermal UI works (which it did!), I then followed the instructions for purethermal1-uvc-capture (GetThermal had already built the fork of libuvc, which I knew worked):

https://github.com/groupgets/purethermal1-uvc-capture

After that, I needed to modify uvc-radiometry.py to use the correct resolution for Lepton 3.5, but then everything just worked!

What’s going wrong for you?

Cheers,

Andrew

Clive

unread,
May 7, 2018, 3:14:52 AM5/7/18
to Flir Lepton
Hi Andrew

Thanks heaps. Incompetence may be the thing wrong with me...

Your notes gave me hints as to where I went wrong and I am looking like I am progressing. Thanks

Clive

Andrew Jones

unread,
May 7, 2018, 3:22:59 AM5/7/18
to Flir Lepton
No worries!

Let me know if you get stuck and I can try to help :)

Cheers,

Andrew

Clive

unread,
May 7, 2018, 3:34:14 AM5/7/18
to Flir Lepton
Since you are asking...

Frame capture from the UVC - documentation on this seems sketchy.  

I am trying to get it working in Jupyter but if you have managed in to get running in python and could spare an example.

Cheers

Clive

Andrew Jones

unread,
May 7, 2018, 3:36:02 AM5/7/18
to Flir Lepton
Hi Clive,

The example from here:


does work (at least for me) under Python.

I had this running in a tight loop for 24+ hours and it worked very well.

Cheers,

Andrew

廖睿珉

unread,
Dec 27, 2019, 10:45:51 AM12/27/19
to Flir Lepton
hello! I also use RPi(3B +)with PT2 and Lepton 3.5 but I run uvc-radiometry.py got this error:  

$ sudo ./uvc-radiometry.py
unsupported descriptor subtype VS_COLORFORMAT
unsupported descriptor subtype VS_COLORFORMAT
unsupported descriptor subtype VS_COLORFORMAT
unsupported descriptor subtype VS_COLORFORMAT
unsupported descriptor subtype VS_COLORFORMAT
device opened!
Version gpp: 3.3.26 dsp: 3.3.26
FLIR part #: 500-0771-01
FLIR serial #: '{"(\x00\x00\x00\x00\x00'
format: UYVY
frame 160x120 @ 9fps
format: Y16
frame 160x120 @ 9fps
frame 160x122 @ 9fps
format: Y8
frame 160x120 @ 9fps
format: RGBP
frame 160x120 @ 9fps
format: }�6�
frame 160x120 @ 9fps
uvc_start_streaming failed: -2

can you help me ? please .

Andrew Jones於 2018年5月4日星期五 UTC+8下午11時59分20秒寫道:

嗨,狼!

謝謝回复!

我的PT2(今天打開了3.5傳感器);如我所料,將它與新安裝的RPi(3B +)配對使用。為了確認,我確實需要修改`uvc-radiometry.py`以使用正確的分辨率(將其保留為80x60會導致UVC運行時錯誤)。除此之外,GetThermal和`uvc-radiometry.py`都可以通過USB開箱即用(這太棒了,不必弄亂電線!)。

一些問題:

1)捕獲時可以禁用板上的閃爍LED嗎?對於我想在(野生生物監測)中使用它的情況,這不是理想的

2)最初幾次通過Python使用PT2時,溫度讀數似乎“關閉”(請參閱附件比較GetThermal與UVC;這些照片彼此間隔數秒鐘)–這是一個已知問題嗎?

3)我非常喜歡GeThermal的外觀與UVC的黑白之美。有沒有人嘗試用Python?看一下GetThermal,僅通過“僅”應用調色板即可實現[ https://github.com/groupgets/ GetThermal / blob / master / src / dataformatter.cpp#L168 ]還是這裡發生的事情更複雜?

4)這可能是顯而易見的,但是“強度”是由軟件還是由硬件控制的?我問的原因是,當我真的想保持“基本”溫度固定(以確保圖像的一致性)時,圖像會根據場景的高溫部分進行“調整”。

抱歉有這些問題; 我真的很感謝所有幫助-歡呼聲,

安德魯


2018年5月2日,16:50,Kurt Kiefer寫道:

安德魯,

PureThermal 1和PureThermal 2電路板非常相似,唯一真正的區別是外形尺寸,並且PT2電路板為STM32使用了不同的振盪器,因此可以通過USB閃存(DFU模式)。

purethermal1-uvc-capture回購中的所有示例都應適用於Lepton 3.5,並且如Mana所指出的,至少放射線法無需修改即可工作。如果不查看該代碼,我懷疑其他一些人可能需要將80x60的硬編碼大小更改為160x120,但這僅是全部。

使用PT板和分線板不應該有任何不利之處。巨大的好處(也是我們之所以做出來的原因)是,您現在不必擔心與應用程序中的Lepton保持同步,因為PT板上的MCU可以完成這項工作。

庫爾特

-
您收到此消息是因為您已訂閱Google網上論壇“ Flir Lepton”論壇。
要退訂此論壇並停止從它接收電子郵件,發送電子郵件至FLIR -... @ googlegroups.com
通過https://groups.google.com/group/flir-lepton訪問該論壇
要在網上查看此討論,請訪問https://groups.google.com/d/ msgid / flir-lepton / 5ea2c0c1- b838-435f-8047-8b5c0a822b05%40googlegroups.com
有關更多選項,請訪問https://groups.google.com/d/ optout

Kurt Kiefer

unread,
Dec 27, 2019, 11:11:48 AM12/27/19
to Flir Lepton
Failure to start altogether is a different issue. Try building the firmware on the development branch. See this issue: https://github.com/groupgets/purethermal1-firmware/issues/24

廖睿珉

unread,
Dec 30, 2019, 10:18:05 AM12/30/19
to Flir Lepton
hello! sorry, i would like to ask where can modify `uvc-radiometry.py` to use the correct resolution, i run uvc-radiometry.py got some error cannot be solved. thank you.

Andrew Jones於 2018年5月4日星期五 UTC+8下午11時59分20秒寫道:

Hi Kurt!

Thanks for the reply!

My PT2 (with 3.5 sensor turned-up today); pairing it with a freshly-installed RPi (3B+) worked as I would expect. To confirm, I did need to modify `uvc-radiometry.py` to use the correct resolution (leaving it as 80x60 caused a UVC runtime error). Apart from that, both GetThermal and `uvc-radiometry.py` worked out-of-the-box via USB (which is just awesome, not having to mess around with wires!).

Some questions:

1) Is it possible to disable the flashing LED on the board while capturing? This isn’t ideal for the situation I want to use it in (wildlife monitoring)

2) The first few times I used the PT2 via Python, it seems that the temperature readings were “off” (see attached comparing GetThermal vs. UVC; these pictures were taken within seconds of each other) — is this a known issue?

3) I quite like the aesthetic of how GeThermal looks vs. the black and white of UVC; has anyone attempted this in Python? Looking at GetThermal, is just achieved by “just” applying the colour pallet [https://github.com/groupgets/GetThermal/blob/master/src/dataformatter.cpp#L168] or is there something more complex going on here?

4) This might be an obvious one, but are the “intensities” controlled by software or by hardware? The reason I ask is that the images “adjust” depending on how hot parts of the scene are, when really I’d like to keep the “base” temperature fixed (to ensure consistency across the images).

Sorry for all the questions; I really appreciate all the help — cheers,

Andrew


On 2 May 2018, at 16:50, Kurt Kiefer wrote:

Andrew,

PureThermal 1 and PureThermal 2 boards are very similar, the only real difference is form factor and that the PT2 board uses a different oscillator for the STM32 so that it can be flashed over USB (DFU mode).

All the examples in the purethermal1-uvc-capture repo should work for Lepton 3.5, and as Mana pointed out at least the radiometry one works without modification. Without looking over that code, I suspect a few others may need to have hard-coded size of 80x60 changed to 160x120, but that would be all.

There shouldn't be any downside to using the PT board vs the breakout board. The huge upside (and the reason we made the thing in the first place) is that now you don't have to worry about maintaining sync with the Lepton in your application because the MCU on the PT board is doing that work.

Kurt

--
You received this message because you are subscribed to the Google Groups "Flir Lepton" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flir-...@googlegroups.com.

cuteegg ma

unread,
Mar 28, 2021, 11:45:26 PM3/28/21
to Flir Lepton
Hi andrew, 
Is it possible to disable the flashing LED on the board while capturing? 

Best regards, 
cute

nsk ksn

unread,
Mar 29, 2021, 1:05:46 AM3/29/21
to Flir Lepton
I glanced over the code, but I believe you can comment out this part in file lepton_task.c
Under "// Start slow blink (1 Hz)" there's a while loop

HAL_GPIO_TogglePin(SYSTEM_LED_GPIO_Port, SYSTEM_LED_Pin);

compile the firmware and flash.

I have not tested this, but I doubt anything else is tied to system_led_pin.


nsk ksn

unread,
Mar 29, 2021, 1:30:40 AM3/29/21
to Flir Lepton
My apologies that line is for the slow blink before capture.
Please comment out Line 284 in file lepton_task.c
//HAL_GPIO_TogglePin(SYSTEM_LED_GPIO_Port, SYSTEM_LED_Pin);
And add this line:
HAL_GPIO_WritePin(SYSTEM_LED_GPIO_Port,SYSTEM_LED_Pin,GPIO_PIN_SET);
Reply all
Reply to author
Forward
0 new messages