A basic temperature control example that uses: * K-Type thermocouple * MAX31855 board * Arduino Nano * Solid State Relay * PID algorithm
|
2 tahun lalu | |
---|---|---|
docs | 2 tahun lalu | |
libraries | 4 tahun lalu | |
src | 2 tahun lalu | |
README.md | 2 tahun lalu |
A basic temperature control example that reads in a temperature via a K-Type thermocouple sensor. The volt output of the sensor is processed by an MAX31855 board and read out by an Arduino Nano. The so gained temperature value is given out to the serial console of the Arduino Nano. On an output pin of the arduino nano a Solid State Relay (SSR) is connected. A PID controller is switching the SSR till the given target temperature is reached.
Hardware
Software
Install the newest Arduino IDE from https://www.arduino.cc/en/main/software (version 1.8.13 at time of writing).
If you need help using Arduino have a look at www.arduino.cc/en/Guide/HomePage.
Open "Menu->Sketch->Include Libraries->Manage Libraries.." in the Arduino IDE and install the following libraries:
1. K Type Thermocouple
A thermocouple is a kind of temperature sensor, simply made by welding together two metal wires. Because of a physical effect of two joined metals, there is a slight but measurable voltage across the wires that increases with temperature (Seebeck-Effekt). The main advantage of using a thermocouple is the high temperature range (our K type: -200°C to 1200°C). A difficulty in using them is that the voltage to be measured is very small, with changes of about 50 uV per °C. To solve this we are using a thermocouple interface chip (MAX31855K) to measure the voltage between the wires. If you find that the thermocouple temperature goes down instead of up when heated, when connecting the K type thermocouples with the MAX31855K, try swapping the red and yellow wires.
2. MAX31855K
The MAX31855K is a chip that converts the voltage output of the thermocouple to a digital temperature value that is read out via SPI protocol. The first assembly step is creating a reliable, electrical connection from the MAX31855K breakout board to your Arduino. We chose to use a breakout board because we wanted to connect it to a bread board. The hookup is fairly straightforward. Connect the Arduino, MAX31855K and thermocouple as described in the Fritzing wiring diagram.
3. Arduino nano
The Arduino nano communicates with the MAX31855K through SPI protocol. For further details see next point.
4. SPI protocol
The SPI is a fast synchronous protocol that tipically uses 4 pins for communication, wiz. MISO, MOSI, SCK, and SS. These pins are directly related to the SPI bus interface.
1. MISO – MISO stands for Master In Slave Out. MISO is the input pin for Master AVR, and output pin for Slave AVR device. Data transfer from Slave to Master takes place through this channel.
2. MOSI – MOSI stands for Master Out Slave In. This pin is the output pin for Master and input pin for Slave. Data transfer from Master to Slave takes place through this channel.
3. SCK – This is the SPI clock line (since SPI is a synchronous communication).
4. SS – This stands for Slave Select.
5. PID controller
PID Controller is a most common control algorithm used in industrial automation & applications. PID controllers are used for precise and accurate control of various parameters. Most often these are used for the regulation of temperature, pressure, speed, flow and other process variables. For in depth information about how PID controller work see reference section.
Distributed under the GNU LGPL v.3.0.