Arnov Sharma
Published © LGPL

Temperature Meter/Thermometer with NTC and OLED Display

Yet another temperature monitoring setup with NTC, SSD1306 OLED and NodeMCU

BeginnerFull instructions provided12 minutes997

Things used in this project

Hardware components

NodeMCU ESP8266 Breakout Board
NodeMCU ESP8266 Breakout Board
you can use any MCU, just wire the OLED to SCL and SDA of that MCU properly and alter the NTC pin in code.
×1
NTC
10K NTC marked 103
×1
oled ssd1306
×1
Pro Micro - 5V/16MHz
SparkFun Pro Micro - 5V/16MHz
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

sch

Code

Code

C/C++
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels


Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

int ThermistorPin = 0;
int Vo;
float R1 = 10000;
float logR2, R2, T, Tc;
float c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07;


void setup(){
  display.begin(SSD1306_SWITCHCAPVCC,0x3C);
  display.clearDisplay();
  Serial.begin(9600);
}

void loop(){
  Vo = analogRead(ThermistorPin);
  R2 = R1 * (1023.0 / (float)Vo - 1.0);
  logR2 = log(R2);
  T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
  Tc = T - 273.15;

  display.clearDisplay();
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.setCursor(70, 0);
  display.println("C");
  display.display();
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.setCursor(3, 0);
  display.println(Tc);
  display.display();
  delay(10);
}
  
  

Credits

Arnov Sharma

Arnov Sharma

102 projects • 160 followers
Just your average MAKER

Comments