I'm trying to narrow the field of view of AAA version of MLX90614. My purpose is to detect a person from ~1 to 2meters.
I've been monkeying around with the writable area in EEPROM. Only time it 'worked' for my problem was by accident. Sometimes when one writes the EEPROM it works with totally incorrect values until it's restarted. But those incorrect values were great! It could detect a person from about 2 meters, with weird values like: -200 C degrees for "no-person" and -130 C degrees for a "person in view", point is the range is big enough to make a decision.
I don't think I need the lens here. Ideally I would like to get EEPROM dump of MLX90614xCC, it's best suited for my application. Maybe if I can just configure the EEPROM differently this AAA version will work just fine.
Can anyone dump full EEPROM of narrower field of view version? I found a partial dump from other post by jay_ar.
Partial dump of MLX90614ESF-BCI (5 degree FOV) EEPROM by jay_ar:
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F
9993 62E3 0201 F71C FFFF 9F75 ???? ???? ???? D15A ???? ???? ???? ???? BE5A 0800 ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ????
Full dump of my MLX90614ESF-AAA (90 degree FOV) EEPROM :
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F
9993 62E3 0201 F71C FFFF 9FB4 838C 83F1 85ED 8ACE 9C71 1100 8643 20A8 BE5A 0000 0000 7E0F 53E3 8011 0000 1D1A 00D7 34F9 0000 0000 1C4A 8011 B80B 6E94 3100 B0D2
Code to dump data (edit: tested code):
#include <i2cmaster.h>
void dumpData(int dev) {
int pec = 0;
word eeprom[32];
word data;
String row;
for (int i=0; i <= 31; i++){
i2c_start_wait(dev+I2C_WRITE);
i2c_write(0x20+i);
// read
i2c_rep_start(dev+I2C_READ);
eeprom[i] = i2c_readAck(); //Read 1 byte and then send ack
eeprom[i] += i2c_readAck() << 8; //Read 1 byte and then send ack
pec = i2c_readNak();
i2c_stop();
}
for (int i=0; i <= 31; i++) {
data = i;
row = "0x";
if (data < 16)
row += "0";
Serial.print(row);
Serial.print(data, HEX);
Serial.print(" ");
}
Serial.println("");
for (int i=0; i <= 31; i++) {
data = eeprom[i];
row = "";
if (data < 16)
row += "000";
else if (data < 256)
row += "00";
else if (data < 4096)
row += "0";
Serial.print(row);
Serial.print(data, HEX);
Serial.print(" ");
}
Serial.println("");
}
void setup(){
Serial.begin(9600);
Serial.println("MLX60914 EEPROM");
i2c_init(); //Initialise the i2c bus
PORTC = (1 << PORTC4) | (1 << PORTC5);//enable pullups
int dev = 0x5A<<1;
dumpData(dev);
}
void loop(){
delay(10000);
}