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.

This video shows the kiln dismantled of the old wiring and a first short testheating directly on the current.

Next step is to check the spirals working, resistance and the general power usage.

Power (W)Voltage (v)Current (A)Resistance (Ohm)
873.7W222.3V3.927A56.6Ohm
Measured values

With these measures I calculated the possible power when there is 240V:

Power (w)Voltage (V)Current (A)Resistance (Ohm)
1017W240V4.24A56.6Ohm
Calculated values based on the resistance and 240V.

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:

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:

  1. Installing an OS on the RPI.
  2. Wiring the thermometer, thermocouple and the RPI.
  3. Wiring the SSR with the RPI and the kiln.
  4. Installing the kiln-controller software.
  5. 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 PINNAMEFUNCTIONMentioned in JBruce wiring sheetRPI 2 B v1.1 GPIO PIN based on Jbruce wiring sheetThermometer PINSSR
VINThis 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.
YESPIN #1
3V0This is the 3.3V output from the voltage regulator, you can grab up to 100mA from this if you like
GNDcommon ground for power and logicYESPIN #9Plus pole (+)
YESGPIO-23Minus pole (-)
10SCKSerial Clock Input.

This is the SPI Clock pin, its an input to the chip.

In the MAX31855 wiring this is CLK.
YESGPIO-22
11SDOSerial 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.
YESGPIO-17
12SDISerial Data Input.

This is the Serial Data In / Microcontroller Out Sensor In pin, for data sent
from your processor to the MAX31856
YESGPIO-04
9CSChip 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.
YESGPIO-27
13FLTFAULT. 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!
8DVDDDigital Positive Supply. Bypass with a 0.1µF capacitor to DGND.
7DRDYData 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!
3T-Thermocouple Negative Input. See Table 1.YESfirst pole
4T+Thermocouple Positive Input. See Table 1.YESsecond 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)
Testing the thermocouple is showing nicely measured room temperatures.

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.

One Comment

Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.