Close

extract gain values done as well using few bytes

A project log for mlx90640 sensor works w 800 bytes

Everywhere i read people are excited to get mlx90640 working. here are examples using arduino w 800bytes ram, and 1k with calibrated DEG C

jamesdanielvjamesdanielv 12/03/2018 at 08:440 Comments

gain was easier, and it is across all pixels evenly. 

i use a global variable SensorGaincommon to store value in it is a float.

void  ExtractGain(){
worddata[0]= pgm_read_word_near(factoryCalData+0x0030);//we can get this value from eeprom, faster and more reliably

if (worddata[0]> 32767){worddata[0]=worddata[0]-65536;}//per document 11.2.2.4

  SensorGaincommon=worddata[0];
  MLX90640_I2CRead(MLX90640_address, 0x070A, 1, worddata);//we get from ram

 if ( worddata[0]> 32767){worddata[0]=worddata[0]-65536;}
  SensorGaincommon=  worddata[0]/SensorGaincommon;
}

from terminal image you can see gain is calculated as well. this seems to not change much so i would say it needs to be read at least 1 time after changing analog resolution detail.

i have opted to just show 8x8 sensors (even though 32x24 is possible) using the middle of display to make finding issues and moving drivers into thermal cam project easier. after testing successfull will start making 32x24 work, probably by 16x16,24x24, and then 32x32 using an advanced interpolation method.) 

here is the math. this is same for all pixels. it also does not need to be updated that much

Discussions