---
disqus: ahb0222
GA : G-VF9ZT413CG
---
# Arduino 自製回流焊加熱台
> [color=#40f1ef][name=LHB阿好伯, 2021/07/16][:earth_africa:](https://www.facebook.com/LHB0222/)
###### tags: `Arduino` `創客`
[TOC]
最近在自製電路板過程中嘗試了鋼網與錫膏的使用
發現加熱板的費用至少都是1000元起跳
後來發現一種LED用的拆焊板
便宜的大約300元而已
利用max6675讀取K-type溫度計數值
搭配繼電器控制加熱開關
等待三分鐘就可以得到一個完美的作品XD
整組費用不到500元超划算
使用SSD1306做顯示
添加按鍵可以用於控制溫度
接線圖與相關程式碼就放在下方有興趣的也可以自己組裝來玩
其中熱電偶是有分正負極
簡單的辨別方法為 K- ype的負極可被磁鐵吸引
## 成品

## 接線圖

## 程式碼
```cpp=
#include "max6675.h"
//max6675接腳定義
int thermoDO = 22;
int thermoCS = 2;
int thermoCLK = 18;
int C_PIN = 33;
int E_PIN = 32;
int Encoder_Count = 180;
MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
#include <SPI.h>
#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
// 設定OLED
#define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin)
#define SCREEN_ADDRESS 0x3C
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
void setup() {
Serial.begin(9600);
Serial.println("MAX6675 test");
// wait for MAX chip to stabilize
delay(500);
pinMode(5, OUTPUT);
pinMode (A_PIN, INPUT_PULLUP);
pinMode (C_PIN, INPUT_PULLUP);
pinMode (E_PIN, INPUT_PULLUP);
if(!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;); // Don't proceed, loop forever
}
display.clearDisplay();
display.setTextSize(2); // 設定文字大小
display.setTextColor(1); // 1:OLED預設的顏色(這個會依該OLED的顏色來決定)
display.setCursor(5,0); // 設定起始座標
display.print("Hello Word!"); // 要顯示的字串
display.display(); // 要有這行才會把文字顯示出來
delay(1000);
}
void loop() {
if (digitalRead(C_PIN) == 0){
Encoder_Count ++;
Serial.println(Encoder_Count);
}
if(digitalRead(E_PIN) == 0){
Encoder_Count --;
Serial.println(Encoder_Count);
}
Serial.print("C = ");
Serial.println(thermocouple.readCelsius());
Serial.print("F = ");
Serial.println(thermocouple.readFahrenheit());
if(thermocouple.readCelsius()<Encoder_Count-5){ //設定溫度
digitalWrite(5,HIGH);
Serial.println("加熱");
display.clearDisplay();
display.setTextSize(2); // 設定文字大小
display.setTextColor(1); // 1:OLED預設的顏色(這個會依該OLED的顏色來決定)
display.setCursor(5,0); // 設定起始座標
display.print(thermocouple.readCelsius()); // 要顯示的字串
display.setCursor(5,20); // 設定起始座標
display.print("to->"); // 要顯示的字串
display.print(Encoder_Count); // 要顯示的字串
display.setCursor(5,40); // 設定起始座標
display.print("Heating"); // 要顯示的字串
display.display(); // 要有這行才會把文字顯示出來
}else{
digitalWrite(5,LOW);
Serial.println("降溫");
display.clearDisplay();
display.setTextSize(2); // 設定文字大小
display.setTextColor(1); // 1:OLED預設的顏色(這個會依該OLED的顏色來決定)
display.setCursor(5,0); // 設定起始座標
display.print(thermocouple.readCelsius()); // 要顯示的字串
display.setCursor(5,20); // 設定起始座標
display.print("to->"); // 要顯示的字串
display.print(Encoder_Count); // 要顯示的字串
display.setCursor(5,40); // 設定起始座標
display.print("Cool down"); // 要顯示的字串
display.display(); // 要有這行才會把文字顯示出來
}
delay(400);
}
```
可使用銅柱墊高加熱版避免燒桌子

# 熱敏電阻計算器
https://www.thinksrs.com/downloads/programs/therm%20calc/ntccalibrator/ntccalculator.html
🌟全文可以至下方連結觀看或是補充
全文分享至
https://www.facebook.com/LHB0222/
https://www.instagram.com/ahb0222/
有疑問想討論的都歡迎於下方留言
喜歡的幫我分享給所有的朋友 \o/
有所錯誤歡迎指教
# [:page_with_curl: 全部文章列表](https://hackmd.io/@LHB-0222/AllWritings)
