Raspberry Pi controlled ceramic kiln
In this series of articles I am sharing my experiences with building a Raspberry Pi-controlled kiln from a second hand kiln. In this initial installment, I share my process of inspecting the kiln, sourcing components, wiring, and conducting preliminary tests.
We bought a small second hand kiln, without specific maker and without manual. So I searched around for a better understanding how electric kilns work and this explanatory video was of good help. Our oven is not a huge one and, I had been told by the previous owner, it should be OK to test this on a normal power plug and capacity (16A). Since this project is purely experimental and about high currents and voltages I didn’t take this for granted. When I first plugged the kiln in I noticed it was leaking more than 30mA current. That’s dangerous and means a solid checking on the wiring and removing or replacing damaged or malfunctioning parts. Through measuring I noticed the coils were not leaking, but the old knobs and external wiring was making the leak. First step is to take out the old corroded control knobs, old cables and check the spirals.
Next step is to check the spirals working, resistance and the general power usage.
Power (W) | Voltage (v) | Current (A) | Resistance (Ohm) |
---|---|---|---|
873.7W | 222.3V | 3.927A | 56.6Ohm |
With these measures I calculated the possible power when there is 240V:
Power (w) | Voltage (V) | Current (A) | Resistance (Ohm) |
---|---|---|---|
1017W | 240V | 4.24A | 56.6Ohm |
On the dutch power network 230V (+/- 10%) is allowed. A minimum of 207V and maximum voltage of 253V can be reached. It’s already an improvement that I will make a power usage plate on the machine in case we will sell it.
Then we came up with a few resources for making an electric controlled kiln bases on a raspberry pi. This github repo helped us further to understand what is needed.
Bill of materials:
- Raspberry Pi (in our case an Raspberry Pi 2 Model B v1.1 which I already had. Newer RPI’s should be nowadays available for around €40 for instance: https://www.kiwi-electronics.com/nl/raspberry-pi-4-model-b-1gb-11017);
- MAX31855 or MAX31856 Thermocouple breakout board. We bought this type: Adafruit Universele Thermokoppel Versterker MAX31856 Breakout €20,95;
- K-Type Thermocouple: High Temperature K Type Thermocouple Sensor For Ceramic Kiln Furnac… €18,95;
- Breadboard, ribbon cable, connector for pi’s gpio pins & connecting wires;
- Solid State Relay (SSR): https://www.bitsandparts.nl/Relais-Solid-state-relais-3-32V-40A-24-380VAC-p101098 €9,95;
- Heatsink for the SSR: https://www.bitsandparts.nl/Relais-Solid-state-relais-3-32V-40A-24-380VAC-p101098 €5,95;
- Electric Kiln: we bought ours on marktplaats.nl for €250.
So for a total €345,80 and some hobby time it should be possible to make an electric raspberry pi controlled kiln.
Next steps are:
- Installing an OS on the RPI.
- Wiring the thermometer, thermocouple and the RPI.
- Wiring the SSR with the RPI and the kiln.
- Installing the kiln-controller software.
- Configuring, testing and tweaking if neccesary.
Let’s start!
Installing an OS on the Raspberry PI
For installing an OS on our Raspberry PI I chose https://www.raspberrypi.com/software/ and on our RPI 2 Model B v1.1 and installed Rasbian GNU/Linux 11 (bullseye). Steps are well described and only a SD card is needed to make it work.
Wiring the thermometer, thermocouple and the RPI
The thermometer’s sensor is located in the metal tip. The ceramic circles are for covering the distance from the outside of the kiln to the inside. The thickness of the wall is 11.4cm. The base can be shortened, the tip can stick out a few centimeters.
The thermometer has two poles. On the Adafruit MAX31856 there is a + and – pole. I connect these with the thermometer poles.
The datasheet for the MAX31856 can be found here: https://cdn-learn.adafruit.com/downloads/pdf/adafruit-max31856-thermocouple-amplifier.pdf and another version https://www.analog.com/media/en/technical-documentation/data-sheets/MAX31856.pdf
This wiring diagram from jbruce is also an input for the wiring:
A table with PIN’s, names and functional description from the datasheet combined with the README.md file on the repo from jbruce:
MAX31856 PIN | NAME | FUNCTION | Mentioned in JBruce wiring sheet | RPI 2 B v1.1 GPIO PIN based on Jbruce wiring sheet | Thermometer PIN | SSR |
---|---|---|---|---|---|---|
VIN | This is the power pin. Since the sensor chip uses 3 VDC, we have included a voltage regulator on board that will take 3-5VDC and safely convert it down. To power the board, give it the same power as the logic level of your microcontroller – e.g. for a 5V micro like Arduino, use 5V. Power-Supply Voltage in the MAX31855 and in jbruce’s documentation 3V3. | YES | PIN #1 | |||
3V0 | This is the 3.3V output from the voltage regulator, you can grab up to 100mA from this if you like | – | – | |||
GND | common ground for power and logic | YES | PIN #9 | – | Plus pole (+) | |
YES | GPIO-23 | Minus pole (-) | ||||
10 | SCK | Serial Clock Input. This is the SPI Clock pin, its an input to the chip. In the MAX31855 wiring this is CLK. | YES | GPIO-22 | – | |
11 | SDO | Serial Data Output. This is the Serial Data Out / Microcontroller In Sensor Out pin, for data sent from the MAX31856 to your processor. In the MAX31855 wiring this is called SO. | YES | GPIO-17 | – | |
12 | SDI | Serial Data Input. This is the Serial Data In / Microcontroller Out Sensor In pin, for data sent from your processor to the MAX31856 | YES | GPIO-04 | – | |
9 | CS | Chip Select. Set CS low to enable the serial interface. This is the Chip Select pin, drop it low to start an SPI transaction. Its an input to the chip. | YES | GPIO-27 | – | |
13 | FLT | FAULT. Cable, thermocouple, or temperature fault output. This is the Fault output. If you use the threshhold-notification capabilities of the MAX31856 you can monitor this pin, when it goes low there’s a fault! | – | – | – | |
8 | DVDD | Digital Positive Supply. Bypass with a 0.1µF capacitor to DGND. | – | – | – | |
7 | DRDY | Data Ready Output. This pin is used for advanced uses where you tell the sensor to begin a reading and then wait for this pin to go low. We don’t use it in our library code because we keep it simple with a delay/wait, but it is available in case you need it! | – | – | – | |
3 | T- | Thermocouple Negative Input. See Table 1. | YES | – | first pole | |
4 | T+ | Thermocouple Positive Input. See Table 1. | YES | – | second pole |
Testing the wiring and working of the thermocouple
A first quick attempt to install the jbruce master repo, adjusting the config.py file, resulted in bad temperature values. At this point I was confused about the right wiring and the differences between SPI, BCM, several RPi PIN-extension boards with their own ways of numbering and PIN numbering. To get a better understanding of the matter, I chose to get to the sources of information and search for working code for my raspberry pi. First of all: the Raspberry PI 2 B v1.1 GPIO overview from: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html :
Double-check with the above information all the connections between the Raspberry Pi and the MAX31856:
- VCC to 3.3V on the Raspberry Pi.
- GND to Ground.
- SDI to MOSI (GPIO 10).
- SDO to MISO (GPIO 9).
- CLK to SCLK (GPIO 11).
- CS to a GPIO pin (noted in your script as GPIO 5, make sure this matches your physical connection).
Filling this in for the MAX31856, the RPi and the thermometer then looks like this:
Testing the wiring and PIN configuration
For testing the wiring I used a voltage meter for the 3V3 pin. The other pins are connected properly visually, let’s now see if the software can read the temperature in this configuration. For testing purposes I ran a small python script. Install the neccessary packages with this command in your environment:
pip install adafruit-circuitpython-max31856 Adafruit-Blinka
And continue with running this script:
# Read and print the temperature from the MAX31856 thermocouple
# on a Raspberry Pi 2 model B v1.1
import board
import digitalio
import adafruit_max31856
# VCC to 3.3V on the Raspberry Pi
# GND to Ground
# SDI to MOSI (GPIO 10)
# SDO to MISO (GPIO 9)
# CLK to SCLK (GPIO 11)
# CS to a GPIO pin (GPIO 5)
try:
# SPI and CS (Chip Select) setup
spi = board.SPI()
cs = digitalio.DigitalInOut(board.D5)
# MAX31856 thermocouple setup
thermocouple = adafruit_max31856.MAX31856(spi, cs)
# Read and print the temperature
temperature = thermocouple.temperature
print('Temperature: {} degrees C'.format(temperature))
except Exception as e:
print("An error occurred:", e)
Concluding this part
As I conclude this first post in our series on building a Raspberry Pi-controlled ceramic kiln, I’ve taken you through the initial steps of examining and preparing a second-hand kiln for modernization. I have dissected the kiln’s original components, calculated its power requirements, and gathered all the necessary hardware, including a Raspberry Pi, thermocouple, and solid-state relay.
This journey has been both informative and hands-on, laying a solid groundwork for anyone interested in retrofitting old machinery with new technology. A robust base has been set up for the next stages, which will be crucial as we move towards full automation of the kiln’s operations.
In the upcoming posts, I will delve deeper into the software side of things, focusing on installing and configuring the kiln-controller software to achieve the precise temperature control necessary for ceramics. The next phase will involve fine-tuning our system to ensure it is reliable and efficient.
You can find here the next post.