Close

double sample resolution of sensor to 64x48

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 08/08/2019 at 19:040 Comments

i've been working on other projects, and now have time again to go back to this one. there are several things that i still need to address, and they all require verification with original functions.

i'm using a 3.2 teensy (arm with 64k or ram) to verify modified equations and methods and check them from the original. https://github.com/jamesdanielv/thermal_cam_mlx90640 look in updates folder. this code had more features than original code such as changing from continuous to static mode, and ability of changing hz to 64hz (however code seems to only work to 32hz, think it is limitation of speed of i2c,  and method of data extraction)

i have a static value of NEWMETHOD true, or NEWMETHOD false to determine if code is to use new methods, or old methods. (it is currently being worked on and code is being migrated over )

one of the new features is the ability to output to terminal at 64x48 resolution. so you can test if sensor is working.

there are several reasons mlx90640 sensor dev has issues, primarily it is the typo's and errors in documentation,  the documentation includes examples show hex swaps of wrong bytes, and addresses that even in the same sample are of different ram or rom locations for pulling specific values. also it is not clear that some of the uint16_t conversions are of data stored into a int, and the conversion to correct the data is in some cases inverted. so i am relying on testing of functional (but overly complex code) to compare all data sets to my code.

for example you can take cal data sore it in an uint16_t and move values into a float or a signed word

or take cal data and move it directly into a signed word, and modify values to get correct data

either method can get data from cal storage in eprom, just using the incorrect method will invert the answer.

i will eventually reduce memory usage down to about 1k of ram.

the way the original code processes data is overkill for simple processors. 

my goal is to first get it to work on atmega 1280 with 8k of ram, and then on Arduino uno, and with 4x resolution! (128x96) 

for example here is double resolution using the same amount of memory as original code.

Discussions