Jump to content


Photo
- - - - -

Home Made Kiln Controller


  • Please log in to reply
104 replies to this topic

#41 High Bridge Pottery

High Bridge Pottery

    Joel Edmondson

  • Members
  • PipPipPip
  • 1,884 posts
  • LocationNewcastle Upon Tyne. England

Posted 18 October 2015 - 02:57 PM

Joel,

A couple of us down near Winchester have been talking about doing something similar - in my day job I do a lot of computer development, and currently have a project where we're using Arduinos (as they have more interfacing capabilities than the Pi). The thinking is:

- an Arduino for the sensors and a Pi or Intel board for the user interface

- better recording of temperature, voltage and current during the whole firing cycle

- prompts for manual tasks e.g. bungs in and out at set times or temperatures

- alarms for power cut, firing deviating too much from the plan, over firing or taking too long etc

- more intuitive and precise setting of the whole firing cycle, e.g. a modern consumer style user interface, and a controller that learns the max firing rate and the cooling rate of the kiln

- a touch screen for setting up the system and also showing what is hapening

- ability to log in remotely over WiFi or a wired network, so you can monitor things whilst ding other tasks

- for the gas kiln guys, eventually have servos controlling the gas flow and damper, plus interfacing to an oxygen meter

 

Unfortunately the day job is taking up too much time at the moment, and I need to get pots out for the Christmas shows etc, so the project is taking a back seat until the new year.

 

The day job project has International Paints/Akzo Nobel from Newcastle as one of its main partners, so I'll probably be going up your way in the coming year. We could meet for a beer and bounce some ideas around.

 

Would be happy to meet up for a beer if you are ever in Newcastle. My project has taken a back seat too  :huh: had to reformat the Pi as it broke and I have no idea how to fix it. Probably be a bodge job for my gas kiln and then go from there.


One physical test is worth a thousand expert opinions.

 

gallery_23281_871_611.png gallery_23281_871_239.png gallery_23281_871_701.jpg

 
 


#42 High Bridge Pottery

High Bridge Pottery

    Joel Edmondson

  • Members
  • PipPipPip
  • 1,884 posts
  • LocationNewcastle Upon Tyne. England

Posted 05 November 2015 - 01:06 PM

Finally testing out my pi, only logging the temperature for glaze firing then I am going to use gnuplot to graph it :D See how good it is before I use it to read temps in the gas kiln.

 

gallery_23281_871_1157359.jpg


One physical test is worth a thousand expert opinions.

 

gallery_23281_871_611.png gallery_23281_871_239.png gallery_23281_871_701.jpg

 
 


#43 Joseph F

Joseph F

    Always Experimenting

  • Members
  • PipPipPip
  • 1,827 posts
  • LocationGeorgia

Posted 05 November 2015 - 09:26 PM

AAWEEESSOME. How did it go?



#44 High Bridge Pottery

High Bridge Pottery

    Joel Edmondson

  • Members
  • PipPipPip
  • 1,884 posts
  • LocationNewcastle Upon Tyne. England

Posted 06 November 2015 - 05:34 AM

Well I know the thermocouple is completely out of wack. The kiln was reading 260c but my pi was reading 80c when I left. Not sure if I have the wrong kind of thermocouple in the chip. Nothing on the thermo that says its type. Looked at the theoretical voltage readings for thermocouples and being 3.5x lower doesn't make any sense, there isn't a type of thermocouple that would be reading that  :blink:

 

I am considering running to RSelectrical and buying a type N chip but who knows if that would work. If it is consistently off by 3.5x then I could brute force it and multiply my readings  ^_^ Will post the graph of the firing once I get in the studio.

 

Could be the wiring possibly....

 

Need a way to find out what thermocouple it is, might end up buying a new type K.


One physical test is worth a thousand expert opinions.

 

gallery_23281_871_611.png gallery_23281_871_239.png gallery_23281_871_701.jpg

 
 


#45 PeterH

PeterH

    interested observer

  • Members
  • PipPipPip
  • 454 posts

Posted 06 November 2015 - 05:59 AM

An observation rather than a theory.

 

Ratio between F & C is 9/5

(9/5)2 ~ 3.34

 

So if the conversion formula had used 5/9 rather than 9/5 ...



#46 High Bridge Pottery

High Bridge Pottery

    Joel Edmondson

  • Members
  • PipPipPip
  • 1,884 posts
  • LocationNewcastle Upon Tyne. England

Posted 06 November 2015 - 09:13 AM

I was using the sample program to show me the C and F reading while my other program logged the data in the background. Don't think there would be anything wrong with their example.

 

It is probably the thermocouple being the wrong type or the really old wire that I am using. Maybe I can figure out what kind it is on the old controller somewhere.


One physical test is worth a thousand expert opinions.

 

gallery_23281_871_611.png gallery_23281_871_239.png gallery_23281_871_701.jpg

 
 


#47 High Bridge Pottery

High Bridge Pottery

    Joel Edmondson

  • Members
  • PipPipPip
  • 1,884 posts
  • LocationNewcastle Upon Tyne. England

Posted 06 November 2015 - 06:13 PM

So here is the data I collected. Top temperature was 330 even though it went up to 1260. Starting to think it could be a platinum thermocouple. Seemed to be 3.5 to 4x off the reading. 

 

Also dropped a lot of readings and gave me a value of 'nan' not sure what that means yet.

 

Need to find out what thermocouple this is and change the chip or spend the money on a type K.

Min along bottom and degC up.

gallery_23281_1039_5383.jpg


One physical test is worth a thousand expert opinions.

 

gallery_23281_871_611.png gallery_23281_871_239.png gallery_23281_871_701.jpg

 
 


#48 Joseph F

Joseph F

    Always Experimenting

  • Members
  • PipPipPip
  • 1,827 posts
  • LocationGeorgia

Posted 06 November 2015 - 06:56 PM

nan means = not a number



#49 PeterH

PeterH

    interested observer

  • Members
  • PipPipPip
  • 454 posts

Posted 06 November 2015 - 06:57 PM

Also dropped a lot of readings and gave me a value of 'nan' not sure what that means yet.

 

NaN = Not a Number

https://en.wikipedia.org/wiki/NaN

 

It's basically a great way of handling those embarrassing situations such as an unanticipated divide by zero.

The NaN propagates through subsequent uses of the variable.



#50 High Bridge Pottery

High Bridge Pottery

    Joel Edmondson

  • Members
  • PipPipPip
  • 1,884 posts
  • LocationNewcastle Upon Tyne. England

Posted 06 November 2015 - 07:27 PM

Ok, after a little more research I think it is for sure spitting out nan because of the wrong type of thermocouple.

 

A type R thermocouple has 14mv~ at 1260c and would you have it a type K chip would read that as 330c. It has to be a platinum thermocouple and I am pretty sure now it is an R. Hopefully get the right chip and solder it instead of type K. Going to be £60 cheaper.


One physical test is worth a thousand expert opinions.

 

gallery_23281_871_611.png gallery_23281_871_239.png gallery_23281_871_701.jpg

 
 


#51 curt

curt

    Advanced Member

  • Members
  • PipPipPip
  • 313 posts
  • LocationWestern Australia

Posted 07 November 2015 - 05:12 AM

Makes sense, R best for cone 10 work anyway.



#52 High Bridge Pottery

High Bridge Pottery

    Joel Edmondson

  • Members
  • PipPipPip
  • 1,884 posts
  • LocationNewcastle Upon Tyne. England

Posted 15 November 2015 - 10:36 AM

Well the new chip arrived and I messed it up. Pulled off a contact pad trying to get the old one out and blobbed solder everywhere. Didn't work when I plugged it back in...

 

Ordered some new chips and this time found the circuit diagram to breadboard it instead of soldering. The chip is still a little small to fit in the board so need to work something out for that. Found it along with the PCB design to print so if that fails I could get it printed and try the soldering but that sounds complicated. Easier to buy the plug in bits.


One physical test is worth a thousand expert opinions.

 

gallery_23281_871_611.png gallery_23281_871_239.png gallery_23281_871_701.jpg

 
 


#53 Bob Coyle

Bob Coyle

    GEEZER

  • Members
  • PipPipPip
  • 541 posts
  • LocationSanta Fe

Posted 15 November 2015 - 11:30 AM

Ah those ten minute fixes that turn into hours of hassle... but hey, think of how much you are learning. Lot's of electronics plus whole new combinations of cuss words!

 

Hang in there Joel, you'll get it yet.



#54 MatthewV

MatthewV

    Alaskan

  • Members
  • PipPipPip
  • 562 posts
  • LocationAlaska

Posted 26 November 2015 - 04:00 PM

You are calibrating your thermocouples with an ice bath and boiling water, right?

If the wires are accidentally swapped the reading will go backwards.

It does appear all of your wiring from the sensor to the thermocouple is thermocouple wire. Using a cheaper connecting wire creates additional unwanted thermocouples.

 

I believe these the three most common and easiest to fix mistakes.


Make More Mistakes


#55 High Bridge Pottery

High Bridge Pottery

    Joel Edmondson

  • Members
  • PipPipPip
  • 1,884 posts
  • LocationNewcastle Upon Tyne. England

Posted 09 January 2016 - 11:03 AM

Ah those ten minute fixes that turn into hours of hassle... but hey, think of how much you are learning. Lot's of electronics plus whole new combinations of cuss words!

 

Hang in there Joel, you'll get it yet.

 

Thank you for the encouragement :D spent the past few days battling with this project, finding any info I could. Looking at lots of circuits, seeing they were all exactly what I was trying. After a few broken chips I took a good look at the surfacemount to breadboard adapter I was using. If you look carefully you can see a 1 in the top left corner. That, is actually the 4th pin so I had been wiring it up backwards the whole time. The first pin has a circle round it. Wired the chip up the right way but I think in wiring it up wrong I broke it. Good thing I have a few spares  ^_^

 

It now seems to be reading the right temperature, excited to test it in my electric kiln to see if it really does read the right temps all the way up.

 

Been looking into PID and think I half have understanding that down, also learning python as I go,

 

gallery_23281_1039_306623.jpg


One physical test is worth a thousand expert opinions.

 

gallery_23281_871_611.png gallery_23281_871_239.png gallery_23281_871_701.jpg

 
 


#56 High Bridge Pottery

High Bridge Pottery

    Joel Edmondson

  • Members
  • PipPipPip
  • 1,884 posts
  • LocationNewcastle Upon Tyne. England

Posted 11 January 2016 - 07:32 AM

Working a bit more on this. Wrote a basic program in python so I can input the ramps. Not sure if it is the best way to do it but seems ok :D

 

Found a python PID but until I can control something I can't really test it(unless you have ideas). https://github.com/ivmech/ivPID it also came graphing the output so I have borrowed that to test out logging the data. Lost my old program that did this but this one is better anyway.

 

Using the Adafruit thermocouple python library now but I have found another one that I will probably test. 

https://github.com/a...Python_MAX31855

https://github.com/Tuckie/max31855

 

Looks like a loose connection or something as it keeps going to 0.

 

The user setting do nothing right now other than set the total time to log data but I have a list made of the set point for every minute. Not sure if it needs to be better resolution than that.

 

gallery_23281_1039_122856.png

 
#!/usr/bin/python

"""
Kiln Program 0.1
"""

import math
import time

from ivPID import PID

import matplotlib.pyplot as plt
import numpy as np
from scipy.interpolate import spline

import Adafruit_GPIO.SPI as SPI
import Adafruit_MAX31855.MAX31855 as MAX31855

CLK = 25
CS = 24
DO = 18
sensor = MAX31855.MAX31855(CLK, CS, DO)

kiln_ramp_list = [] # Blank list for user to input program

number_of_ramps = input('Number of ramps = ') # Variable to store number of ramps user needs


"""
USER INPUT OF RAMPS
"""
for i in range(1, (number_of_ramps+1)): # Itterating through number of ramps and appending to list
    top_temperature = input('Ramp ' + str(i) + ' top temperature = ') # User input for ramp n
    hours = input('Ramp ' + str(i) + ' time (hours) = ') # User input for degrees n
    ramp =(i, top_temperature, hours) # Create tuple (ramp number, hours, degrees) for ramp n
    kiln_ramp_list.append(ramp) # Add the tuple to the list


"""
SETPOINT
"""
temp = sensor.readTempC() # take reading of thermocouple for start setpoint
kiln_setpoint_list = [temp] # list for setpoints with thermocouple temp set as first value

for i in range(1, (number_of_ramps+1)): # Itterating through number of ramps to generate a list of setpoints
    ramp = kiln_ramp_list[i-1] # Pulling out user input tuples for firing ramps
    minutes = int(ramp[2] * 60) # Making minutess from user input ramp n
    top_temperature = ramp[1] # Making degrees from user input ramp n
    temperature_change = top_temperature - kiln_setpoint_list[-1]
    degrees_per_min = temperature_change / float(minutes) # Making degrees per minute needed for each ramp
    for i in range(1, (minutes+1)): # Itterating through number of minutes firing will take
        setpoint = kiln_setpoint_list[-1] + degrees_per_min # Making setpoint equal to the last value of list plus what you need in degrees per min
        kiln_setpoint_list.append(setpoint) # Appending setpoint to the list
kiln_setpoint_list = [ round(elem,1) for elem in kiln_setpoint_list ] # Rounding all the crazy float numbers to 1 decimal place
size = len(kiln_setpoint_list) # counting the size of setpoint list
print kiln_setpoint_list
"""
KILN LOG
"""
temperature_list = [] # Blank temperature list for log
internal_temperature_list = [] # Blank internal temperature list for log
time_list = [] # Blank temperature list for log
time_variable = 0.01

for i in range(1, size): # Itterate through logging temperature and time
    temperature = sensor.readTempC() # Reading thermocouple temperature
    internal = sensor.readInternalC() # Reading internal temperature
    temperature_list.append(temperature) # Appending temperature to list
    internal_temperature_list.append(internal) # Appending internal temperature to list
    time_list.append(i) # Appending time to list
    time.sleep(time_variable)

"""
PLOT GRAPH
"""
plt.plot(time_list, temperature_list)
#plt.plot(time_list, internal_temperature_list)
plt.xlim((0, size))
plt.ylim((min(temperature_list)-10, max(temperature_list)+10))
plt.xlabel('time (min)')
plt.ylabel('Temperature')
plt.title('THERMOCOUPLE TEST')
plt.grid(True)
plt.show()

"""
def test_pid(P = 1.0,  I = 0.0, D= 0.0, L=size):
    
    pid = PID.PID(P, I, D)

    pid.SetPoint= sensor.readTempC()
    pid.setSampleTime(0.5)

    END = L
    feedback = sensor.readTempC()

    feedback_list = []
    time_list = []
    setpoint_list = []

    for i in range(1, END):
        pid.update(feedback)
        output = pid.output
        feedback = sensor.readTempC()
        pid.SetPoint = kiln_setpoint_list[i]
        time.sleep(0.01)
        
        feedback_list.append(feedback)
        setpoint_list.append(pid.SetPoint)
        time_list.append(i)

    time_sm = np.array(time_list)
    time_smooth = np.linspace(time_sm.min(), time_sm.max(), 300)
    feedback_smooth = spline(time_list, feedback_list, time_smooth)

    plt.plot(time_smooth, feedback_smooth)
    plt.plot(time_list, setpoint_list)
    plt.xlim((0, L))
    plt.ylim((min(setpoint_list)-10, max(setpoint_list)+10))
    plt.xlabel('time (s)')
    plt.ylabel('PID (PV)')
    plt.title('TEST PID')

    plt.grid(True)
    plt.show()

if __name__ == "__main__":
    test_pid(1.2, 1, 0.001, L=size)
#    test_pid(0.8, L=50)

"""

Here is a print out of the set-points. Don't think I have the maths set up quite right as the way it is the top temperatures you want will be offset by the initial temperature.

 

EDIT - Did a quick fix on the code and it now ask for top temperature and works out the change that way so you can hit an exact temperature.

 


 

[20.3, 21.6, 22.9, 24.2, 25.6, 26.9, 28.2, 29.6, 30.9, 32.2, 33.5, 34.9, 36.2, 37.5, 38.9, 40.2, 41.5, 42.8, 44.2, 45.5, 46.8, 48.2, 49.5, 50.8, 52.1, 53.5, 54.8, 56.1, 57.5, 58.8, 60.1, 61.5, 62.8, 64.1, 65.4, 66.8, 68.1, 69.4, 70.8, 72.1, 73.4, 74.7, 76.1, 77.4, 78.7, 80.1, 81.4, 82.7, 84.0, 85.4, 86.7, 88.0, 89.4, 90.7, 92.0, 93.4, 94.7, 96.0, 97.3, 98.7, 100.0, 102.9, 105.9, 108.8, 111.8, 114.7, 117.7, 120.6, 123.6, 126.5, 129.4, 132.4, 135.3, 138.3, 141.2, 144.2, 147.1, 150.1, 153.0, 155.9, 158.9, 161.8, 164.8, 167.7, 170.7, 173.6, 176.6, 179.5, 182.4, 185.4, 188.3, 191.3, 194.2, 197.2, 200.1, 203.1, 206.0, 208.9, 211.9, 214.8, 217.8, 220.7, 223.7, 226.6, 229.6, 232.5, 235.4, 238.4, 241.3, 244.3, 247.2, 250.2, 253.1, 256.1, 259.0, 261.9, 264.9, 267.8, 270.8, 273.7, 276.7, 279.6, 282.6, 285.5, 288.4, 291.4, 294.3, 297.3, 300.2, 303.2, 306.1, 309.1, 312.0, 314.9, 317.9, 320.8, 323.8, 326.7, 329.7, 332.6, 335.6, 338.5, 341.4, 344.4, 347.3, 350.3, 353.2, 356.2, 359.1, 362.1, 365.0, 367.9, 370.9, 373.8, 376.8, 379.7, 382.7, 385.6, 388.6, 391.5, 394.4, 397.4, 400.3, 403.3, 406.2, 409.2, 412.1, 415.1, 418.0, 420.9, 423.9, 426.8, 429.8, 432.7, 435.7, 438.6, 441.6, 444.5, 447.4, 450.4, 453.3, 456.3, 459.2, 462.2, 465.1, 468.1, 471.0, 473.9, 476.9, 479.8, 482.8, 485.7, 488.7, 491.6, 494.6, 497.5, 500.4, 503.4, 506.3, 509.3, 512.2, 515.2, 518.1, 521.1, 524.0, 526.9, 529.9, 532.8, 535.8, 538.7, 541.7, 544.6, 547.6, 550.5, 553.4, 556.4, 559.3, 562.3, 565.2, 568.2, 571.1, 574.1, 577.0, 579.9, 582.9, 585.8, 588.8, 591.7, 594.7, 597.6, 600.6, 603.5, 606.4, 609.4, 612.3, 615.3, 618.2, 621.2, 624.1, 627.1, 630.0, 632.9, 635.9, 638.8, 641.8, 644.7, 647.7, 650.6, 653.6, 656.5, 659.4, 662.4, 665.3, 668.3, 671.2, 674.2, 677.1, 680.1, 683.0, 685.9, 688.9, 691.8, 694.8, 697.7, 700.7, 703.6, 706.6, 709.5, 712.4, 715.4, 718.3, 721.3, 724.2, 727.2, 730.1, 733.1, 736.0, 738.9, 741.9, 744.8, 747.8, 750.7, 753.7, 756.6, 759.6, 762.5, 765.4, 768.4, 771.3, 774.3, 777.2, 780.2, 783.1, 786.1, 789.0, 791.9, 794.9, 797.8, 800.8, 803.7, 806.7, 809.6, 812.6, 815.5, 818.4, 821.4, 824.3, 827.3, 830.2, 833.2, 836.1, 839.1, 842.0, 844.9, 847.9, 850.8, 853.8, 856.7, 859.7, 862.6, 865.6, 868.5, 871.4, 874.4, 877.3, 880.3, 883.2, 886.2, 889.1, 892.1, 895.0, 897.9, 900.9, 903.8, 906.8, 909.7, 912.7, 915.6, 918.6, 921.5, 924.4, 927.4, 930.3, 933.3, 936.2, 939.2, 942.1, 945.1, 948.0, 950.9, 953.9, 956.8, 959.8, 962.7, 965.7, 968.6, 971.6, 974.5, 977.4, 980.4, 983.3, 986.3, 989.2, 992.2, 995.1, 998.1, 1001.0, 1003.9, 1006.9, 1009.8, 1012.8, 1015.7, 1018.7, 1021.6, 1024.6, 1027.5, 1030.4, 1033.4, 1036.3, 1039.3, 1042.2, 1045.2, 1048.1, 1051.1, 1054.0, 1056.9, 1059.9, 1062.8, 1065.8, 1068.7, 1071.7, 1074.6, 1077.6, 1080.5, 1083.4, 1086.4, 1089.3, 1092.3, 1095.2, 1098.2, 1101.1, 1104.1, 1107.0, 1109.9, 1112.9, 1115.8, 1118.8, 1121.7, 1124.7, 1127.6, 1130.6, 1133.5, 1136.4, 1139.4, 1142.3, 1145.3, 1148.2, 1151.2, 1154.1, 1157.1, 1160.0, 1161.7, 1163.3, 1165.0, 1166.7, 1168.3, 1170.0, 1171.7, 1173.3, 1175.0, 1176.7, 1178.3, 1180.0, 1181.7, 1183.3, 1185.0, 1186.7, 1188.3, 1190.0, 1191.7, 1193.3, 1195.0, 1196.7, 1198.3, 1200.0, 1201.7, 1203.3, 1205.0, 1206.7, 1208.3, 1210.0, 1211.7, 1213.3, 1215.0, 1216.7, 1218.3, 1220.0, 1221.7, 1223.3, 1225.0, 1226.7, 1228.3, 1230.0, 1231.7, 1233.3, 1235.0, 1236.7, 1238.3, 1240.0, 1241.7, 1243.3, 1245.0, 1246.7, 1248.3, 1250.0, 1251.7, 1253.3, 1255.0, 1256.7, 1258.3, 1260.0]
 

One physical test is worth a thousand expert opinions.

 

gallery_23281_871_611.png gallery_23281_871_239.png gallery_23281_871_701.jpg

 
 


#57 MatthewV

MatthewV

    Alaskan

  • Members
  • PipPipPip
  • 562 posts
  • LocationAlaska

Posted 11 January 2016 - 04:07 PM

I think most kiln controllers use three inputs: ramp rate (deg/hr), temp (deg) and hold (time).

 

I recall a "sudden drop to zero" problem with other thermocouples as well. We added a filter to ignore readings less than a certain value unless it was sustained. At that point it was flagged as a thermocouple failure and the input was ignored.


Make More Mistakes


#58 glazenerd

glazenerd

    Macro Crystalline Junkie

  • Members
  • PipPipPip
  • 1,639 posts
  • LocationSt. Louis, Mo.

Posted 11 January 2016 - 10:40 PM

Joel:

 

I would offer some advice, but I got happy when I learned how to turn on my laptop. I still own a dumb phone. Maybe if you move the thing-a-ma-gig closer to the thing-a-ma-bob it will work.  All I got for ya.

 

nerd



#59 High Bridge Pottery

High Bridge Pottery

    Joel Edmondson

  • Members
  • PipPipPip
  • 1,884 posts
  • LocationNewcastle Upon Tyne. England

Posted 12 January 2016 - 09:10 AM

Thanks Matthew, had completely forgotten about adding in holds. I don't remember it doing this on the actual pcb but they seem to have a few extra components that I can't find/ not sure what they do. Also the thermocouple going into breadboard is a little sketchy at best.

 

Glazenerd, I am hoping to make my own 'plug in' or household electrical supply kilns. Would be great if I could have two or three going and I think once I have worked out most of the issues they wouldn't cost must more than £200/$300 with the thermocouple being a large chunk of that. The technology now is so cheap, the total cost in materials to read a thermocouple, probably max £30.

 

Still I have very little idea what I am doing so a few years to go yet but I feel worth it to learn how to computer control kilns.


One physical test is worth a thousand expert opinions.

 

gallery_23281_871_611.png gallery_23281_871_239.png gallery_23281_871_701.jpg

 
 


#60 Bob Coyle

Bob Coyle

    GEEZER

  • Members
  • PipPipPip
  • 541 posts
  • LocationSanta Fe

Posted 12 January 2016 - 03:33 PM

I uploaded a zip file of the stuff I have been doing code, jar files, DLL's and stuff. ... It works ok but is itself a work in progress. I will be updating the zip from time to time. You should be able to unzip it and run the jar file and pack up anything that is coming over the USB... read the readme.txt for details

 

http://raventreestud...om/kiln_wiz.zip






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users