Arduinoでリフロー炉を作る(3) - 実験 -
熱電対のプローブを断線させてしまったようなので秋月で新しいものを買ってきました。400円なりー。
オーブン本体に手を入れる前に少し実験。
実験環境はこんな感じ。オーブンにどの程度の加温能力があるかを調べます。
実験の結果はこうなりました。横軸は時間なのですが目盛りが1進むたびに100ms経過しています。
0~850くらいまでがヒーターをオンにしている部分です。 かなりリニアに温度が上昇しているのがわかります。余裕で200℃以上加温できるのには正直驚きました。Pbフリーはんだにも対応できそうです。
冷却に難がありそうですがそこまでいうのは贅沢でしょう。いずれファンとかを追加してみようと思います。
実験に使ったスケッチはこれ。
#include <SPI.h> #define SLAVE 10 int time = 0; void setup() { pinMode(SLAVE, OUTPUT); digitalWrite(SLAVE, HIGH); Serial.begin(9600); SPI.begin(); SPI.setBitOrder(MSBFIRST); SPI.setClockDivider(SPI_CLOCK_DIV4); SPI.setDataMode(SPI_MODE0); } void loop() { unsigned int thermocouple; // 14-Bit Thermocouple Temperature Data + 2-Bit unsigned int internal; // 12-Bit Internal Temperature Data + 4-Bit double disp; // display value delay(100); digitalWrite(SLAVE, LOW); // Enable the chip thermocouple = (unsigned int)SPI.transfer(0x00) << 8; // Read high byte thermocouple thermocouple |= (unsigned int)SPI.transfer(0x00); // Read low byte thermocouple internal = (unsigned int)SPI.transfer(0x00) << 8; // Read high byte internal internal |= (unsigned int)SPI.transfer(0x00); // Read low byte internal digitalWrite(SLAVE, HIGH); // Disable the chip if ((thermocouple & 0x0001) != 0) { Serial.println("ERROR: "); } else { if ((thermocouple & 0x8000) == 0) { // above 0 Degrees Celsius disp = (thermocouple >> 2) * 0.25; } else { // below zero disp = (0x3fff - (thermocouple >> 2) + 1) * -0.25; } char str[16]; char temp[16]; sprintf(str, "%d, %s", time, dtostrf(disp, 5, 2, temp)); Serial.println(str); time++; } }
スイッチサイエンスさんが公開しているサンプルスケッチを少し改造したものです。