Go Down

Topic: Melexis MLX90614 thermal sensor - default EEPROM? (Read 3 times) previous topic - next topic


I found the project http://www.cheap-thermocam.tk/ a few days ago and planning to do it.
I got an arduino uno and a MLX90614ESF-DCI coming.

Great, I've done that project too and it runs perfectly.

First thing, if you have any input on the following post, that would be very much appreciated

What's your problem with that post? The original poster there wasn't sure about libraries to be used. But this isn't a problem if you rebuild a project and use the available code.

Secondly, you are saying the configuration code (and maybe the main sketch as well) is not well written (and maybe even not working).

It's not badly written, it's just not that pretty code. But it works OK if you do the same thing as the original author. If you change a component you either should know what that means to your project or you better ask in the forum.

Would you have another code I can run ?

That's not necessary, the code runs OK on the specified hardware and the described wiring.

What is the difference between a code you can run on your due and on I could run on my uno ?

jay_ar wasn't running it on a Due but on a Leonardo. The Leonardo hasn't the hardware I2C wired to pins A4 and A5 as the UNO has, that was his error. If you're using an UNO you could follow the description on the website.


Hi !

Thanks for your answer.
As you advised, I ordered pretty much all the same parts. Now I'm just waiting for them to arrive. Then I'll try that project.

I didn't know about the differences between Uno, Due and Leonardo.

Thanks and have a great day,


Hello people :)

I'm writing a (dreadly late) reply just to clarify something:

As Pylon says, I used a different Arduino (a Leonardo) to put together the circuit. However, my error was not having the I2C pins wired incorrectly, but rather the fact that the code (written for the Uno) assumes the serial connection with the PC stays on the whole time during the boot sequence. Alas, on the Leonardo this is NOT true, and as a consequence you miss that nice warning saying "please store these values because you can messup things big time". By the time the serial connection between the board and the arduino was reestablished the damage was already done (the overwriting of the parameters had failed and I didn't have the original values anywhere to restore them). I just added a "wait until serial is established" at the beginning of the code to make sure I didn't miss anything being sent to the PC... and then changed a lot of other things on the code, if just to know what was going on :) "My" code is the one listed in the original post (compare it against the original one and you'll see some minor differences).

As mentioned before, the original configuration code has a few quirks. Again, as Pylon says, the "problem" is that the coding is not the nicest one. Specifically, Melexis says not to overwrite some of the bits in one of the registers, and the codes overwrite them without making any attempt to read what was there originally. This may be Ok as long as the bits on your sensor are the same as the ones on the sensor the author had, but nothing guarantees that. Please note I did NOT correct this, because I didn't find a way to implement the CRC computation inside the arduino.

I found some other issues with the sequence the code uses to overwrite the registers, but I think it's just cosmetic.

Go Up