melexis / mlx90632-library

MLX90632 library for the Melexis 90632 Infra Red temperature sensor.
Apache License 2.0
42 stars 15 forks source link

Examples of changing refresh rate #14

Closed produceconsumerobot closed 3 years ago

produceconsumerobot commented 4 years ago

Hi, We're working with the MLX90632 and have been running into some challenges changing refresh rate. We've been following the datasheet and this application note but have been so far unsuccessful. We're unfortunately on a tight timeline to ship product to our Beta partners and were wondering if you have any code examples that change the refresh rate and performs subsequent reads at the updated rate. We're working with the SAMD21 microcontroller in c/c++, but example code in any language/environment would be super welcome. Thanks so much! Happy Holidays! -Sean

Letme commented 4 years ago

I am sorry, but I do not have any MCU examples you could use. Maybe you could explain the problems, so that we can help you debug?

produceconsumerobot commented 4 years ago

Hi @Letme, thanks for getting back to me over the holiday weekend! Perhaps @nitin710 can help describe where we are at the moment. @Letme, I noticed that the EVB90632 manual looked like it might have the ability to change the refresh rate. image We don't actually have an EVB90632 in house, but is there any chance you could link us to the source code for the EVB90632 firmware? Thanks so much! Happy Holidays! -Sean

nitin710 commented 4 years ago

Hi @Letme, We are trying to use the MLX90632 FIR sensor for object temperature detection. In the documentation, it is mentioned that the sensor can operate at different Measurement Refresh Rates(See section9.3 in the datasheet, revision 8). In a nutshell, we need to write certain values onto the Sensor EEPROM Registers(EE_MEAS1 and EE_MEAS2), which change the rate. However, we are not able to write values onto the EEPROM successfully. The datasheet does mention a sequence of operations(see Section 10.6 in datasheet, revision 8) to be followed for read/write access to the EEPROM. These guidelines have been implemented in the Library developed by Sparkfun(https://github.com/sparkfun/SparkFun_MLX90632_Arduino_Library). Please Look at the Function definition for void MLX90632::writeEEPROM(uint16_t addr, uint16_t val), in the source files. We have tried using the library created by sparkfun but we are still unable to write values onto the EEPROM successfully. Every attempt to write the values either overwrites adjacent registers, or the Write operation is just unsuccessful without throwing I2C comm errors. P.S. We have been working with MLX90632 as a slave connected to ATSAMD21. We have tried I2C on the Normal(100000KHz), Fast Mode(400000KHz) and the Fast Mode Plus(1Mhz).

Please let me know if you need any other information. Thanks.

Letme commented 4 years ago

Hi guys, So I can't really disclose that publicly, because EEPROM memory has limited number of writes (so don't just bluntly write). Since probably contacting sales over the holidays will not get you fast feedback please send me the email and I can help towards evening.

produceconsumerobot commented 4 years ago

Hi @Letme, I tried to submit via the contact form on https://crt.the-mori.com/contact/ but got an error. You can email me at info@connectedfuturelabs.com. Any help is most welcome. In case you're interested, this is what we're working on https://www.emotibit.com/. Thanks so much and Happy Holidays! Best, Sean

Letme commented 4 years ago

Hi Sean, I sent you the mail from my Melexis mail (I thought you are going to dig it out of commit messages here). Thanks for letting me know my personal website contact form does not work :)

The project seems very cool.

bmberkowitz commented 4 years ago

Hi, I'm also working with the SparkFun MLX90632 library, and also trying to adjust the refresh rate. Any luck?

Letme commented 4 years ago

@bmberkowitz send me the email please.

afleite93 commented 4 years ago

Hi @Letme i'm working with the MLX90632 on irThermo3 click but i can't change the refresh rate. Could you help me?

Letme commented 3 years ago

@sison54 contributed #22 for the get/set refresh rate functions, so we now have it inside library. Fair warning is that EEPROM has limited amount of writes, which means limited amount of setting the refresh rate. There is a check, so that we don't erase/write same value.