Go Down

Topic: MLX90620 / MLX90621 - 16X4 pixel IR thermal array (Read 42799 times) previous topic - next topic

Hi guys!
In my case, it seems the program stops at i2c_start_wait()
Could you help me to solve this?

I am sure the connection is correct. I connect to arduino 3v3 and regulated to 2v6 by LM317 as suggested. I also connect 4k7 resistors to scl and sda.

Any help is really appreciated. Thanks.

=========================
void read_EEPROM_MLX90620()
{
  i2c_start_wait(MLX90620_EEPROM_WRITE);
//STOPS HERE...... :-(
=========================

Paul1989

Hey All,

  I'm using the code from reply #23 (Mr.Sparkfun himself) to read data from the MLX90620.  It works, but I'm getting data that "jumps" around - i.e. there's sometimes a variation of 5 degrees between datasets when the sensor is pointed at nothing but the ceiling.  Anyone else experience this?  This is what I mean(I changed the output to Celcius - I'm Canadian!):
Code: [Select]
[size=10pt][size=10pt][size=10pt]
27.71 27.08 26.47 27.09 27.65 27.11 27.63 24.56 26.50 26.52 24.80 26.47 24.25 27.60 25.45 25.92
25.46 27.59 26.03 26.50 26.06 26.03 27.07 27.07 27.07 27.54 26.58 24.87 24.60 25.14 24.62 25.99
26.55 26.58 28.01 26.55 26.08 25.15 27.53 27.07 25.10 27.06 26.12 25.48 26.07 27.06 26.09 25.46
27.07 26.07 28.05 27.58 27.07 25.53 26.55 27.61 25.95 24.41 25.51 27.04 24.19 26.53 25.45 26.49

23.88 24.60 23.33 24.31 24.15 23.05 22.52 21.98 23.01 26.52 23.64 24.60 25.39 24.38 24.90 25.33
22.72 24.44 24.46 22.41 22.96 23.48 22.43 23.15 23.04 26.10 23.59 27.61 23.59 25.14 23.63 24.93
23.63 23.16 23.66 23.40 24.60 25.15 25.15 23.93 23.59 25.63 27.06 25.48 23.55 25.10 23.63 24.38
23.44 24.55 22.53 21.45 24.35 23.44 22.33 23.24 23.68 26.01 24.99 23.06 23.60 22.68 22.68 22.9 [/size][/size][/size]


I'm using a buck converter to output the 2.6volts from 3.3v supplied by the an Arduino with 4.7ohm resistors on  SDL and SDA.  In the commented intro to his code, he states that the wiring should be :
A5 to 330 ohm to SCL
A4 to 330 ohm to SDA
3.3V to VDD
GND to VSS

but I've read that the readings won't be too accurate using 3.3v.  Anyone have any ideas on where I'm going wrong?   

Cheers,

Paul

Paul1989

Yup, me again,

    Just wanted to see if anyone was willing to point this idiot in the right direction/give some clues as to how to log this data with a microSD card - I've been trying to use the SD library and going off their examples, but I've put over 20 hours into working on it, and I'm about to lose my mind. My card is good and the example SD codes work, it's just a matter of getting the two hashed together.... Please, someone have some pity on this poor soul!!  I can't take it anymore!!!

P

atyndall

#48
Oct 31, 2014, 04:57 am Last Edit: Oct 31, 2014, 04:59 am by atyndall Reason: Fix URLs
Hi all,

I'm not sure who still maintains interest in this, but for a research project I am using the MLX90260 in conjunction with an Arduino, and have rewritten the code herein to use the Wire library (as I couldn't find the right version of i2cmaster) as well as to be more readable.

My code computes all the necessary values, and outputs both the computed temperatures as well as the raw values over serial.

I'm using a Diecimila, which only has 1KB SRAM, meaning I don't actually have the space for a lot of the arrays, so there is a #define MORE_MEMORY present, which when disabled computes values on the fly to save memory (but slow down the refresh rate), but when enabled will use more arrays and thus more memory.

You can find the most up to date version of the code on Github.

I'll be continuously updating it, but as of writing the code looked like this.

Looking forward to hearing peoples thoughts.

Ash

Ruffy84

Hey Guys,

i'm from germany an having some troubles to get my MLX90620 running. I apologize in advance for my english...

Ok, here is my problem: I've noticed that my temperature readings are not accurate. Also i'm having a lot of noise and i tried a lot to improve supply quality but it doesn't help.

So i took a look on every parameter and there is a problem with the parameters tgc, a_cp, b_cp and so on...

The values are:

tgc = 0
a_cp = something over 1000
b_cp = something over 1000


When tgc is zero a big part of the calculation in the formulas equals 0. Furthermore a_cp and b_cp cannot have values over 127 according to the datasheet (8bit 2's complement).

It seems that every reading out of ram of a parameter of type 2's complement ist wrong, unsigned parameters seem to be correct.


Does anybody have an idea what the problem could be?


Thanks!

marcel90

Hi all,

I'm not sure who still maintains interest in this, but for a research project I am using the MLX90260 in conjunction with an Arduino, and have rewritten the code herein to use the Wire library (as I couldn't find the right version of i2cmaster) as well as to be more readable.

My code computes all the necessary values, and outputs both the computed temperatures as well as the raw values over serial.

I'm using a Diecimila, which only has 1KB SRAM, meaning I don't actually have the space for a lot of the arrays, so there is a #define MORE_MEMORY present, which when disabled computes values on the fly to save memory (but slow down the refresh rate), but when enabled will use more arrays and thus more memory.


You can find the most up to date version of the code on Github.

I'll be continuously updating it, but as of writing the code looked like this.

Looking forward to hearing peoples thoughts.

Ash

Nice Job!

Thank you very much.
I also couldn't find the right lib.

Best regards
Marcel


atyndall

#51
Jan 07, 2015, 04:10 am Last Edit: Jan 07, 2015, 04:17 am by atyndall
A further update to my code above: I have finalized the circuit that I am using to connect the Arduino and the MLX90620. I felt uncomfortable wiring the 3.3V connection to the sensor directly, as I feared it might cause garbled data or other issues, as it is near the edge of the acceptable voltage inputs.

Instead, I've purchased an Adafruit 4-channel I2C-safe Bi-directional Logic Level Converter - BSS138 which I use in the attached circuit diagram to allow the sensor to receive the recommended 2.6V power and communication signal.

It appears to be working fine, and as been for some time, but as with all electrical work; I won't guarantee that this circuit is correct, or that it will not harm your components in some way.

(I should also note that I can't take much credit for this circuit, as it was devised by someone with a lot more knowledge than I, and I've merely translated the physical copy into this diagram)

marcel90

Hi,

I got the same problem like Ruffy84 exactly for the first 10 temperatures every measurement.

I'm using the code of atyndall in a adapted version.
 
Code: [Select]
000 000 000 000 -1285 000 -1432 000 -1499 -1149 269 302 322 314 323 277 228 208 238 260 252 266 256 284 275 273 287 297 284 255 277 258 169 215 228 218 238 242 264 238 261 233 233 297 253 252 262 234 156 177 213 212 177 191 191 211 278 223 275 246 269 228 222 197

(every value was multiplied with 10)

Any ideas why the first 10 values are going to compute wrong?


Best regards
Marcel


Hi all,
Thank you very much for your code, it has helped me a great . :D

But i have some questions:

1. I used the I2CMaster library coded by Peter Fleury (http://homepage.hispeed.ch/peterfleury/avr-software.html#libs), and not sure it can be available for this code which coded by maxbot?

2. In my case, it seems the program stops at i2c_stop() when i read eeprom data in "read_EEPROM_MLX90620" function.

3. So i comment this code"i2c_stop()" in the function ,but finally the output temperatures is error at the same positions(0,1,2,3 and 5),this position seems no data.

My platform :Arduino Mega 2560 R3.

Thank you for all your assistance.

FC.CHANG.

maxbot

I attached the code for the MLX90621 in case someone wants a quick start to work with this nice upgraded version ;)

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy