The inspiration for this project started when my wife showed an interest in glass fusing. We purchased the least expensive kiln we could find in hopes that it would be something she could start with. The kiln came with only a simple mechanical thermostat that had to be adjusted manually for each step of the process. It was actually meant for annealing glass beads.
Little did we know how difficult it would be to control the rate of temperature rise and how long you would have to sit by the kiln to maintain an accurate temperature for glass fusing. Programmable kilns with built in PID controllers were several hundreds of dollars more.
I had two goals I was hoping to accomplish with this kiln.
1. A way to control the temperature rise overtime without overshooting the target temperature or having to tweak any parameters i.e. not having to purchase a standalone PID controller.
2. A means of displaying the temperature of the kiln without spending any additional money on a monitor. The kiln has a temperature gauge, but it is so tiny that it is useless for trying to maintain any type of accuracy.
For the hardware side of this, see my first project I presented here on hackster.io. The hardware I used in that project is what I am currently using for this project. The only difference would be the python script I used. The connection to the kiln is pretty simple. I made no changes to the kiln other than poking in another temperature probe. The manual thermostat on the kiln is set to maximum and the kiln power plug is simply plugged into the modified extension cord shown in the the project. My first project also explains how I set up my pi to run "headless" and use RealVNC viewer to access it.
Once I had my pi accessible with RealVNC and I could run python scripts using Geany, I wanted to be able to see current temperature and status of the kiln on my home network devices. To accomplish this, I setup Node-red on my pi.
My 2nd project on hackster.io explains how I setup and loaded a flow into Node-red.
The python script that I have included with this project is meant to be an example of an alternative to using a PID controller. I am using python 2 and maybe python 3 would work, I do not know. I am not an experienced python programmer and this being my first attempt at using python, the script must appear juvenile to anyone with any experience. A brief explanation of what the script does follows.
Controlling a target temperature (once reached) is pretty straight forward. I simply check the temperature, compare it to the target, and turn the kiln on or off based on whether it is too high or too low. Ramping the temperature up or down at a preset rate (or speed) to reach a target temperature smoothly without overshooting it, turned out to be a fun project. All glass fusing programs have one or more "segments" that control the heating and fusing process. Each segment directs the kiln as to how many degrees per hour the temperature is allowed to rise in that segment to reach and hold a target temperature. So each segment has 3 variables (rate - target temperature - holding time.) The values for these and the number of segments is determine by the glass fusing project.
The rate is expected to be given in degrees per hour. As an example, a rate of 300 degrees per hour means that the temperature must increase 5 degrees per minute until it reaches the target temperature (300/60 = 5). If the target temperature is 1280 degrees then it will take 256 minutes to get there (1280/5 =256). If you started this segment at 12 noon it would be at the target temperature a 4:26 PM (256/60 = 4.26.) To take this a little further, at 12:10 PM the temperature should be 50 degrees (5*10 = 50.) And this is how I control the temperature. Each minute I check the temperature and compare it to the the temperature I have precalculated for that minute. I then turn the kiln on or off as necessary to maintain the correct temperature.
I thought at first that maybe I would have to have a pi with a built in real time clock, but this did not turn out to be the case. I used the python 'time' module and it worked out great for my application.
So that I could test my program without having to have the kiln connected to the pi, I built in a simple simulation mode that publishes a pseudo rising temperature to node-red.
If you found this project interesting, please comment.
Comments
Please log in or sign up to comment.