Jump to content

Geeks only - Raspberry PI controlled kiln


jbruce

Recommended Posts

@Bill Kielb

Bill I have a question regarding a creative idea that popped up in my thermocouple  newbee mind this morning.

Because there is a potential difference between dissimilar metals, every junction along the way between the thermocouple and measuring device could cause a problem. OK.

In my case I’m trying to simplify the wiring connections with multiple thermocouples and toggle switches so I can switch the one controller system between two different kilns  Ok  

If I install a terminal block at the back of my controller box, there  is no material dissimilarity between the pair of screws for each terminal. I am also going to assume with this idea for simplification purposes that the same would be true with the toggle switch, however there probably is a different material inside, maybe solid copper, in which case there would be two junctions inside the switch, one in each direction of material change.

My idea is this: what if I switched the compensation cable polarity along the way, so as to reverse the potential difference created at each junction? Could this minimize the total error received at the end?

 

A2635619-ABD5-4593-A7FF-903E7ED17CA3.jpeg

Link to comment
Share on other sites

1 hour ago, MarkTilles said:

My idea is this: what if I switched the compensation cable polarity along the way, so as to reverse the potential difference created at each junction? Could this minimize the total error received at the end?

 

My opinion:, adding junctions is never good. The reason? Which will be the cold junction we will calibrate from? Ultimately it is the first one attached to the temperature board that you purchase for the PI. 

Alternating polarity only adds lots of junctions  and couples which defeats the properties of the cable. Compensation cable acts like thermocouple wire at 200f or below so the greatest accuracy will always be as if this entire assembly acts as one super long thermocouple which means the polarities will match along its entirety.  Using isotherm blocks and compensation cable minimizes this when junctions are added but the signal is often microvolts per degree f so a continuous extension cable with maybe 100 ohms resistance max (50 ohms each way) is likely the most anyone would venture before losing accuracy.

Maintaining nanovolt voltage drops  across well made isotherm junctions made of the same materials as the compensation cable might be argued as doable, but an ordinary switch, along with dissimilar metals, not likely. Switching will generate some noise for sure and the unloaded thermocouple will likely cause a fairly large swing upon switching so off cycle usage is likely the way this will work. Since your switch is likely not - make before break - you will likely add a resistor at this junction to drain the open thermocouple and possibly one across the moveable contacts else your temperature board if active during switching will sense a thermocouple burnout during switch operation.

So again, alternating polarity makes this worse in my mind and for any type of safety circuit, just change it to current loop and transmitters or other suitable transducer. In the meanwhile you likely can get it to work for you, just as Alpine did many years ago but all that stuff was analog and we ended the firing by watching cones so plus or minus 20 degrees on the meter was just fine. And of course there was always that warning, over 1500 degrees,, don’t touch that switch!

Anyway, once thermocouples are converted to a more robust signal, they are super easy to work with, dependable and from there extended as far as you like. After that you are pretty free to innovate and make cool dependable stuff.

 

34B2F1AA-C5FE-4199-A5F0-A8D201864F4F.jpeg

469CA00E-F648-4C02-8009-AB52D622A5F2.jpeg

Edited by Bill Kielb
Link to comment
Share on other sites

What is involved in turning this into a “current loop”? Again, to clarify, I am only going to flip the switches before starting one of the two kilns. I’m never going to run them both at the same time. I want to make one controller that I don’t have to be unscrewing wires and screwing them back together again when I change kilns. The switches won’t be flipped mid process.

Once my newsystem is complete, I can compare values with one of my stock kiln control systems which actually looks to be very good, it’s just very limited in program ability. I should be able to use this to calibrate my endpoint requirements for the new system.

Edited by MarkTilles
Link to comment
Share on other sites

1 hour ago, MarkTilles said:

want to make one controller that I don’t have to be unscrewing wires and screwing them back together again when I change kilns. The switches won’t be flipped mid process.

How about this for simplicity and a hardwired solution. 2 males (females) 1 female (Male) maybe 10.00 bucks on Amazon, virtually all your issues go away. No current loop till you want to learn about it. Current loop stuff is ready made and pretty cheap as well. Most temperature controllers have 4-20ma inputs as standard. 
I think I would put the male on your temp board and  females on each thermocouple that way a dangling thermocouple would not be easily shorted against something.

https://www.automationdirect.com/adc/search/search?fctype=adc.falcon.search.SearchFormCtrl&cmd=Search&searchquery=Type+k+transducers&categoryId=850116&TxnNumber=-1&searchqty=10&start=0

 

 

08D3CEE3-B583-457E-9A6E-FC3A43E4572E.jpeg

Edited by Bill Kielb
Link to comment
Share on other sites

Thinking about it, whilst it may seem excessive to set up a Pi on each kiln, I had to calibrate the PID values for my kiln experimentally, as, if you have 2 kilns unless they are both the same you would may find the settings for one do not work well for the other. 2 Pi's would allow each one to be calibrated separately.

You also have to consider that many people appear to be using type K thermocouples,  I believe that you are using a platinum/rhodium thermocouple (type R or S) like me, in which case the voltage produced from the thermocouple hot junction is about 1/3 of that for a K type , so I think Bills comments about all the extra junctions affecting the reading are very valid.

It is possible to add a few lines of extra code to the Pi so that it automatically will produce a CSV  file with all the firing details,  and this can also include the kiln details, so 2 Pi's would allow you to have better firing logs.

Link to comment
Share on other sites

3 minutes ago, newps said:

Thinking about it, whilst it may seem excessive to set up a Pi on each kiln, I had to calibrate the PID values for my kiln experimentally, as, if you have 2 kilns unless they are both the same you would may find the settings for one do not work well for the other. 2 Pi's would allow each one to be calibrated separately.

You also have to consider that many people appear to be using type K thermocouples,  I believe that you are using a platinum/rhodium thermocouple (type R or S) like me, in which case the voltage produced from the thermocouple hot junction is about 1/3 of that for a K type , so I think Bills comments about all the extra junctions affecting the reading are very valid.

It is possible to add a few lines of extra code to the Pi so that it automatically will produce a CSV  file with all the firing details,  and this can also include the kiln details, so 2 Pi's would allow you to have better firing logs.

Well, I do have two Pi’s as well as two 31856’s so having two systems is a possibility down the road. But as far as how well PID values might work between the two different kilns, one could always shell-script replacing the needed PID values in the controller configuration file when needed, that’s not a problem, just a couple of lines of code in the right place, and this functionality can probably be added to the web interface as well.


At this point I’m going to just do some experimentation. I have the switches, I have the compensation cable, I have a working Bentrup TC–40 controller on my small60 liter kiln, so I’ll just wire things up and compare temperatures to the Bentrup readings. 

I will report back with my findings. 

Link to comment
Share on other sites

28 minutes ago, newps said:

It is possible to add a few lines of extra code to the Pi so that it automatically will produce a CSV  file with all the firing details,  and this can also include the kiln details, so 2 Pi's would allow you to have better firing logs.

This is all very true,  although I believe the oven program is simple without significant PID tuning. One important design thought here is when we design things the safety for the device gets installed on the device. So if I were to take your two kilns, the safety would be mounted to the kiln in the form of a digital controller which transmitted the temperatures back to the pi. Of course at minimum this controller would have a high limit which on its own shuts off the kiln, especially on loss of power, so fail safe (not fail secure) for all interlock wiring and relays. Actually it’s customary to have a designated high limit, independent of the control, so a designated high reliability high limit as well.

Relying on the pi programming to intercept all possible errors is not really good practice.

Once you add a controller to the mix, may as well make it a pid control and just select it from the pi. Tune the pid in the separate temp controller to match the kiln thermodynamics (most have auto tune) 

Edited by Bill Kielb
Link to comment
Share on other sites

6 minutes ago, Bill Kielb said:

This is all very true,  although I believe the oven program is simple without significant PID tuning. One important design thought here is when we design things the safety for the device gets installed on the device. So if I were to take your two kilns, the safety would be mounted to the kiln in the form of a digital controller which transmitted the temperatures back to the pi. Of course at minimum this controller would have a high limit which on its own shuts off the kiln, especially on loss of power, so fail safe (not fail secure) for all interlock wiring and relays. Actually it’s customary to have a designated high limit, independent of the control, so a designated high reliability high limit as well.

Relying on the pi programming to intercept all possible errors is not really good practice.

Once you add a controller to the mix, may as well make it a pid control and just select it from the pi. Tune the pid in the separate temp controller to match the kiln thermodynamics (most have auto tune) 

Bill the Pi system is not going to have anything to do with the overheat “safety back up”, rather it’s the separate Rex C-100 PID with the secondary thermocouple in the oven. It will be wired up in such a way that one tripped the heating elements cannot be re-enabled without a manual press of a button. 

Edited by MarkTilles
Link to comment
Share on other sites

8 minutes ago, MarkTilles said:

safety back up”, rather it’s the separate Rex C-100 PID

Hmm, the Rex c 100 is not programmable so starting it from the pi with a program would be a chore and it has 4-20 ma input but does not appear to be able to communicate that with anything else.
Will that be they safety for each kiln and you will simply move it from one to the other .......... or will you add another controller?

If so, you might pick a control (eventually) that has more capability at some point and give thought to each kiln having its own pid control tuned for that kiln and all the rest that goes with that. Might be worth contemplating.

Link to comment
Share on other sites

6 minutes ago, Bill Kielb said:

Hmm, the Rex c 100 is not programmable so starting it from the pi with a program would be a chore and it has 4-20 ma input but does not appear to be able to communicate that with anything else.
Will that be they safety for each kiln and you will simply move it from one to the other .......... or will you add another controller?

If so, you might pick a control (eventually) that has more capability at some point and give thought to each kiln having its own pid control tuned for that kiln and all the rest that goes with that. Might be worth contemplating.

I guess my thought is kind of complicated to explain by text, at some point I can draw as simple schematic showing what I’m doing. 

The two controllers are not interconnected, they are independent systems. However, the Rex will control the main relay that supplies power to the heating elements, independent of what the pi controller does with the solid-state relays. Once I enable the main power on the rex controller monitoring system, if the temperature exceeds a maximum I set in it, then it will drop off the main power to the heating circuit.

Edited by MarkTilles
Link to comment
Share on other sites

1 minute ago, MarkTilles said:

However, the Rex will control the main relay that supplies power to the heating elements, independent of what the pie controller does with the solid-state relays.

No I think I get it, and it’s something being developed. It sounds like the Rex will be your high limit and moved between kilns, unless you have two of them.

Link to comment
Share on other sites

4 hours ago, Bill Kielb said:

No I think I get it, and it’s something being developed. It sounds like the Rex will be your high limit and moved between kilns, unless you have two of them.

Ok, 

For grins, I have now cabled things in for testing, and labeled the various items. Attaching photos below. The thermocouples and SSRs shown - only one of two sets, for kiln K-2.

I have built a 3-phase SSR heating array, which will be housed with a cooling fan in a steel cabinet under my big kiln. The array will be controlled by the Pi system.

In order to start things up, I will always need to manually push in and enable the magnetic relay shown in the photograph once, which will enable the main relay in the kiln. Because of the loopback connection, it will  stay depressed as long as the solid-state relay connected to it is enabled, and will disengage when the high limit is exceeded or with any power fluctuation in the building. I have disabled the PID’s proportional, integral and derivative functions so it never cycles.  This magnetic relay then supplies  power through to the SSR array/heating elements, controlled by the Pi system. The red button on the side of the box is simply a “safe shutdown” button for the Pi operating system. In previous posts I mentioned REX, this particular PIM is a BERM. (China Berme clone).

1C3465C0-832D-4BCA-80DD-8C62CA146589.jpeg

D573B534-1BEE-4266-A388-249E45048FE6.jpeg

Edited by MarkTilles
Link to comment
Share on other sites

1 hour ago, MarkTilles said:

For grins, I have now cabled things in for testing, and labeled the various items. Attaching photos below. The thermocouples and SSRs shown - only one of two sets, for kiln K-2

Interesting, it will be fun to see what final form you eventually decide on. Center off switches, I would not have guessed.

When ready with the final form of this, I would suggest creating the schematic which should allow you to perfect all the safety aspects. Fusing, wire sizes, interlocks etc.....

Link to comment
Share on other sites

1 minute ago, Bill Kielb said:

Interesting, it will be fun to see what final form you eventually decide on. Center off switches, I would not have guessed.

When ready with the final form of this, I would suggest creating the schematic which should allow you to perfect all the safety aspects. Fusing, wire sizes, interlocks etc.....

DPDT, not center-off. :) just the labels confused you maybe

Link to comment
Share on other sites

Can any of you out there point me in the right direction to be able to look at (and maybe even tweak) the web interface? I can't figure out where it is coming from and how it interfaces with oven.py. First off I want to see what the other status symbols in the menu represent ...  Thanks in advance

Link to comment
Share on other sites

On 4/23/2021 at 7:57 AM, MarkTilles said:

Can any of you out there point me in the right direction to be able to look at (and maybe even tweak) the web interface?

Somebody has got to help soon, I don’t want to learn PI programming and it’s nuances! @liambesaw used to do some I believe.

Edited by Bill Kielb
Link to comment
Share on other sites

On 4/23/2021 at 5:57 AM, MarkTilles said:

Can any of you out there point me in the right direction to be able to look at (and maybe even tweak) the web interface? I can't figure out where it is coming from and how it interfaces with oven.py. First off I want to see what the other status symbols in the menu represent ...  Thanks in advance

What specifically?  It's all dynamic so it's not as simple as looking at the html.  The values are populated by the program.  The html is in /public and the javascript is in /public/assets/js and the python code is scattered about.  You can search for the symbols you want in the files to see where they're stored.

Link to comment
Share on other sites

2 hours ago, liambesaw said:

What specifically?  It's all dynamic so it's not as simple as looking at the html.  The values are populated by the program.  The html is in /public and the javascript is in /public/assets/js and the python code is scattered about.  You can search for the symbols you want in the files to see where they're stored.

Specifically I’d like to know what these five different icons represent on the top right of the menu, and why the furthest one to the right is enabled on my iPhone Safari browser at all times, yet is never lit on my laptop chrome browser, whether or not the system is running a heating cycle.  What I haven’t found is a manual or readme with details about these things.

0634C12A-D0CC-493D-AFE8-08F951704187.jpeg

Edited by MarkTilles
Link to comment
Share on other sites

10 hours ago, MarkTilles said:

Specifically I’d like to know what these five different icons represent on the top right of the menu, and why the furthest one to the right is enabled on my iPhone Safari browser at all times, yet is never lit on my laptop chrome browser, whether or not the system is running a heating cycle.  What I haven’t found is a manual or readme with details about these things.

0634C12A-D0CC-493D-AFE8-08F951704187.jpeg

Line 23 of index.html says (from the right I think) heat, cool, air, hazard, door.   I'm on my phone so I can't grep the files for the term hazard, which would be the best way to find how the icons turn on and off.  

Link to comment
Share on other sites

2 hours ago, liambesaw said:

Line 23 of index.html says (from the right I think) heat, cool, air, hazard, door.   I'm on my phone so I can't grep the files for the term hazard, which would be the best way to find how the icons turn on and off.  

That’s great Liam. Now if those functions are actually available, I’d  just like to figure out where one configures the GPIO values for, for example, “door.” I got a hunch from yor text and did s google search for "picoreflow door switch wiring" and now I understand this project looks like a spinoff of one called picoreflow - and I found some docs on it here: https://projects-raspberry.com/picoreflow/ 

Edited by MarkTilles
Link to comment
Share on other sites

@Bill Kielb@newps I am now running a 960C bisque firing using the Bentrup TC 40 controller connected to one of my kilns. That controller, although old,seems to be digital and work OK as we haven’t had any bad results with bisque or glaze firing to 960 and 1260 respectively (as displayed on the original Bentrup controller)  

I have now installed a secondary S-type thermocouple at the same height and location in the kiln as the original. I am comparing the temperatures noted by the raspberry pi max31856 system to the Bentrup. As you know I have a pair of contacts and a double-pole switch in the loop with my Pi controller, so I am also checking what happens when I wire directly and bypassing those additional junctions.

When 271C was displayed on the Bentrup, the pi system was showing 319C, or 48°C warmer. When I quickly bypassed all my switches and wired the thermocouple directly into the thermocouple board, of course using only compensation cable, there was no change in the measurement value whatsoever. I will check this also later in the heating schedule at a much higher temperature to see if there’s any difference when going through my switches or not.

Here are a few points in the firing schedule with temperature values shown by both systems:

Time (min)/Kiln (C)/Pi (C)/deltaT (Pi-Kiln)

0/14/11/-3

75/90/103/+13

210/223/265/+42

285/300/350/+50

As you can see the comparative temperatures are widening the hotter it gets. I will continue monitoring this about every half an hour until the end. I have several new s-type thermocouples and will also check the top temp with one of them later, as with welding gloves I can easily remove one thermocouple and push in another one.  I suppose I should also check these values by swapping the Bentrup and pi systems on the respective thermocouples to see if the thermocouple swap changes things.


I will the post full numerical results when completed. My question is, down the road, which system should I trust?

Link to comment
Share on other sites

2 hours ago, MarkTilles said:

I will the post full numerical results when completed. My question is, down the road, which system should I trust?

Someone once said  a few posts ago:

“Doubling inputs, extra junctions etc..... are always discouraged and testing one case in one instance may or may not indicate this will provide acceptable readings over its lifetime.

That all said, this often does work and I suspect you will initially make this operational. Since it is a safety circuit though I would encourage you to just convert this to current loop or other established methods that are approved the world over. “:wacko:

My feeling is the bentrup is likely the better reading. I would measure the output voltages of all with a known very good meter and compare it with an S thermocouple chart. Record those values as well they should be the most precise......... but ......... it needs to be a high quality calibrated meter,  good connections to the millivolt level. The reality, none  of this stuff is likely certified as calibrated  so you will not know the potential error in each item. Bentrup, PI, or your meter so  .......... If I had confidence in the voltmeter then the chart values likely will be most correct and I would enter offsets in each accordingly.

At some point you need confidence in one of those things to develop sensible calibration offsets for the PI and the bentrup.. right now you have a one cone or better mismatch which is significant.  Without that confidence, my thought would clean bentrup readings are most conservative of the two given clean tight direct wiring. Anything else on the switch may change over time due to the smallest of unpredictable changes, cabinet temperature, switch wear, noise on the line, we don’t know.

 

Edited by Bill Kielb
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.