Build a Web Enabled High Temperature Kiln Controller

8,055

18

49

Introduction: Build a Web Enabled High Temperature Kiln Controller

About: dabbler in many things, pays the bills working as I.T. support officer on a blue water research vessel

Turns a Raspberry Pi into a cheap, universal & web-enabled kiln Controller.

I used this to add a firing schedule control to a little pottery kiln I picked up second hand. The kiln is 10A/240V rated to 1000 degrees C. It has a door switch and a basic thermostat which allows for 25%, 50%, 75% or 100% power but no timer, which means constant monitoring if you want to ramp the temperature up slowly or soak the wares at any point. With the kilnController I can now set it up for a bisque or low temperature glaze firing and leave it to its own devices, checking progress every now and then on my mobile phone or PC.

Step 1: Hardware

  1. Raspberry Pi Zero W running Raspbian. Any pi will do but the zeros are the cheapest at about $15 here in Australia
  2. MAX 31855 Cold-Junction K-Type Thermocouple (about $6 on eBay)
  3. K-Type Thermocouple Sensor -100°C to 1250°C ($3 on eBay)
  4. Solid State Relay Module SSR-25DA 25A /250V 3-32V DC Input 24-380VAC Output (again, about $6 on eBay)
  5. Half a dozen bits of wire
  6. A tupperware box to house it all

To put it all together you'll need a soldering iron, screw drivers and some wire cutters

Step 2: Wiring Up the Thermocouple

MAX31855 to Raspberry Pi

Vin not connected

3Vo to Pin 1 (3.3v DC)

GND to Pin 9 (Ground)

DO to Pin 11 (GPIO 17)

CS to Pin 13 (GPIO 27)

CLK to Pin 15 (GPIO 22)

DO (data out) is an output from the MAX31855 (input to the microcontroller) which carries each bit of data

CS (chip select) is an input to the MAX31855 (output from the microcontroller) which tells the chip when its time to read the thermocouple data.

CLK (clock) is an input to the MAX31855 (output from microcontroller) which indicates when to present another bit of data

For this project I've used the MAX31855 python library from https://github.com/Tuckie/max31855.

Thermocouple sensor to MAX31855

The MAX31855's terminals are marked 'Yellow +' and 'Red -', but my thermocouple sensor came with red and black wires, each with a little tab on the end. If you have the same sort of sensor, you'll need to put the red wire into the 'Yellow +' terminal, and the black one into the 'Red -' terminal.

While you can cut the terminations off the ends of each wire, I don't recommend it, as the insulation will unravel, leading to possible short circuits. Connect the tabs as shown in the picture above and everything should be sweet.


For now we've done enough wiring up to be able to start testing. But first, we'll need to install the web interface on the Pi...

Step 3: Installing the Web Interface Software on the Raspberry Pi

I built my controller on a 16GB SD card with raspbian installed but all the software would fit on an 8GB card if that's what you've got (df -h is showing less than 5GB of files).

After getting raspbian installed and connecting to your wireless network, run the following commands in a terminal on the pi:

sudo apt-get install python-pip python-dev libevent-dev git
sudo pip install ez-setup
sudo pip install greenlet bottle gevent gevent-websocket
git clone https://github.com/botheredbybees/kilnController

Just about ready to start, but first get the IP address of your Pi by typing the following command in your terminal session:

ifconfig

Write down the IP address for your wlan0 connection. It should look something like: 192.168.1.91 (the last couple of numbers might be different)

Note: kilnController is a forked and then modified version of the reflow oven project: picoReflow which I found out about through a blog post on succulent ceramics. Because the original project was for a solder reflow oven, it had quite a bit of code for for driving cooling fans and monitoring a door switch. I didn't need these for my project, but the code's still there (commented out) if you feel the need for a cooling fan. I added more code so that it would display nicely on my mobile phone.

Step 4: Running the Web Server and Testing the Thermocouple

Time to start the web server. Type the following into your terminal window:

cd kilnController
python kilncontrollerd.py

You should see a couple of lines saying something like:

2019-01-10 21:49:20,006 INFO kilncontrollerd: Starting kilncontrollerd
2019-01-10 21:49:20,024 INFO oven: import MAX31855
2019-01-10 21:49:20,036 INFO oven: init MAX31855
2019-01-10 21:49:20,074 INFO kilncontrollerd: listening on 0.0.0.0:8081

Now, go to a mobile phone or computer that's using the same wireless network as the pi. Open a web browser and enter the IP address you wrote down earlier, followed by a colon and the port number 8081. For example: 192.168.1.91:8081

After a short wait you should see the temperature displayed on the top left of the web page. Warm up the thermocouple sensor by holding it in your hand or putting it on a lamp or a soldering iron. You should see the temperature increasing at 1 second intervals.

Step 5: Wiring Up the Solid State Relay

So far no-one would be hurt if you got things wrong, but this step involves electricity at voltages and currents that could kill you if not handled properly, so please be careful. Make sure that nothing is plugged in while you work on the circuit and that there are no exposed wires or short circuits when you start using it on the kiln. I put my project inside a plastic box that I had sitting around (but I'm thinking that I might make a nice ceramic container now that I have the kiln running again :)

The solid state relay (SSR) turns the power to the kiln on and off. For my setup I wired in a short extension cord and plugged the kiln into that. I did this by carefully removing the outer insulator just behind the female socket on the power cord. Then I cut through the active wire and connected the ends to terminals 1 and 2 on the SSR. The Active wire (high potential) is coloured brown here in Australia (used to be red).

Connect pin 16 on the Pi (GPIO 23) to the '+' terminal on the SSR (terminal 3) and pin 6 on the Pi (Ground) to terminal 2 on the SSR.

Note: the SSR can get quite hot when in operation so you might want to put it on a heat sink. I sit my plastic box on a tin can when firing.

Danger image: public domain from Max Pixel

Step 6: Final Test

One last test before we can use our kiln controller in anger.

Plug a desk lamp into the controller. Plug the other end into a wall socket. Watch for any obvious signs of problems (the smoke getting out of components, funny smells etc.), if all is going well tun on the lamp and rest the thermocouple sensor on the lamp's bulb. At this stage the lamp should not be illuminated.

If it's not already running, start up the kiln controller software on the pi. Select a profile and click on 'Start' on the top right and then on the 'Start the firing' button on the Firing Overview modal.

Now, the bisque profile I've set up has a start temperature of 30 degrees Celsius. I live in Tasmania, where it's almost always cooler than that so the controller should immediately turn on the lamp to warm up the sensor. If you live in a warmer clime you might have to wait a while until the profile calls for something higher than your current ambient temperature. Either way, if everything's working to plan, you'll eventually see the light turn on and a 'kiln on' icon light up on the interface.

Leave it running for a while and you'll see the lamp turn on and off while the controller tracks the temperature profile.

Click on the 'Stop' button on the top left when you're done and go forth and fire up your kiln!

4 People Made This Project!

Recommendations

  • Sewing Challenge

    Sewing Challenge
  • Laser Challenge

    Laser Challenge
  • Organization Contest

    Organization Contest

49 Comments

0
peakrock
peakrock

Question 5 months ago

Thanks for posting this up. I've got the controller running using a Raspberry Pi zero W but I can't get a stable sensor temperature despite trying two different K type thermocouples and two different max31855 boards. The sensor temperature it shows is way higher than the actual temperature - like 80C when to room is 25C and can then suddenly jump from 100C.. I've also tried a different USB power supply to the PI but no joy. The thermocouple boards are not physically identical to the one in this guide but do say MAX31855 on them..

Thx for any help....

0
peakrock
peakrock

Answer 5 months ago

I looked into this further and the problem is that the MAX31855 breakout boards I've been using only break the chip out, there are no other components such as capacitors etc on the board. Without these components, the thermocouple reading can drift substantially and be inaccurate... I sourced another another board which looks identical to the one used in this article with the same number of components etc and the temperature reading from the sensor is now steady and reacts to heat/cold as you'd expect. This is the board I used: https://shop.pimoroni.com/products/adafruit-thermo...
It's nearly 3 times the price of the other boards I got from eBay but solved the problem. Now onto testing the SSR etc...

0
Wubbington
Wubbington

Tip 10 months ago

Great project. I had a frustrating time with GEVENT. It installed OK but then when I ran the .py code it threw up 'gevent module not found'. The solution was to use
sudo apt install python-gevent
and
sudo apt install python-gevent-websocket

Thanks

0
ranouf
ranouf

Question 11 months ago on Step 1

Hi,

You suggested to use a soldering tool. Where do I need it? I don't have one at home, and I was not sure If I really need one. On the pictures, I can only see wires using connector like this:
https://www.amazon.ca/-/fr/gp/product/B08151TQHG/r...
or some "U" and "O" connectors but not solder.

Do you have pictures with solder?

0
jerryf2310
jerryf2310

Question 1 year ago on Step 3

Can this be ran with out web? just run it from pi itself I have a monitor and wireless keyboard & mouse. my Wi-Fi is not strong in the part of shop where the kiln is.

0
amahpour
amahpour

Answer 11 months ago

You sure can. You just need to install the full blown desktop version of Raspbian (Raspberry Pi operating system), open up a browser on that machine, and navigate to http://localhost:8081/

0
albertpdantoni
albertpdantoni

1 year ago

Is there a wiring diagram of this or do you have any pics of how all the wiring is connected. I am going to be building this and I wanna make sure I wire it correctly

0
albertpdantoni
albertpdantoni

Question 11 months ago

Alright. Tried everything I could find on this but I can’t find any sort of troubleshooting guide that can guide me towards why the cooks heat up while the oven is plugged in instead of being controlled by the pi. I’ve gotta be missing something but I can’t figure out what. I’m just gonna go buy a digital PID controller and forget about a wireless interface. Glad others have gotten this to work. Unless anyone has any ideas I’m done.

0
amahpour
amahpour

Answer 11 months ago

Here are a few things to check:

1. Verify that the solid state relay (SSR) and the Raspberry Pi GPIO is functioning the way it should be. Manually turn on the GPIO and make sure it's closing the SSR. An example command to do this within the Raspberry Pi terminal would be:
$ sudo echo "1" > /sys/class/gpio/gpio23/value
$ sudo echo "0" > /sys/class/gpio/gpio23/value
It's possible you have the wrong GPIO hooked up.

2. Make sure the GPIO is hooked up to the port that's specified in config.py

3. Make sure your SSR is normally open when pins 3 and 4 are undriven (unlikely that it isn't but good to check).

Also keep in mind that not all SSRs have the same pinouts as the one specified in this tutorial. The one I purchased on Amazon was actually mismarked. Most of my issues came down to my SSR setup.

Don't give up. You're so close! It's totally awesome once you get past the finish line. This changed my wife's life.

0
CKRiker
CKRiker

Question 11 months ago

Hello,

I finally got all the parts in that I ordered for this project. However, it seems that I got the newer thermocouple board, the MCP9600. Is there a way for me to alter the program to register this board and dependencies, or do I need to find the older board?

0
albertpdantoni
albertpdantoni

11 months ago

So I made this and I’ve connected everything like it says too but the pi isn’t controlling temp. It just registers the temp inside the kiln. When I plug the kiln in it automatically starts heating up. Anyone run into this issue before?

0
jrdesigns10
jrdesigns10

Question 1 year ago on Step 5

This is a great tutorial, thanks for putting the work into this. I did get an error while running the:

sudo pip install greenlet bottle gevent gevent-websocket

Do you know how I can get past this? It's my first pi project so I'm pretty green. I'm doing this from work so maybe its a firewall issue?

1597091942156-65c2d459-0d32-42f0-9400-65e7dcbdcb4f (1).jpg
0
CKRiker
CKRiker

Answer 11 months ago

The way I found to fix this issue was to run,

$ sudo apt-get install libffi-dev

then run,

$ sudo pip install greenlet bottle gevent gevent-websocket


Weirdly enough, I got this error on my first but not my second setup.

0
kulps
kulps

Question 1 year ago

Hey, this looks great. I've got an older kiln that doesn't support segments and I'm thinking of using this. My kiln is a bit bigger than yours and has 4 elements and 3 thermocouples.
I found there's an Octo MAX31855 which can read 8 thermocouples but I'm not sure how to integrate it with your software.
It's definitely scope-creep but you could even control multiple kilns with 8 thermocouples.

The Bartlett V6 supports multizone thermocouples which gives a nice more even heat in larger kilns as you can only heat the zones that are low without over-firing areas that are hot based on kiln packing or airflow. The way this is handled is covered quite well in the manual, if you're curious.

I could use the software as-is but I'd need to tie all relays to the single output which is a bit less accurate.



Thanks for all your work so far!

0
Tristan763434563636

I got this to work by using similar version from git hub

its exactly the same wiring and seems like different code.

-https://github.com/jbruce12000/kiln-controller

i have it running through My phones hot spot - another tutorial on youtube

I reached the same point as jrdesigns10 with this instructibles step by step by botheredbybees (thanks bothered by bees it worked in the end) i had the error message (greenlet...pin wheels) and could not get further than that.

i did get another version of this to work found on git hub where this is also posted. there are a whole bunch of different versions of step by step that seem to stem from one version. These can all can be found on git hub by searching in git hubs search tab key words - kiln controller.

make shure u buy the MAX31855 thermocouple this one worked. i first bought the MAX31856 and could not get it to work.

i have no coding knowledge and basic electrical.

0
Big Texun
Big Texun

Question 1 year ago

Has anyone tried to adjust the software for multiple probe inputs? I haven't looked at the cost yet, but it shouldn't be hard to add a module that takes 3 inputs, throw out the sensor the farthest from the average of the two closest measurements. AND to log the name and reading of the measurement that was thrown out, so you can decide later if you have an pyrometer failing. Thermocouples are notorious for working good, but silently drifting and giving bad readings. This 3-way vote is an attempt of removing a failing probe before it destroys a project...

I'm an engineer, with a lot of experience with thermocouples, so I'm just trying to do it right...

0
Nekobonsai
Nekobonsai

1 year ago

Heyya! Thanks for the great tutorial. I was wondering: how hard would it be to make this work with a Adafruit MAX31856 instead of MAX32855? That's what I have on hand right now.
Thanks!

0
Big Texun
Big Texun

Reply 1 year ago

I've worked with a lot of the chips in the family, they have different specs, but they all work the same and are interchangable.

0
botheredbybees
botheredbybees

Reply 1 year ago

I haven't tried one but I shouldn't imagine it would give you any trouble. Looks like a higher spec'd board, so better, if anything, than the MAX32855. Good luck with the build.