MLX90640 Thermal Camera: noisy framedata

I’ve replicated the routines and functions from the MLX90640 API in python extracting frame values using smbus2. It was working very well for a while, but when I began tinkering with the refresh rate, it began to produce very noisy images with the wrong temperature values.

The values around the edges approach -13 to -9 degrees Celsius and get warmer towards the center. I’m suspecting that I may have adjusted some important configuration eeprom values by accident as I was trying to change the refresh rate. Now, at any refresh rate(even 1 fps), I get these noisy images. I was wondering whether there was a way to get the default eeprom values to reset the sensor or a way to restore to factory default, unless it’s a hardware issue?

thanks in advance.

Sorry for not being helpful here but may I ask how you got the MLX90640 working in the first place? I tried to follow the instruction on Github but when I ran fbuf it show “I2C read error”. Other examples like did not show an image as expected.

Thank you,

I’m not sure I can help since I made a python class for the thermal camera to use instead of the c++ implementation, If you don’t mind python, I posted it on my github with some usage instructions, maybe it’ll help?

Hi capstone2020,

Thank you for your answer. Following your instruction I clone your folder from github, and wrote a file containing the code lines as specified in the readme file to capture and show image. But when I run it I got a msg “no module named MLX90640”.

Can you help point out where I got it wrong.

Thank you,

Sorry my bad I didn’t test my code, It should work now, just do a new clone. I also included a requirements.txt since there are some dependencies (smbus2, python-opencv, numpy).

I pip install the requirements.txt file and ran the code again. This time it shows "no module named smbus2 for line 1 in

Your help is appreciated.

Further I have also installed the smbus2 package using pip install smbus2.

Updated: I used a Raspbian image via Matlab which I realized having some issues (like it has python3 but no pip3, no smbus, no programming menu etc). I will reformat the SD card with a fresh version of Raspbian and try again. Sorry can’t post more than 3 replies as new user.

Hi amorphous2111,

Are you using python 2 or 3? Might be worth installing the dependencies using pip3 install rather than pip install to see if that makes a difference.



Raspbian Lite of full Raspbian? I ask because I do believe the Lite is missing things like smbus. Maybe there is something else you need that you don’t have?