In this illustration we will going to wire a Thermocouple, i2C OLED Screen and ESP8266 NodeMCU Board, as you can see the source code it is using a C Sketch code not a LUA script, if you don’t have ESP8266 integration on your Arduino IDE Please follow this link.
The MAX6675 performs cold-junction compensation and digitize the signal from a type-K thermocouple. The data is output in a 12-bit resolution, SPI compatible read only format. This conversion resolves temperatures to 0.25 Degree, allows reading as high as + 1024 degree Celsius and exhibits thermocouple accuracy of 8LSBs for temperature ranging from 0 degree to + 700 degree Celsius. This device mostly used in Industrial, Appliances, Heating, Ventilating, and air conditioning.
Configuring the correct ESP8266 Board in Arduino IDE
Component Required
- ESP8266 12E, 13 NodeMCU Board
- I2C 0.96” OLED Screen
- K TYPE MAX6675 Thermocouple
- Jumper Wires / DuPont Wires
- Solder Less / Bread Board
Wiring Guide
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
#include <max6675.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <ESP_Adafruit_SSD1306.h> #define OLED_RESET 4 int ktcSO = 12; int ktcCS = 13; int ktcCLK = 14; MAX6675 ktc(ktcCLK, ktcCS, ktcSO); Adafruit_SSD1306 display(OLED_RESET); void setup() { Serial.begin(9600); //delay(500); display.begin(SSD1306_SWITCHCAPVCC, 0x78>>1); display.display(); delay(2000); display.clearDisplay(); } void loop() { // basic readout test // // display.setTextSize(2); // display.setTextColor(WHITE); // display.setCursor(52,10); // display.print((char)223); // display.print("C = "); // display.print(ktc.readCelsius()); // display.print((char)223); // display.print("\t F = "); // display.setCursor(52,30); // display.println(ktc.readFahrenheit()); float DC = ktc.readCelsius(); // Read temperature as Celsius float DF = ktc.readFahrenheit(); Serial.print("C = "); Serial.print(ktc.readCelsius()); Serial.print("\t F = "); Serial.println(ktc.readFahrenheit()); // delay(1000); displayData(); } void displayData(){ display.setTextSize(1); display.setCursor(5,1); display.println("14CORE|THERMOCOUPLE"); display.setTextSize(2); display.setTextColor(WHITE); display.setCursor(18,20); display.print((char)248); display.print("C:"); display.print(ktc.readCelsius()); display.setCursor(18,40); display.print((char)248); display.print("F:"); display.println(ktc.readFahrenheit()); display.display(); display.clearDisplay(); } |
Nice!
How can I use the WiFi to get this info to a webbrowser?
ESP8266, ENC28J60, WIZNET, RPI, LINKIT, BAGELBONE, ANDROID, Arduino ETHERNET, etc..
?
I thought the best option would be to use integrated TCP/IP.
Cant I use the self contained SOC with integrated TCP/IP protocol stack?
I REALLY want to know how to send this data with this exact setup via WiFi to a web browser!! I am going to set this up as soon as the parts arrive on my wood stove!
hey
this script wont work for me. cant compile it
Check the code libraries required.
#include http://www.14core.com/wp-content/uploads/2016/01/Adafruit_ESP8266.zip
#include http://www.14core.com/wp-content/uploads/2016/01/Adafruit_SSD1306.zip
Hello, I’m having a big problem compiling with “delay” & “pgmspace.h” can you provide all the required compatible libs?
Integrate Properly the ESP8266 Arduino core to your IDE
Make it sure your using Arduino IDE Version 1.6
ESP8266 Arduino Core > https://github.com/esp8266/Arduino
SSD1306 > https://14core.com/wp-content/uploads/2017/11/ESP_Adafruit_SSD1306.zip
this was very interestic idea, first time i try this, got alot problem, and repeat couple time, and got succed,
can u help me how if i want to cobine this with blynk? soo i can monitor via blynk app. thanks
can use 2 max6675 on one nodemcu?
Yes, daniel.. its uses ESP8266 see the pinout diagram of your nodeMCU should be connected to Analog Pin.
Will this configuration work with a type T thermocouple?
Will this configuration work with a type T thermocouple? UK