Melexis mlx90615

Hi... I am having difficulty reading the mlx90615 sensor... Nothing I do seems to produce output. (P.S. I'm wiring it the same way as was described for the 90614.) I'm using 2 different duemilanove just to make sure either one works - with arduino v18. I also have 2 90615 sensors.

For wiring, I'm using 4.7k pullup resistors on mlx90615 leads 1 and 2 going to analog pins 5 & 4, a cap across the 2 leads 3 & 4), and using the 3.3v supply from the duemilanove. Grounds are tied.

I'm using the sample code and library from Fluery - i2cmaster, but after the setup up, it stalls after executing i2c_rep_start(dev+I2C_READ);

Has anyone been able to get this to work - and/or can help guide to me to solve this perplexing problem. I would really appreciate it.

Shoot - I just read the mlx90615 datasheet and they changed the pins!!!

So I rewired the thing:
mlx90615 lead 1 -> sda pin4
-> 4.7k -> 3.3v
lead 2 -> .1uf -> grnd
lead 3 -> scl pin5
-> 4.7k -> 3.3v
lead 4 -> vss/3.3v

Still stuck at init...

check out this site for me it worked http://wiki.wiring.co/wiki/Connecting_Infrared_Thermometer_MLX90614_to_Wiring/es

code plsss ? where is the code ?

Hi, i have problem with mlx90615 sensor and Arduino uno. The reading in output from the sensor is always the same. I think I have some problem with the I2C but I'm not sure.
Here is the code that I implement:

/////////////////////////////////////////////////
#include <i2cmaster.h>

void setup()
{
Serial.begin(115200);
Serial.println("Hello!");
i2c_init(); //Initialise the i2c bus
Serial.println("Return from i2c_init");
PORTC = (1 << PORTC4) | (1 << PORTC5);//enable pullups
}
void loop()
{
double tempFactor = 0.02; // 0.02 degrees per LSB
double tempData = 0x0000;
int frac;
float celcius=0;
int dev = 0x00<<1;
int data_low = 0;
int data_high = 0;
int pec = 0;

i2c_start_wait(dev+I2C_WRITE);
i2c_write(0x07);
i2c_rep_start(dev+I2C_READ);
data_low = i2c_readAck(); //Read 1 byte and then send ack
data_high = i2c_readAck(); //Read 1 byte and then send ack
pec = i2c_readNak();
i2c_stop();

// This masks off the error bit of the high byte, then moves it left 8 bits and adds the low byte.
tempData = (double)(((data_high & 0x007F) << 8 )+ data_low);
tempData = (tempData * tempFactor)-0.01;
tempData = tempData - 273.15;// Temperatura in gradi Celsius
//float fahrenheit = (celcius1.8) + 32;
//Serial.println(fahrenheit);
Serial.print((int)tempData); //Print temp in degrees C to serial
Serial.print(".");
tempData=tempData-(int)tempData;
frac=tempData
100;
Serial.println(frac);

delay(500);
}
////////////////////////////////////////////////////////////////

Is there anyone who can give me some advice about the error?
Thanks.

Attached the i2c library that currently I use.

twimaster.cpp (5.88 KB)

Try this new library just posted to the Playground Arduino Playground - MLX90614
This uses the Wire library. See example code for useage.

I am working on a project that uses the Melexis mlx90615 sensor and an Arduino UNO R3. I was wondering if anyone here has actually been able to use this sensor with the Uno, and if they have any sample code or libraries they could share. We have searched many forums and tried modifying a few libraries that say they are for mlx90614 with no luck. We have little experience with these kinds of libraries, so any help is appreciated.

Thanks and best wishes

This change works for me:

i2c_start_wait(0xB6);
i2c_write(0x27);

// read
i2c_rep_start(0xB7);
data_low = i2c_readAck(); //Read 1 byte and then send ack
data_high = i2c_readAck(); //Read 1 byte and then send ack
pec = i2c_readNak();
i2c_stop();