PDA

View Full Version : Lee 4-20 converted to PID temperature control



lurch
02-24-2007, 03:25 PM
Well, I finally went and spent a couple of evenings doing it. I got a cheap PID controller from Ebay that came with a thermocouple, a 25A solid state relay from Auber Instruments and a single place 15A outlet from a big box store. A heavy IEC power cord from one of the myriad those I have collected over time served as the power input. I used a box that housed a fairly useless venturi vcuum pump to hold all the extra parts together. Total out of pocket cost - about $60. I made it so that the new control box has the outlet in the back that the pot plugs into and the thermocouple can be removed from the pot easily so the two pieces can be put away without being tethered together permantly.

Yes, that $60 is about what a Lee 4-20 costs new, but the improvement is absolutely astounding. No more watching the thermometer and "Dang, it's geting too hot/cool - go tweak the knob". Set it and forget it as the saying goes. I went through a pot ful of alloy making some 429421's from a brand new 4 holer and once I found the mold's sweet spot, things just flowed on and on with greatly improved results over the stock configuration - from the top of the pot to the bottom. No more glowing low wall of the pot either as the metal level dropped to the point where the head pressure was no longer sufficient to get the metal out fast enough to get good base fill out. I was very careful about checking this to avoid the condition. The last thing I wanted was some of the lead hot enough to have its vaopr pressure high enough to be troublesome. This was one of the ills I was hoping to fix.

The single biggest worry I had was how to mount the thermocouple. The one I got had a metric (Chinese of course) bolt that is designed to hold the junction against what is to be measured. I didn't want to dunk it in the melt since the wire insulation would not have appreciated that too much (this could be done with one of the probe type thermocouples though if you don't want to modify the pot any). A 1/4 - 20 nut was a very close match to the bolt so I took one of those and welded it to a small piece of 1/8" hot rolled steel with a 5/16 hole drilled in it to let the thermocouple pass through and actually bump against the crucible. I guess that's the proper term for it... The purpose of the 1/8" steel was two fold: Let the bolt have full engagement with the nut threads (there is a bump on the end of the thermocouple assembly that is about that size and rotates in the bolt that actually houses the junction) and to make sure that I had the nut welded to something and not distorted enought to preclude screwing in the thermocouple. I took the pot apart and then CAREFULLY tack welded the nut/steel assembly to the bottom of the steel crucible as far to one side as I could get it so it would be out of the way when casting. The last thing I wanted was to burn through the thing - would give new meaning to the phrase "Drip-o-matic". I'm no welder and my welds are generally butt ugly and this time was no exception, but it worked. I only raised one small bump on the inside of the crucible - good enough. I partially reassembled the pot, and then located where the nut was in relation to the bottom aluminim cover. Took that and drilled a clearance hole so that the thermocouple could be screwed in from the outside without any fuss.

I then put it all back together and fired it up. The auto tuning feature of the PID controller seemed to work pretty well. After it went through it's calibration I let the pot cool completely to room temperature. I fired it up again and the overshoot was about 25F, with the temperature stabilizing completely after about 30 minutes. At some point I may take some time/temperature readings and see if I can come up with a better set of PID values, but for now I'm satisfied with the results of the controller's auto tune.

One thing I did note: My Lyman thermometer and the controller disagree on the temperature by a fairly constant 70F or so in over the temperature range 600F to 800F. I checked the controller against an IR probe at work and found them to agree pretty well to 150F or so (didn't go any higher there).

Question: Is it common for the Lyman thermometer to be off that much? There is probably a little temperature drop in my themocouple mounting since the bolt does hang in free air under the pot, but I don't think it would be 70F. The thermal impedance at that point should be much higher than the direct contact point on the crucible - even if the thermocouple is one of the ugrounded junction types. The Lyman thermometer sits more or less in the middle of the melt, but I doubt that there is any temperature gradient in the pot of molten metal of that order.

I'm tickled. The old beater Mag 20 I have may have seen its last melt from me (not that it's a bad tool - mine was bought used and is/was not in the greatest shape is all).

hornetguy
02-24-2007, 03:55 PM
Just a guess here.... 70 degrees could be the difference you see if you are using the wrong type thermocouple... being, um, foreign, it could be looking for a "k" type, and you might be using a "j" type... or vicey-versey....
It's worth looking at, although you sound like you are knowledgeable enough to have checked that.
It's bitten me in the backside a couple of times, with varying amounts of difference... 40 degree differential up to 60 or so... depending on the temp range, I think.

lurch
02-24-2007, 04:47 PM
The thermocouple was advertised as K type and was reading accurately at lower temperatures with the controller set up for a K input. I did set the thing to look for a J type, just to be sure with this being CCC (cheap Chinese cr**) and all, and the readings were way off. This leads me to believe that the controller is set for the proper type of thermocouple. Checking the table for the two types, at 600F, a K type is supposed to be 12.855mV. That voltage on a J type corresponds to something around 452F to 453F - a lot more difference than I'm seeing.

I didn't mention it above but the controller is reading low with respect to the Lyman thermometer. J types have a higher voltage output than K types for a given temperature differential from hot junction to cold junction. If I had a J type thermocouople and the controller set to K, the controller would have read higher than the Lyman if both were otherwise accurate.

I suppose that the controller could have poor or no cold junction compensation built in. If that is the case then an elevated ambient temperature in the box where all the goodies are could account for the inaccuracy. The solid state relay does warm the box up a little at the initial melting since it is 100% active for a good while, Once things stabilize, I can barely tell the spot in the box where the relay is mounted is even slightly warm (fingers on the box test - nothing accurate). I am seeing the difference all the time anfter stabilization.

Dale53
02-24-2007, 08:07 PM
Lurch;
It may just simply be that the Lyman thermometer is inaccurate. It won't be the first itme. If it bothers you, I would borrow another thermometer and check. If you have access to virgin metals, you could also run the "virgin metal test" (pure lead melts at a consistent temperature, etc). That is a constant but you do need virgin lead for it to be accurate.

Just a suggestion or two,
Dale53

lurch
02-25-2007, 03:11 AM
Dale,

I'm not too hung up about it as long as I'm getting good bullets and the fuss factor during a casting session is significantly reduced. The engineer in me just wants to know.

I don't have any pure virgin metal, but I do have a quantity of "virgin" eutectic (63/37) bar solder that is my current source of Sn. I may use some of that to check since it has a known melting point of 361F. I also have a digital kitchen thermometer that will take up to about 450F that I can check against as well. I might even borrow an IR probe from the office and see if it will corroborate anything. They don't work quite as well with shiny surfaces as they do with darker objects since the emmissivity is so low (relatively speaking of course). That's the reason all the satellites & whatnot are covered with shiny stuff. It doesn't absorb as much heat from the sun. That same property works the other way too. Hot shiny surfaces don't radiate well and can give those non-contact IR probes some trouble getting a good measurement. A melt with a layer of dross on it or aiming the probe at a point on the side of the crucible just above the melt would give the best possible result - at least to my way of thinking.

Dale53
02-25-2007, 01:27 PM
>>>I just want to know<<<

I'm afflicted with the same disease (need to know, just because).
However, that trait keeps me off the street[smilie=1: :-D :-D

Dale53

garandsrus
02-25-2007, 11:18 PM
Lurch,

You could always boil some water to test the electronic thermometer...

John

MT Gianni
02-26-2007, 12:27 AM
Beware the man with two compasses. The lesser $ spent the more range of accuracy that is acceptable is a well know fact in measurement circles. Gianni.

Sundogg1911
02-26-2007, 03:32 PM
I have 2 Lyman thermometers that can vary as much as 50 degrees. I brought one to work and had it tested against a calibrated one, and it was about 10 degrees higher. The other one always reads lower, sometimes about 40 degrees and sometimes about 50 degrees. I use the one that is about 10 degrees lower when casting, and the other one only as a reference in my feeder pot.

Lee W
02-26-2007, 08:06 PM
As for thermocouples, see this.
http://www.yankeecontroller.com/color_code.htm

PID, when tuned should not have any overshoot. Try retuning it when you are closer to the temp you have in the controller.
I have a PID Magma pot. +- 3F is normal. Worth the money if you want such a thing.

KYCaster
02-26-2007, 08:23 PM
Hey, guys. Its been well over twenty years since I worked in industry with temp. controlers. PID is a term I'm not familiar with, would you please define it for me.

Inquiring minds want to know.
Jerry

Lee W
02-26-2007, 08:33 PM
http://www.tcnj.edu/~rgraham/PID-tuning.html

I will try to answer questions about them. I currently work for a company that makes them...

garandsrus
02-26-2007, 09:37 PM
Lee W,

Can you suggest an appropriate PID for casting?

Thanks,
John

Lee W
02-26-2007, 09:52 PM
Any controller with an autotune feature would be the best. The relays on these will not hold up to a casting pot. A solid state relay is the best so make sure the controller has a logic output. (ON = a voltage such as +5 etc.)
You don't need a big one, 1/32 DIN will fit anywhere and can do all you need.

http://www.google.com/search?hl=en&q=1%2F32+din+pid+controller&btnG=Google+Search


BTW ebay has the best deals and I am not the seller.

http://business.search.ebay.com/pid_Temperature-Controllers_W0QQfromZwwwQ2egoogleQ2ecomQQsacatZ870 82QQssPageNameZWLRS

Sundogg1911
02-27-2007, 02:49 AM
KYCaster,
A proportional-integral-derivative controller (PID controller) is a common feedback loop component in industrial control systems.
The controller takes a measured value from a process or other apparatus and compares it with a reference setpoint value.
From Wikipedia

lurch
02-27-2007, 04:45 AM
Folks,

I want to preface this by saying that there is a very incomplete treatment of control theory issues in the following and I have tried to say it is a way that is minimally technical and "jargonized". If anybody wants to go further into it, I'll explain it the best way I can and try to stay out of the differential equations & complex number math.

Pleeeeeease understand that I'm not trying to flame anyone. I design analog control systems all the time using resistors, capacitors and opamps. I don't play with PID's. I do have a fair grasp of the basic concepts from that world and am intimately familiar with their analogues in the resistor - capacitor - opamp world. That said, here goes and please be gentle:


I would disagree that the optimal tuning for a PID controller is to have no overshoot. No overshoot is indicative of an underdamped (has no overshoot in its transient response) system. The transient response of an underdamped system is slower than it needs to be - i.e. it takes longer for it to come to its final value and stay there after being disturbed. A critically damped system takes the shortest amount of time to come to final value and will exhibit one overshoot and no undershoot as the controlled parameter comes back to the desired value. Going one step further, if you define a range of final values higher and lower than the set point or final value of the system that is considered acceptable, an underdamped system (exhibits both over shoot and undershoot in ever decreasing amounts as time passes) will likely lead to the fastest time that the controlled system comes to and stays within the band of values defined as acceptable.

I design power supplies at a major semiconductor manufacturer for a living and apply this all the time - it's basic control theory. Routinely, the control loops for these are designed to have as near to a critically damped response as possible and exhibit overshoot to varying degrees depending on the varying characteristics of each individual design. If the output of one of these supplies is subjected to a transient event, say a sudden application or removal of load, the response of the system is a fall or rise in the output voltage followed by an overshoot in the correction when coming back to the final value. The magnitude of these output disturbances is directly proportional to the amount of load change that occurred. The amount of deviation considered acceptable will determine the design of the system as a whole.

The same will be true for a lead pot under electronic control. A load increase would correspond to adding metal to the pot. In my case, I want the thing back to an acceptable temperature as fast as possible. That dictates as near a critically damped system as I can obtain. In the power supply, I can alter the response of the filtering network for the output voltage as well as the ramp up rate for the set value to control overshoots at startup and for events too fast for the control loop to respond to. I can't do that with the lead pot. I have been given a "plant" (that which must be controlled) that I cannot alter. The controller has no concept of a ramped set point to control overshoot at startup either. All I can do is tune or have the controller tune itself, to provide the best possible response to disturbances in the system as they occur when things have stabilized, such as adding sprue or ingots to the pot.

This has been accomplished very well. The auto tune of the controller (mine anyway) works around the setpoint. It does not consider the ramp up time. I was not clear about it before but will be so now: The 25F overshoot is at startup, not when the pot has stabilized and I am casting and adding the sprues back or adding a warmed ingot now and then to a mass of molten metal that is significantly more than the mass of added metal. Sure, if I let the pot get near empty and add a fist full of ingots, the temperature is going to go low, then overshoot and settle right back at the set temperature. That is to be expected. If I add an ingot whenever there has been about an ingot taken from the pot (not that I do that), the temperature deviation will be much smaller and the total melt may or may not ever get far enough from the set temperature to make too much of a difference. At worst, it will take some time to get back to temperature, but that time will be reduced with the critically damped controller settings.

Again, I'm not trying to flame here, I'm just saying that the settings used for the controller should reflect what the overall goal is. For me, it's getting and keeping things at temperature as fast as possible as I add my sprues back to the pot - which I generally do as I'm casting. For that end, the critically damped system is the way to go and as near as I can tell at present, that's what the controller did when it went through its auto tune procedure.

As an aside for the mathematically inclined, when looking at the frequency response of a system, a critically damped system will have a 135 degree phase lag at the frequency where the open loop gain of the system is one (45 degrees from 180 degrees), or 0dB. The phase lag for an underdamped system will be less than 135 degrees and for the underdamped system, ore than 135 degrees but less than 180 degrees. As the phase lag approaches 180 degrees, the system begins to become unstable and will oscillate forever. These quantities can be computed from the time step response of the system. Looking at the manual for the controller, it appears that this is exactly what is happening when the controller auto tunes.

Realize too, that the system you tune the controller to varies as the amount of lead in the pot varies. Less lead is less thermal mass and consequently has a faster response to applied heat. This changes the dynamics of the system and will affect the response of the system to disturbances. Say you tune the controller when the pot is half full (probably not a bad compromise). A full pot may be a little overdamped and as the pot approaches empty, it might go a little underdamped. Not much to be done about that - it's life. And, even though the response of the full pot may be a little underdamped, when starting from a cold pot, the integral gain portion of the control algorithm is probably going to "wind up" and cause an initial overshoot. I can make this happen at will in a power supply by making the set point ramp up time to small. It's the same thing just happening in a different place.

If you do auto tune and are not happy with the overshoot at startup, reducing the amount of integral gain should help reduce this at the expense of increased settling time and possibly increased steady state error. That's what I get from reading the manual on my controller and it makes sense to me.

garandsrus
02-27-2007, 08:38 AM
Lurch, Lee W,

Here's the PID (http://auberins.com/index.php?main_page=product_info&cPath=1&products_id=1) I am looking at... It states that

Common applications of this controller include controlling the temperature of industrial equipment, laboratory equipments, espresso machine, beer brewing system, BBQ grill and smoker, heat treatment oven, glass kiln, and aquarium

Do you see any problems with using this for a 20 lb casting pot? I have a K type thermocouple that I can immerse in the lead to measure the temp.

Thanks,
John

Newtire
02-27-2007, 09:28 AM
Hey, guys. Its been well over twenty years since I worked in industry with temp. controlers. PID is a term I'm not familiar with, would you please define it for me.

Inquiring minds want to know.
Jerry

Hi KY,
I find it interesting that I have the same problem with some of my co-workers using new acronyms that noone else has ever heard of. In the automotive industry it stands for a "range" (Parameter Identification) of values which the car's computer will see as acceptable inputs. Once an input is either over or under that value, the computer will store a code and maybe turn on your check-engine light. When I looked up the web definition on a search engine, I got "Pelvic Inflamatory Disease" and about a ga-zillion other terms!

lurch
02-27-2007, 11:18 AM
John,

That controller should do just fine. As Lee & I mentioned, you will generally need a relay (solid state or mechanical) to interface from the controller to the pot. I would highly recommend the solid state as there are no contacts to wear out there. If you do go solid state, get a 25A rated one to allow for the thing to warm up some and still he happy carrying the current required by the pot heating element. That place is as good as any to get one from from what I've seen. Also, you will want to mount the solid state relay on some form of a heatsink. In the one I did, the box serves that purpose just fine. If the relay is operated outside it's current/temperature ratings, its life will be shortened. The 10A relay rating on the relay in the controller you are looking at would work fine too (assuming it can be configured as the PID output and there's no reason to believe that it can't), but it will eventually go south. If that's the way you go, be sure and set the control time to something fairly long to reduce the rate that the relay cycles. The faster it cycles the finer the control, but the shorter the life of the mechanical contacts. With the solid state relay, set to as fast as it will cycle and be done with it.

If it were me and if the relay has both a normally open and a normally closed set of contacts brought out, you could wire the normally closed set in series with the pot heater and a solid state relay. Use the alarm setting to trip if the thermocouple ever got above something like 850F, and you have a little extra protection built in for a failed solid state relay.

With the thermocouple dunked in the pot, you will have to be very careful that the lead level never falls below it. If it does, you'll soon have some really hot lead... That's one of the reasons I went with the outside the pot location (the other being I was too impatient to wait for my immersible thermocouples to arrive...). You might also have the problem with glowing crucible walls if the lead falls below the thermocouple - don't know if you will or not, you just might. You have to pretty much run the Lee thermostat on 11 (I assume you are using a Lee) to get the full benefits of the controller, though it does provide a fairly decent fail safe mechanism.

I had also thought that it would be neat to try and put the controller & relay in the "tower" behind the pot, but realized that the temperature there is beyond the controller's ambient rating and probably wouldn't do the relay too many favors either - so much for really slick & simple.

lurch
02-27-2007, 11:44 AM
Uh oh. I just looked a little closer at those controllers. It would appear that the one you are looking at John, is a dedicated relay output device and will not drive a solid state relay - at least not without an auxiliary 5V to 12V power supply. It would really help if they posted a link to the real data sheet for the darn things...

There is a solid state relay output version should you decide on that direction, but the relay version should do what you want it to do - for a while. Just depends on how long you want it to last and if you want it easily fixable or not for when it does break.

Also, the alarm contact is not rated to sufficiently handle the load the pot would place on it, so forget about using it as an interrupter in the case of a failed solid state relay. :groner:

Sorry 'bout the confusion guys. I really should read a little closer before I start spouting off. :roll: