adafruit/Adafruit_CircuitPython_MLX90640

More than 4 outlier pixels error

Closed this issue · 7 comments

when I run the example on a Pi 4 I get this error

Traceback (most recent call last):
  File "test2.py", line 8, in <module>
    mlx = adafruit_mlx90640.MLX90640(i2c)
  File "/home/pi/.local/lib/python3.7/site-packages/adafruit_mlx90640.py", line 108, in __init__
    self._ExtractParameters()
  File "/home/pi/.local/lib/python3.7/site-packages/adafruit_mlx90640.py", line 370, in _ExtractParameters
    self._ExtractDeviatingPixels()
  File "/home/pi/.local/lib/python3.7/site-packages/adafruit_mlx90640.py", line 766, in _ExtractDeviatingPixels
    raise RuntimeError("More than 4 outlier pixels")
RuntimeError: More than 4 outlier pixels

the library doesn't like more than 4 outlier pixels, which exact sensor are you using?

OK please contact seeed for a replacement with good pixels

For any lost souls encountering this problem with some chineese boards with this sensor: they seem to be changing protocol with chip next to sensor, while keeping the same i2c address, what causes this error. After desoldering sensor and connecting it directly everything works (-:

Desoldering it was easier than I expected - I heated legs close to each other while applying gentle sideway pressure, so they slide out a little, then switch to other two legs, repeat until sensor is free.

@matemaciek which board were you using?

I have a Waveshare MLX90640, and I get the 4 outlier pixels error on Raspberry Pi using the code provided by Adafruit.

I tried following the code quickstart by Waveshare (https://www.waveshare.com/wiki/MLX90640-D110_Thermal_Camera) for Raspberry Pi. The error I get is:

cnt > 4 error
Segmentation fault

The Waveshare MLX90640 seems to be at location 33 when running sudo i2cdetect -y 1.

Would you have any insight on the sources of error in this setup with Waveshare?

I had one of those (extra IC is on the other side):
MLX90640-Camera-Module-Thermal-Image-Temperature-Sensor-32x24-IR-Infrared-Array-Thermometric-Dot-Matrix-32-24
My guess is that chip on that board is doing some manipulation of the data, because reading the raw sensor provides some challenges of its own, like a lot of noise unless you put a decoupling capacitance as described here.

@matemaciek I was just investigating the same problem, but came across a manual of a similar board that shed some light on the problem. Long story short, by default these boards are setup for serial communication, solder the "SET I2C" pads together and it'll likely work fine, that's what I did. In retrospect, that was a pretty big clue I also overlooked. Alternatively you could try to use the serial communication instead, I didn't go down that path.