Accuracy Issues in Temperature Measurement Using OpenMV PureThermal Board with FLIR Lepton 3.5


Hello Sir,
I’m working on a project involving temperature measurement using the OpenMV PureThermal board paired with a FLIR Lepton 3.5 thermal sensor. I’m currently evaluating its accuracy by comparing the readings to a thermocouple placed in contact with a heated object.
In my setup:
• The object is heated in a controlled manner.
• Temperature readings from the FLIR Lepton are taken from the pixel nearest to the thermocouple’s position.
• Readings are recorded over time and compared against the thermocouple measurements.
However, I’m observing some discrepancies in the thermal data:

  1. Area 1: A sudden jump in temperature occurs after a certain interval.
  2. Area 2: At around sample #224, there’s a sudden drop in the thermal reading while the thermocouple remains stable.
  3. Area 3: Another sudden drop appears in the thermal reading after a separate interval.
    Here’s the simplified code I used for data collection:

import json
from ulab import numpy as np
import sensor, fir, pyb

fir.init(fir.FIR_LEPTON)

for i in range(500):
    pyb.delay(5000)
    img = sensor.snapshot()
    ta, ir, to_min, to_max = fir.read_ir()
    fir.draw_ir(img, ir, x_scale=4, y_scale=4, alpha=255, hint=1)
    with open(f"/sdcard/color_images2/thermal_{i}.txt", "w") as f:
        json.dump(temperature_data.tolist(), f)
    img.save(f"/sdcard/color_images2/thermal_{i}.jpg")
    avg_temp = np.mean(temperature_data)
    print(f"Frame {i}: Average temperature = {avg_temp:.2f}°C")

Questions:
• What could be causing these sudden jumps and drops in thermal readings?
• Is there a recommended filtering or correction method to improve temperature accuracy over time?
Any insights or recommendations would be greatly appreciated.

Not sure, by default, the FIR Lepton outputs 14-bit thermal data. The sensor will calibrate it’s self via FFC but you shouldn’t see those periodic drops. The object you are looking at isn’t very hot either.

We had another customer testing this code in a reading some extremely hot 300C+ things and was not encountering issues.

Is this code right?

for i in range(500):
    pyb.delay(5000)
    img = sensor.snapshot()
    ta, ir, to_min, to_max = fir.read_ir()
    fir.draw_ir(img, ir, x_scale=4, y_scale=4, alpha=255, hint=1)
    with open(f"/sdcard/color_images2/thermal_{i}.txt", "w") as f:
        json.dump(temperature_data.tolist(), f)
    img.save(f"/sdcard/color_images2/thermal_{i}.jpg")
    avg_temp = np.mean(temperature_data)
    print(f"Frame {i}: Average temperature = {avg_temp:.2f}°C")

temperature_data is not a defined variable.