/iot_thermometer

Making a contactless infrared temperature measurement using DIY arduino and sensor with the implementation of noise filtering using Kalman filter.

Primary LanguageC++

Contactless Temperature Measure

List of Items

Arduino Nano LCD I2C GY-906 Battery Pack 9v Battery Accessories
  • Wire
  • PCB
  • Case
  • Bolts and Nuts

Connection

Code

  1. Install library in Arduino IDE via Sketch → Include Library → Search for library

    • Adafruit MLX90614 Library
    • LiquidCrystal I2C
  2. Upload Arduino Code from the Repo


Kalman Filter Implementation

Algorithm

Code Implement

// Initial Value
float temp_amb = 28;
float temp_obj = 36;
float P = 1;
float Q = 0.1;
float R = 4;
float P_xz;
float P_zz;


// Kalman Filter
    // Time Update
  temp_amb = temp_amb;
  temp_obj = temp_obj;
  P = P + Q;

    // Measurement Update
  P_xz = P;
  P_zz = P + R;

  temp_amb = temp_amb + (P_xz/P_zz)*(mlx.readAmbientTempC()-temp_amb);
  temp_obj = temp_obj + (P_xz/P_zz)*(mlx.readObjectTempC()-temp_obj);

  P = P - (P_xz*P_xz)/P_zz;