Digital Infrared Temperature Sensor EEPROM emissivity

[i]Hi,

I have just filled a problem report on GitHub regarding the change of emissivity of the MLX90615 in the EEPROM. I’m sorry I’m not able to copy the link here (I’m a new user), so I duplicate it…[/i]


Hi,

I’m playing with the emissivity which can be configured in the EEPROM of the MLX90615, and there is something strange when I try to modify it: it doesn’t seem to change, unless I zero-out the configuration prior to setting the new value.

Here are the details: let’s say the MLX90615 is configured with the defaults (1.0 emissivity): a call to readEEPROM shows in the console

eepromData: 0x4000

Fine. Now let’s try to set the emissivity to 0.98, with the following code:


float emissivity = 0.98;
uint16_t emissivity_internal;

emissivity_internal = uint16_t(16384*emissivity);

mlx90615.writeEEPROM(emissivity_internal);
mlx90615.readEEPROM();

I’m expecting in this case an eepromData: 0x3EB8, but no, I keep on reading an eepromData: 0x4000, even if I call this code several times.

Things work as expected only if I zero-out the emissivity prior to trying to set it to 0.98 for example. This workaround apparently works fine:


float emissivity = 0.98;
uint16_t emissivity_internal;

emissivity_internal = uint16_t(16384*emissivity);

mlx90615.writeEEPROM(0);
delay(500);

mlx90615.writeEEPROM(emissivity_internal);
mlx90615.readEEPROM();

Note the call to delay which is necessary between two calls to writeEEPROM.

Do you have the same problem with other chips? I’m using your grove sensor.