IR Temperature Sensor IoT for Industries.

7.7K4514

Intro: IR Temperature Sensor IoT for Industries.

Hi all. My project is based on real time temperature monitoring using Infra Red Temperature sensor and Nodemcu module. I used Adafruit IO for the dash board. This is to be made into a product and sold to industries which has furnaces, heater, or Milk and Dairy industries which include pasteurization. I tested it in a plastic molding industry and got good feedbacks. Now I'm working on to increase the features according to the need of industries. The main use of IR temperature sensor is it is non contact . So there is no need of the sensor to be in contact with the object.

STEP 1: Materials Used:

  1. IR temperature sensor. I used MLX90614 sensor module.
  2. Nodemcu version 1.0.
  3. TP4056 charger module.
  4. 3.7v 1200mah lipo battery.
  5. jumper wires.
  6. Enclosure. ( I have attached it as .stl file. You can download it to print.)

STEP 2: Connecting the Materials:

The connections are as shown in the image.

Nodemcu MLX90614

3v3 to Vdd

Gnd to Gnd

SCL to D1

SDA to D2

TP4056 Battery

B+ to +ve of battery

B- to -ve of battery

TP4056 Nodemcu

out+ to Vin

out- to Gnd

STEP 3: Adafruit IO Account:

To set up a new Adafruit IO account, click here for brief instructions.

STEP 4: Coding:

  • I used Arduino IDE to program the Nodemcu. To code the Nodemcu, you need to download ESP8266 board library from the boards manager.I have attached the required libraries at the bottom along with the driver cp2901. Also the code for the project is attached with the libraries.
  • MQTT is the library to access Adafruit IO
  • MLX90614 is library for the IR temperature sensor.
  • In the code, you have to enter you AIO user name and AIO secret key in

#define AIO_USERNAME "your AIO user name"

#define AIO_KEY "your secret AIO key"

  1. To change the unit of temperature to degree Celsius, go to therm.setUnit(TEMP_F), and change TEMP_F to TEMP_C in the coding.
  • If you have any doubts in coding, don't hesitate to leave a comment.


STEP 5: Setting Up the Adafruit IO Dashboard:

To access the dash board you need to create a new feed. So Create a new feed named temperature. I created it as temperature because it is used in the code as temperature. So see to it that you create the both with same names. After creating a new feed, create a new dashboard. I have used gauges and a graph to view the temperature feed. You can just check my dashboard by clicking the link https://io.adafruit.com/prasannaakumar/dashboards/temperature . The best part of Adafruit IO is you can download the data from the time you created the feed. You can also link your AIO with IFTTT to alert you with mails and messages. To access ITFTTT click here.

STEP 6: The Result:


I have attached some screenshots of the output test we have run in a plastic industry along a video which was recorded. I got better results and good feed backs from the employees who used analog meters earlier and are eager to use this method. So I'm eager to get your feed backs. So please leave a comment if you have any feed back or issues. Thank you.

11 Comments

please help me I have this error

Arduino: 1.8.13 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"
In file included from C:\Users\legion\Documents\Arduino\libraries\SparkFun_MLX90614_Arduino_Library-master\src\SparkFunMLX90614.cpp:17:0:
C:\Users\legion\Documents\Arduino\libraries\SparkFun_MLX90614_Arduino_Library-master\src\SparkFunMLX90614.cpp: In member function 'uint8_t IRTherm::sleep()':
C:\Users\legion\Documents\Arduino\libraries\SparkFun_MLX90614_Arduino_Library-master\src/SparkFunMLX90614.h:30:47: error: 'digitalPinToPinName' was not declared in this scope
#define SCL (digitalPinToPinName(PIN_WIRE_SCL))
^
C:\Users\legion\Documents\Arduino\libraries\SparkFun_MLX90614_Arduino_Library-master\src\SparkFunMLX90614.cpp:276:10: note: in expansion of macro 'SCL'
pinMode(SCL, OUTPUT);
^
C:\Users\legion\Documents\Arduino\libraries\SparkFun_MLX90614_Arduino_Library-master\src\SparkFunMLX90614.cpp: In member function 'uint8_t IRTherm::wake()':
C:\Users\legion\Documents\Arduino\libraries\SparkFun_MLX90614_Arduino_Library-master\src/SparkFunMLX90614.h:30:47: error: 'digitalPinToPinName' was not declared in this scope
#define SCL (digitalPinToPinName(PIN_WIRE_SCL))
^
C:\Users\legion\Documents\Arduino\libraries\SparkFun_MLX90614_Arduino_Library-master\src\SparkFunMLX90614.cpp:285:10: note: in expansion of macro 'SCL'
pinMode(SCL, INPUT); // SCL high
^
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

is it possible to make an enclosure to the infrared sensor so that it can be water proof?? like a thin transparent glass on the end ?..will it affect the measurement? or it will just pass through to measure the temperature? thanks alot

That's a neat setup, I want to set one up in the greenhouse tied to the fan so it will turn on when it gets too hot. :)

Hi,

It would be great idea. You can also connect a humidity sensor with it.

Connect the fan with a relay and access it through AIO. If you have any issues, just comment.

Thank you.

Sir I have max30100 how to connect it with this and also how to get sensor reading in iot please help me out
Of course Swansong. You can just attach a fand along with a relay so that you can control it from the AIO dashboard or automatically trigger it. Also in green house, it is good to use humidity sensor dht22 along with the IR temperature sensor.
Thank you.
Hi, It´s my first time with IoT projects and I have this error:
"
C:\Program Files (x86)\Arduino\libraries\SparkFun_MLX90614\src\SparkFunMLX90614.cpp: In member function 'uint8_t IRTherm::wake()':
C:\Program Files (x86)\Arduino\libraries\SparkFun_MLX90614\src\SparkFunMLX90614.cpp:284:7: error: 'class TwoWire' has no member named 'end'
Wire.end(); // stop i2c bus to send wake up request via digital pins
^
exit status 1
Error compilando para la tarjeta NodeMCU 1.0 (ESP-12E Module).
"
Hope someone could help me.
great project! out of curiosity, what is the range on that sensor?

https://www.sparkfun.com/datasheets/Sensors/Temperature/MLX90614_rev001.pdf

Hi,

I have mention the data sheet of mlx90614 sensor. Actually the range of the sensor is FoV i.e; Field of View (as mentioned in the data sheet).

If you have further clarification just comment again.

Thank you.