Arnov Sharma
Published © MIT

PCB Hotplate Slightly Bigger Edition

Made V2 of my previously created PCB Mini Hotplate Project with a bigger reflow surface and XIAO Board

BeginnerFull instructions provided2 hours862
PCB Hotplate Slightly Bigger Edition

Things used in this project

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;
const int Mosfet = 2; 
const int threshold = 210;//cuttoff temp

int Vo;
float R1 = 12000;
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);
  pinMode(Mosfet, OUTPUT);
  digitalWrite(Mosfet, HIGH);
  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)) -273.5;
 // Tc = T - 273.15;
  Serial.println(T);
  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(T);
  display.display();
  delay(1);

  if (T > threshold) {
    digitalWrite(Mosfet, LOW);
  } else {
    digitalWrite(Mosfet, HIGH);
  }



}
  
  

Credits

Arnov Sharma

Arnov Sharma

270 projects • 281 followers
Just your average MAKER

Comments