Mlx90614 sensor gives only 1037.55 as readings

Hi everyone,

I'm building a project using an ESP8266 and mlx90614 temperature sensor. My problem is that I get a reading of 1037.55 as object temperature when the firebase is connected, but I get correct readings when it is not connected to the firebase.
My pins are connected as
VIN -> 3V
GND -> G
SDA -> D2
SCL -> D1
I have attached my code below.

#include "FirebaseESP8266.h"
#include <ESP8266WiFi.h>
#include <Wire.h>
#include <Adafruit_MLX90614.h>

Adafruit_MLX90614 mlx = Adafruit_MLX90614();

#define FIREBASE_HOST ""
#define FIREBASE_AUTH  ""
#define WIFI_SSID  ""
#define WIFI_PASSWORD ""

FirebaseData firebaseData;
double objTemp;


void setup() {
  Serial.begin(115200);
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  Serial.print("Connecting to wifi");
  while(WiFi.status() != WL_CONNECTED){
    Serial.print(".");
  }
  Serial.println();
  Serial.print("Connected with IP: ");
  Serial.println(WiFi.localIP());
  Serial.println();

  Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);

  mlx.begin();
}

void loop() {

    objTemp = mlx.readObjectTempC();
    Serial.print(objTemp);
    Serial.println(" *C");
    Firebase.setString(firebaseData, "/MLX/temp", objTemp);
    delay (3000);
  }

dfdd

This is the sensor I'm using.
I really appreciate the help and thank you in advance.

That might be a power supply problem. Are you using the 3V version of the MLX90614, as required? Also, beware of counterfeit sensors.

Hi.. Thanks a lot for the response. The issue was with the sensor. I bought a new one, and it worked properly.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.