MLX90640 I2C ISSUE

I am having issue with my MLX90640

the serial monitor shows

MLX90640 IR Array Example
MLX90640 online!
E (1056) i2c.master: I2C software timeout
E (1056) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed
E (1056) i2c.master: i2c_master_transmit_receive(1220): I2C transaction failed
E (1112) i2c.master: I2C software timeout
E (3224) i2c.master: i2c_master_transmit_receive(1220): I2C transaction failed
Reading EEPROM…
Parameter extraction failed
status = -7
E (3253) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed
Error: Sensor did not ack

Anyone who knows how to fix this one? Please I really need help with this one

How about a bit more information so we can help?
What MCU/board do you use?
Which sketch?
Which MLX90640 board do you have?
How did you connect the MLX 90640 and the MCU/board?

Hello, I am using ESP 32

This is my circuit so basically I tried to direct the connection from the lens (SDL/SDA/VCC) but I insert a 4.7k resistor for SDA AND SDL I just remove it for picture, but the problem is still the same

I just follow the instructions and the library from https://www.instructables.com/Infrared-Thermal-Imaging-Camera-With-MLX90640-and-/

" insert a 4.7k resistor for SDA AND SDL I just remove it for picture,"
Just to make sure. Did you have 4.7K resistors as pull-up to 3v3, on both SDA and SCL (as it should)? or where the serial ?

Which is the MLX90640 board you use?

The brand of it I think is EC BUYING

Yes I put 4.7k

Did you connect the resistors as pull-up to 3v3?

Hard to find information about this MLX90640 board. Is the board 3v3 VCC or 5V ?

Is the YELLOW wire to the MLX90640 connected to GND ??

background thoughts
It finds the the MLX90640, so the lines are connected correctly, but then the communication fails. I did not find information that the MLX90640 is using clock stretch (which fails on ESP32). You included reference link does not seem to have issues either. With unstable behavior I would predict it is pull-up (if not already on the MLX90640 board) or power supply that makes it unstable, or Wire speed / half-connected wires. Still it could be the MLX90640 itself..

1 Like

Im seeing other components on your MLX90640 board that could be interfeaing with the ESP. You need the bare sensor or a breakout that doesn’t have other chips on it.

What is it sir? Please help

You need one of these or something else like it.

Im having the same problem.

I want to but I already have 2 weeks to finish my device, and it took around 1 month before this sensor got delivered

Digi-Key has the bare sensor, they should offer 1 or 2 day shipping.

The problem is really in my MLX90640? Not with my coding sir?

I am not sure it is the MLX90640.. not yet at least. .. double check the wiring and voltage. See my earlier question about the GND connection. You need pull-up if not already… keep the Wire at 100Khz..
Try an I2C SCANNER and run that multiple times.. (Arduino Playground - I2cScanner)

1 Like

I believe this is the board you have.

There appears to be some sort of microcontroller on the board along with the thermal sensor.

I do not think you can connect this to your project the way the guide is written because i think that other controller chip on the board will interfere with communication between your esp and the sensor.

I think you’re better off getting a breakout board from adafruit, sparkfun or someone else. Your chances of success would be better this way, the guide you’re following assumes you have a breakout.

1 Like

How about if I will just remove the lens from the board?

What do you imagine removing the lens would accomplish?

You bought a cheap, completely unsupported sensor that apparently doesn’t come with operating instructions, and may be counterfeit and/or not fully functional.

If you bought an MLX-90640 module from Sparkfun, you get the genuine item, operating instructions, a getting started guide with libraries and example code, forum support and a pretty generous guarantee of functionality.

1 Like

Anyways, Thank you everyone. I already figure out how to fix it

1 Like