Recently I have been trying to interface with the MLX90616 an infra red temperature sensor by Melexis. After reading the datasheet I have I have written a program to take the object temperature readings via the on board SMBus. Everything on my end seems to be working however the the temperature readings are taking extremely long (greater then 10 minutes) to reach the object temperature. Based on the datasheet the temperature should settle within seconds thanks to the inbuilt thermal gradient compensation. Is there some EPROM setting I have missed to turn on the thermal gradient compensation to acquire fast stable readings?
Further more has anybody had a similar experience with this sensor? I am unable to find any details of others who have used this particular sensor in the past so some details would be greatly appreciated.
I have attached the main body of my code for your reference:
I2C1_Init(50000); //I2C clock must be in the range of 10kHz to 100kHz for operation according to the SMBus specifications
//delay_ms(100); //Allow time for the SSP module to initialise
I2C1_Start();
//Sometimes if I2C read is peformed without an acknologment it can hang the I2C BUS error check on each operation is therefore necessary
if(I2C1_Wr(0xB4) == 0) //Address for a write operation to 0x5A
{
if(I2C1_Wr(0x07) == 0) //Address for RAM command to 0x7
{
I2C1_Repeated_Start();
if(I2C1_Wr(0xB5)== 0) //Address for read operation to 0x5A
{
lowerByte = I2C1_Rd(1);
upperByte = I2C1_Rd(1);
}
}
}
I2C1_Stop();
Answer
The MLX90616 does not come factory calibrated as such all the calibration co-efficients are set to zero by default. This means that the Object temperature readings will not respond to fluctuations in temperature. In order to get readings from this particular sensor a calibration procedure must first be performed and the co-efficients written to the appropriate EPROM locations. You need to contact your supplier for further details on the calibration procedures.
No comments:
Post a Comment