Second MLX90640 Dead on Arrival

Hello!

I recently posted about my MLX90640 that arrived unable to read any data using the official Melexis library. I am using an Adafruit Bluefruit Circuitplayground, running my sensor off its 3.3V and GND lines and connecting to its SCL and SDA with alligator clips. I have 4.2K pull up resistors to 3.3V on the SDA and SCL pins. I RMAd my previous dead sensor, and the replacement arrived today. This one allows me to gather data, but the data appears to be useless junk. I have pasted below the output of some code that just takes all pixel values and tells me the minimum and maximum. The lowest is apparently absolute 0 while the highest is aroun 4000 degrees Celsius. I am honestly frustrated that this is the second sensor that I have received that is dead on arrival, and I would love any feedback on how to fix it before I RMA this one as well.

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

code.py output:

Initializing MLX90640…

Warning: MLX90640 has many bad pixels; disabling bad-pixel handling and continuing.

MLX90640 detected

Capturing 10 frames (one every 2 seconds)…

min: -273.15 max: 3801.26 invalid: 13

min: -273.15 max: 4001.26 invalid: 13

min: -273.15 max: 4001.26 invalid: 13

min: -273.15 max: 4208.9 invalid: 13

min: -273.15 max: 4140.91 invalid: 13

min: -273.15 max: 4001.26 invalid: 13

min: -273.15 max: 3987.96 invalid: 13

min: -273.15 max: 4052.99 invalid: 13

min: -273.15 max: 4001.26 invalid: 13

min: -273.15 max: 4261.25 invalid: 13

Done.

Code done running.

Press any key to enter the REPL. Use CTRL-D to reload.

Adafruit CircuitPython 10.0.3 on 2025-10-17; Adafruit Circuit Playground Bluefruit with nRF52840

>>>

soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

code.py output:

Initializing MLX90640…

Warning: MLX90640 has many bad pixels; disabling bad-pixel handling and continuing.

MLX90640 detected

Capturing 10 frames (one every 2 seconds)…

min: -273.15 max: 4106.84 invalid: 13

min: -273.15 max: 4055.84 invalid: 13

min: -273.15 max: 4070.25 invalid: 13

min: -273.15 max: 4087.53 invalid: 13

min: -273.15 max: 4001.26 invalid: 13

min: -273.15 max: 4072.82 invalid: 13

min: -273.15 max: 4001.26 invalid: 13

min: -273.15 max: 3949.57 invalid: 13

min: -273.15 max: 4052.99 invalid: 13

min: -273.15 max: 4174.12 invalid: 13

Done.

Code done running.

Press any key to enter the REPL. Use CTRL-D to reload.

soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

code.py output:

Initializing MLX90640…

Warning: MLX90640 has many bad pixels; disabling bad-pixel handling and continuing.

MLX90640 detected

Capturing 10 frames (one every 2 seconds)…

min: -273.15 max: 3987.96 invalid: 13

min: -273.15 max: 3869.24 invalid: 13

min: -273.15 max: 3846.14 invalid: 13

min: -273.15 max: 3794.3 invalid: 13

min: -273.15 max: 3852.26 invalid: 13

min: -273.15 max: 3863.4 invalid: 13

min: -273.15 max: 3835.27 invalid: 13

min: -273.15 max: 3543.93 invalid: 13

min: -273.15 max: 3695.63 invalid: 13

min: -273.15 max: 3578.01 invalid: 13

Done.

Code done running.

Press any key to enter the REPL. Use CTRL-D to reload.

soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

code.py output:

Initializing MLX90640…

Warning: MLX90640 has many bad pixels; disabling bad-pixel handling and continuing.

MLX90640 detected

Capturing 10 frames (one every 2 seconds)…

min: -273.15 max: 3984.03 invalid: 14

min: -273.15 max: 3984.03 invalid: 14

min: -273.15 max: 3949.57 invalid: 14

min: -273.15 max: 4052.99 invalid: 14

min: -273.15 max: 4038.86 invalid: 14

min: -273.15 max: 3966.8 invalid: 14

min: -273.15 max: 4104.81 invalid: 14

min: -273.15 max: 4104.81 invalid: 14

min: -273.15 max: 4070.25 invalid: 14

min: -273.15 max: 4004.92 invalid: 14

Done.

Code done running.

We use 2.2k for our pull ups, and there is a set active on the MLX sensor as well…I’d remove the 4.2k ones and re-test. I also generally recommend soldering connections but I understand that product uses clips

Does anything unexpected show up if you do an i2c scan?

Thank you for the feedback, I will try 2.2k Ohms next. I could also solder the connection, particularly to 3.3V, and try using a bench power supply rather than the 3.3V out on my Bluefruit. I wont be able to solder the SDA/SCL pins, but I have everything set up on a breadboard so I largely trust those connections. I believe the i2c scan returned 0x33.

Good! There is also a somewhat uncommon manufacturing issue with the MLX PIR models; I made a short video that illustrates what can go wrong sometimes https://photos.app.goo.gl/ktA2LiFHSpQx61bh9 (note as I’m dictating I get them backwards at first! oops, but just keep watching lol). The main thing is to flip the sensor over and test the soldered points for continuity. It’s a pretty easy fix if you have a soldering iron

Oh great, thanks so much I’ll take a look at that for sure. I tried swapping the 4.7k for 2.2k and still get this:

code.py output:

Warning: MLX90640 has many bad pixels; disabling bad-pixel handling and continuing.

MLX90640 ready. Reading max temperature at 4 Hz…

Max Temp: 4104.81 C

Max Temp: 4104.81 C

Max Temp: 4070.25 C

Max Temp: 4070.25 C

Max Temp: 3915.12 C

Max Temp: 3915.12 C

Max Temp: 3828.88 C

Max Temp: 4089.82 C

Max Temp: 4139.43 C

Max Temp: 4139.43 C

Max Temp: 3886.21 C

Max Temp: 3828.88 C

Max Temp: 3717.30 C

Max Temp: 3788.88 C

Max Temp: 4035.74 C

Max Temp: 4035.74 C

Max Temp: 4122.11 C

Max Temp: 4122.11 C

Max Temp: 3984.03 C

Max Temp: 3984.03 C

Max Temp: 4070.25 C

Max Temp: 4070.25 C

Max Temp: 4191.50 C

Max Temp: 4191.50 C

Max Temp: 4140.91 C

Max Temp: 4070.25 C

Max Temp: 3846.14 C

Max Temp: 3846.14 C

Max Temp: 3801.26 C

Max Temp: 3852.26 C

Max Temp: 3880.64 C

Max Temp: 4055.84 C

Max Temp: 4055.84 C

Max Temp: 3920.14 C

Max Temp: 4087.53 C

Max Temp: 4087.53 C

Max Temp: 3801.26 C

Max Temp: 3937.09 C

Max Temp: 3937.09 C

Max Temp: 4089.82 C

Max Temp: 4278.76 C

Max Temp: 4278.76 C

Max Temp: 4243.61 C

Code stopped by auto-reload. Reloading soon.

soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

code.py output:

Warning: MLX90640 has many bad pixels; disabling bad-pixel handling and continuing.

Bad frame rejected

Bad frame rejected

Bad frame rejected

Bad frame rejected

Seems like the resistors weren’t the problem. I will definitely take a look at that video, and will let you know once I try it. Thanks so much for the feedback!

Ah, after watching this I realized I never specified the package. I do not have the Adafruit breakout, I just have the straight up sensor. They shouldn’t be able to short with the packaging setup I have. Thanks anyway though.

1 Like

Share links to the items being used, maybe post a photo of the setup too