Project:Kiln Automation

From Red Mountain Makers Wiki
Jump to: navigation, search

Our Knight Kiln has a home-built controller system that uses a web interface for control (from within the RMM network) and monitoring (from anywhere). This web interface is available at

High-voltage hardware

Low-voltage hardware and software control

Controller architecture diagram


Software components

Component Code repository Language(s) Inputs Outputs
Cypress PSoC microcontroller kilntroller-cypress C Low-voltage thermocouple readings; heating element control messages over USB-serial. Sends temperature readings via USB-serial and turns heating elements on/off based on control messages.
C.H.I.P. microcomputer kilntroller JavaScript (Node) server USB-serial messages for temperature; HTTP requests for schedule control. USB-serial messages for heating element control; SSH connection to server for data transfer and storage.
Kiln data API kilntroller-server JavaScript (Node) server Script run via SSH connection; HTTP requests; MySQL database queries. HTTP responses; MySQL database storage.
Kiln user interface kilntroller-ui JavaScript/ES2015/JSX (Webpack + React + Babel) Requests via a user's web browser; responses from kiln data API. Data shown on the user's screen; actions taken via POST requests to C.H.I.P. microcomputer (only possible within the RMM network).

Setting a schedule

Setting a firing schedule works, but the user interface for entering the schedule and sending it to the controller is not yet implemented. To set a schedule, you need to send a properly formatted HTTP request to the kiln controller's microcomputer. You can do this by connecting to the RMM network and using cURL from the Linux or OS X command line as follows:

curl -X POST -H 'Content-Type: application/json' --data-ascii '{"schedule":[ {"temperature":30,"rampMinutes":1,"soakMinutes":5} ]}'

You can also chain multiple schedule steps together:

curl -X POST -H 'Content-Type: application/json' --data-ascii '{"schedule":[ {"temperature":20,"soakMinutes":1}, {"temperature":150,"rampMinutes":10,"soakMinutes":10} ]}'

Or you can use another HTTP request tool of your choice - Postman is a good one.

If you are on Windows, the curl examples probably won't work - just go get Postman right away, it's much easier. Send the message using a "Raw" request and the "JSON" format, like in this example:

Kiln postman.png

Tuning the PID loop

The kiln controller uses a PID (proportional-integral-derivative) control system. The specific PID library used is based on code from this article (read it for details about its enhancements over a basic PID loop). Then, this code was later ported from Arduino to JavaScript.

The P, I, and D parameters of this system can be tuned to ensure optimal operation. You should only do this if you find that the kiln is overshooting or not reaching its set temperature. More info on tuning these paramters:

To start changing the PID parameters, log in to the kiln controller's microcomputer from within the RMM network:


(contact James or Daniel for the password).

Once you are logged in to the microcomputer via SSH, run these commands:

tmux kill-session -t kiln
cd ~/code/

This will shut down the controller server (turning off the heating elements and clearing any firing schedule) and put you in the directory where the code files live.

Using a text editor of your choice (nano is a good one), edit the files data/config.yml and pid.log.

In the first file, whitespace matters. The second file is just a record of changes made so that we can make sense of the results later.

After editing the files containing the PID parameters, you can run this command:


to start the controller again. You will need to re-enter any schedule that was set previously.

If you want to make further changes to the PID tuning parameters, press Ctrl+C to exit the controller program. It's safe to do this even if the heating element is on: after a few seconds without receiving any further commands, the Cypress microcontroller will turn the heating elements off.

When you disconnect from this SSH session, the controller program will end. To start it up in the background so that it stays active after you log out, you can run this command:


You can also grab historical temperature data (from times when the controller was plugged in) in a format suitable for pasting into Excel. Here's an example (date/time values are in UTC):

Project History and Planning


The recently acquired Knight Kiln is an old model that must be manually controlled by setting a timer and/or using a 'cone' that deforms depending on time at a temperature. This project seeks to augment the kiln with digital control so the heat ramping can be controlled precisely according to a user-entered heat profile, without the use of consumables or manual intervention.


Knight Kiln model 103 (3 sections, 15A each for a total of 45A, 10.35kW)

6x 230V+/10A+ NO or NO+NC non-latching relays; 5V or 12VDC trigger; e.g.

6x transistors (darlington pairs or enhancement mode N-channel FETs) for triggering relays from mcu; e.g. 1x ULN2003, or anything. Probably can salvage or otherwise find.

3x high temperature thermocouple with long probe, preferably >=1250C (2300F); e.g.

3x NTC thermistor with leads, >=200C; e.g.

High temperature (low power is fine) wire and connectors for connecting relays and NTC thermistors to mcu

Microcontroller board, preferably with integrated opamp. Recommend PSoC 42xx prototyping kit or PSoC 5LP prototyping kit, both are on-hand already. We ended up using a PSoC (TODO: exact model number?) for this.

Simple computer (raspberry pi style is more than enough) for setting up the kiln w/ a GUI. We ended up using a C.H.I.P. microcomputer for this.


  • Chris
  • Trae
  • Katie
  • Kris
  • Greg
  • Heather
  • James
  • Nicole
  • Daniel


Jan 3 2016

Kris -- Measured coils on average of 25 - 26.5 ohms per resistor. Three-way switches have high/medium/low settings which correlate to placing the coils across 240VAC input in either series, parallel, or one only. Intersection connectors are Bakelite and prongs similar to outlets. As the RMM space has 120/240VAC 3-phase Delta power, we are able to power the kiln using our three-phase power, which means we don't have to provide the kiln with a neutral connection, or a 45A connection. Operating on 3-phase (from calculations) we should be able to run the kiln on a 30-amp circuit, with the breaker, plug, outlet, and electronics being necessary to interface to the kiln. At the current time, we have a RS-232 PID controller which has been provided, and a K-type thermocouple as well as six 12V (coil) / 240VAC 30A single-pole single-throw relays.

Work at present continues on modify the space electrical to support this load, as well as securing the remaining double-pole solid-state relays rated for 30A at 250VAC to switch the resistors onto the phase legs of the 240VAC three-phase power from the building panel.

Due to the temperatures involved, and a desire to preserve some of the original parts, an external housing may be required to contain control circuits.

To date, this is the single largest electrical load in the building outside of the A/C and heater circuits.

It is my estimation that a box external to the present kiln assembly will be needed to house the new electronics and controller. Additionally, it may be necessary to attach an armored cable from the kiln to the (new) control box. The wire may have to be a high temperature type, along with high-temp crimp connectors, and fiberglass tape or some form of a high-temperature heat-shrink.

For the interface to the plug-in power cord, a barrier strip carrying the three phase legs (A, B, C) and ground will allow converting to/from single-phase (split-phase, no neutral) 240VAC or (delta) three-phase 240VAC.

To be acquired: 30A solid-state relays, enclosure, armored cable, connectors, wire, glass tape, splices, etc.

Feb 8 2016

megreger and Kris now involved; megreger has provided a 600V 75A three-phase contactor and an Omron thermal controller which speaks RS-232 / RS-485. Kris has provided three solid-state relays, a red mushroom button, and two green push-buttons. One SSR was consumed during building and has been replaced.

Manual for Omron CN-8500 controller:

Current plan is to repair/replace broken wires/insulation and bypass old controls. Since the kiln is made up of a total of six large resistors, the kiln is a natural fit to the three-phase 120/240 Delta power the space has. Accordingly, we have re-engineered the kiln to run off of the three legs of the 240VAC delta power so that each leg is loaded to ~15A, distributing the power so that it is most effectively balanced.

This project has been delayed by on-going re-engineering, other work inside the space, and necessary changes to the building electrical system to provide a dedicated power circuit to this device.

In the current design as planned, the power to the control circuits operates independently of the final resistor control system. It is therefore possible to operate the controls with the load disabled. The red mushroom switch and twin green switches function as motor on/off switches. In this fashion, both normally-open (NO) switches must be pressed to enable the control circuit to lock-in the contactor. The red mushroom switch is normally-closed (NC) and by pressing the switch, current to the contactor is interrupted. The contactor provides power to the SSRs which are controlled by the Omron controller.

Apr 10 2016

Third SSR installed so 240VAC side is controlled in a balanced way. 240VAC control system is complete; low-voltage and safety systems yet to be configured or installed.

May 25 2016

We discovered that the previously mentioned Omron thermal controller does not actually speak RS-232 / RS-485, so provides no opportunity for automation :(

So instead, Chris helped James build a Cypress PSoC-based board that reads our 3 installed thermocouples and sends the data over USB/serial:

Sep 29 2016

All other software components are in place, in various stages of (in)completeness.

Successful low-temperature test firing:

Feb 24 2017

Successful high-temperature test firing:

Kiln controller real firing.png

Oct 5 2017

Daniel is testing and tuning the PID loop for low-temperature applications. A few more software fixes/improvements as part of this work.