PID Temp Controller Box - Page 1
Forum section: electronics / projects

author: metalphreak
author_rank: Frequent Contributor
timestamp: April 27, 2012, 04:43:28 pm
content: Finally got around to finishing up the panels and wiring for this tonight. Still have to do the fans though.Basically, I wanted something to control a small snack oven for SMD reflow soldering, but I also want to try some of that sous vide cooking stuff. I saw something on Hackaday I believe, where someone just put an output socket on the back, and thought it was a brilliant idea. Rather than going for a full custom microcontroller based system, I grabbed an off the shelf PID controller. It's a standard 1/16 DIN unit made by Sestos. Grabbed it off ebay for about $40 including a 25A Solid State Relay, and a thermocouple.Full parts list:$40 Sestos PID Controller + 25A SSR + thermocouple$5 SSR heatsink$20 Multicomp ABS case$6 K Type Thermocouple Socket Panel Mount$3 IEC Socket and Fuses$7 12V 1A DC psu$5 dual outlet power socket$free assorted cable, switches and some fans I had laying aroundWorks pretty well so far in my testing with a lamp and a lighter on the temp probeThis is what I plan on mounting in the oven from the back:http://www.goodluckbuy.com/thermocouple-k-type-probe-temperature-sensors-100mml-2m.htmlwith a standard k-type plug on it insteadI might do a fancy microcontroller based system later on. Shouldn't be too hard as the SSR is switched by 5-12V DC, and I already have a 12V DC power source in there.

author: IanB
author_rank: Super Contributor
timestamp: April 27, 2012, 06:00:44 pm
content: One thing puzzles me: a PID controller is an analog device, but I don't see where you have analog power control? A relay is a digital on/off device.Is the PID controller doing PWM on the solid state relay or some such?

author: Kremmen
author_rank: Super Contributor
timestamp: April 27, 2012, 07:57:10 pm
content: Yep, you got it. I recently built a similar set with a very similar controller. Mine has a 50 step sequencer built in so i can do pre-soak and ramp-up to liquidus and then back to room temp all automatically. Works like a charm. Maybe this one has similar stuff. I also built a small circulating fan inside to minimize hot spots.So, the output of the controller is meant for solid state relay. While the controller does PID, the output is not really pwm, unless you count a very slow oneThey say the controller is a "fuzzy PID" so it "intelligently controls the relay". The shortest on time i have seen is something less than 1 sec. I use a small Toshiba 8 amp device in a TO-something 4 pin package, fixed to a 200 x 200 mm aluminum plate fitted in the original controller space. The normal soldering cycle does not really heat it up, the plate just warmsup enough to notice. So you don't really need an SSR capable of tens of amps. The Toshiba is also zero crossing switching so operation is nice and quiet, no pops or dimming the lights when it switches on and off.

author: SeanB
author_rank: Super Contributor
timestamp: April 28, 2012, 07:07:48 am
content: PID controllers are able to drive either an analogue , digital or relay output, depending on the model. Some allow all three as output options, some only one. The better ones have control over the digital outputs so as to handle controls that require specific delay times between operations ( I am using one on an airconditioner so adjusted to give a 5 minute minimum delay on switching, and am using another on a fridge with the same delay) or you can use the SSR output and get a cycle by cycle switching.

author: metalphreak
author_rank: Frequent Contributor
timestamp: April 28, 2012, 07:53:29 am
content: Yeah the version I got was the 220V AC input, SSR output version. They come in a variety of versions, and yes, some of the more expensive ones can be configured for different outputs.There's 12-24V DC/AC versions, as well as output options for a relay, SSR digital out, and 4-20ma current output.This is the seller I got mine from:eBay auction: #220888955443I would have liked one of them with the built in set points, but all the ones I could find were 3x the price.

author: SeanB
author_rank: Super Contributor
timestamp: April 28, 2012, 08:12:20 am
content: If you open it up you will find the PCB is laid out for all the output options, with the desired function being selected by either adding a small relay ( for relay option) or moving some marked wire links there. The menu structure allows the output to be selected, so the unit can be repurposed. There is normally an area for a small 24V relay that is used for the alarm function, it can additionally be used for a secondary control loop that can be used for fast heating ( all heaters in parallel initially, but switched to series when hot so the loop is more stable) or for an alarm when the probe is disconnected.

author: T4P
author_rank: Super Contributor
timestamp: April 28, 2012, 04:54:40 pm
content: A little sad to say ,http://www.dealextreme.com/p/digital-temperature-controller-66334?item=1http://www.aliexpress.com/product-gs/486924527-25A-SSR-input-3-32V-DC-output-24-380V-AC-single-phase-ssr-solid-state-relay-wholesalers.html

author: metalphreak
author_rank: Frequent Contributor
timestamp: April 28, 2012, 06:43:20 pm
content: That's only got a relay output, not a 12V DC signal for an SSR.The one I bought was the cheapest SSR one I could find that actually had a proper manual/specs to make sure it was what I wantedThe relay ones are always the cheapest. You have to be very careful if the seller has a rubbish description. They tend to list all the possible version specs, but not the actual one they're selling. Max current on the relay is 3A which is useless for my needs.

author: T4P
author_rank: Super Contributor
timestamp: April 28, 2012, 07:58:58 pm
content: Quote from: metalphreak on April 28, 2012, 06:43:20 pmSSR doesn't actually need 12V right ? I see most of them at 3-32VDC ( actually 12V is for the electromechanical relay )

author: IanB
author_rank: Super Contributor
timestamp: April 28, 2012, 08:05:26 pm
content: Quote from: SeanB on April 28, 2012, 07:07:48 amI have a hard time believing that a controller with a relay output and a 5 minute minimum cycle is actually a PID controller. It seems to be more like a thermostat. Now a thermostat could be a very valid control mechanism, but it is doing a disservice to the capabilities of PID control to call it a PID controller.

author: metalphreak
author_rank: Frequent Contributor
timestamp: April 29, 2012, 07:24:13 am
content: Quote from: Dave.S on April 28, 2012, 07:58:58 pmYes the SSR input is 3-32V DC, but the controllers with a relay "output" are just that, a relay with NO, NC, and COM terminals (the relay is internal, it's not an output to drive an external relay's coil). You would then need your own 3-32V DC source to connect to the relay terminals to control the SSR.IandB: A PID controller is just an control feedback loop using proportional, integral and derivative values. It doesn't have to be super fast to be a valid PID controller. If you are monitoring the temperature at one point, and the cooling/heating source is far away, and it takes 5-10mins for the temperature to change, you could easily overshoot it with just an On/Off thermostat.The PID controller needs to be matched to the environment its controlling. If you are controlling something like a DC motor then of course you need something fast.Doing tests previously with my mini oven, if I turned off the element once I reached my target temperature, it would continue rising to 40-50 degrees over!On these you can set the control period from 0.5s all the way to 2mins. It only samples the temperature a couple of times per second anyway.When its running, you can change the bottom display from the set value to an output value. It shows something like A 100, A 63, A 0 etc. I'm guessing this is the "analogue" PID output value from 0 to 100%, which is then used with the control period to determine the output on time. ie A 50 is 50%, so with a 4 second control period it would turn on the output for 2 seconds, and then off for 2 seconds.

author: Kremmen
author_rank: Super Contributor
timestamp: April 29, 2012, 07:48:56 am
content: Quote from: IanB on April 28, 2012, 08:05:26 pmPlease do not confuse unrelated things. Firstly, the cycle time and internal time constants of a controller are related to the time constants of the process, whatever those may be. There is no universal rule defining any specific value after which you no longer have a "true PID" or whatever.Secondly, you also should'n confuse the control law (i.e. PID in this case) and the method of process command output. All time-optimal control systems have bang-bang outputs, always on a hard limit up or down (or off). A temperature controller is the typical of typical examples: not only would it be pointless to control an inherently slow process by an analog command output, the actuators would be needlessly expensive with no associated gain. That is why you usually see only "relay" type command outputs in temp controllers. When the process is relatively fast as in the case of a pizza oven turned into a reflow system, the SSR makes sense to conserve the switc component from wear and tear, and also for EMI reasons. For a pottery oven where the process time constants are minutes, you will do fine with ordinary relays. And the there are things like lime kilns in cement factories, baking thousands of tonnes of lime. Analog heating elements? naah...Other examples would be things like switching power supplies, BLDC motor controllers and suchlike. All of them have a switched output and all of them (may) have a PID controller or several inside. Every field oriented AC servo controller is going to have at least 2.

author: IanB
author_rank: Super Contributor
timestamp: April 29, 2012, 08:11:29 am
content: I'm not confusing things.I'm simply suggesting that when you have cyclic control with a minimum off time measured in minutes the overall process time constant would need to be measured in hours. I don't know of anything in the home that is that slow (even room and house heating is faster than that). We are not talking industrial uses like cement kilns in this thread, we are talking amateur home hobby applications.Now if you are measuring a temperature at one point and attempting to control it with a heat source 5/10 minutes away, then I say "good luck tuning that". Nobody has mentioned tuning in this thread, but a PID controller is only as good as the tuning. I have come across plenty of engineers who struggle to tune PID controllers effectively. I dare the average home hobbyist to tune one effectively when the process time constant is very slow and has significant dead time in it.

author: SeanB
author_rank: Super Contributor
timestamp: April 29, 2012, 09:13:27 am
content: Yes, PID controllers are pretty easy to turn into oscillators. I have done that with pneumatic ones controlling a valve during setup, but once the unit is set up it will be stable, yet will respond to step changes fast and with minimal overshoot.The nice thing with the modern digital units is that they almost all have an autotune function, which sets them up to the right constants for the PID side, and these are generally pretty good in most cases. In most cases it just works. Fast things in the home are motors, but there are plenty of slow things. Refrigeration units like the freezer, fridge and airconditioner, where there are generally only 2 possible states ( ignoring the newer inverter units where the PID output is analogue and controls the compressor over a range of pumping refrigerant pressures) and you need a certain time between starts to enable pressures to equalise. Heating, where you want to minimise the starts on a furnace and still minimise fuel consumption.

author: Kremmen
author_rank: Super Contributor
timestamp: April 29, 2012, 01:16:59 pm
content: Quote from: IanB on April 29, 2012, 08:11:29 amWell, i think you are, based on your earlier statement that i commented. Or would you like to rephrase in case i got it all wrong?QuoteFair enough but these things in themselves have nothing to do with the algorithm used for controlling. My point was that the magnitudes of time constants and delays are not at all relevant to identifying the kind of control algorithm you might have. Those are process variables to be taken into account when designing the control, not features of the controller itself.QuoteThere is no theoretical design problem whatsoever controlling any time delay in a process. The state of the art covers these question in more width and depth than a layman - for lack of better word - might think. The only thing you cannot change is the physical reality, so the time constants of your control loop necessarily have to scale to the process delays. Again i ask how is this relevant to identifying the control algorithm?

author: Unknown
author_rank: Unknown
timestamp: April 29, 2012, 02:09:03 pm
content: Quote from: metalphreak on April 27, 2012, 04:43:28 pmCool stuff!! - I'm working on a temp controller at the moment and it's great fun - I highly recommend it; I didn't really understand the tuning side of stuff as i'm really bad at maths so I just ended up just making some code up for that bit but it seems to work nicely. I'm hoping to add re-flow temps to the in-built programmes.

author: IanB
author_rank: Super Contributor
timestamp: April 29, 2012, 04:45:46 pm
content: Quote from: Kremmen on April 29, 2012, 01:16:59 pmOK, on re-reading I see that I made a bit of a throwaway comment that was a bit vague and woolly. It was not really meant to be a deep theoretical analysis. I'll elaborate my point.When PID controllers are implemented digitally they usually have a scan rate or cycle rate. They do their control calculation and update their output on a defined interval that depending on the control requirements may be from a fraction of a second to many seconds.If the scan rate is small relative to the process time constants then PID control theory in the continuous time domain can be applied to the analysis and tuning of the loop with good results.However, if the scan rate becomes too large the analysis of the control loop starts moving from the continuous domain into the discrete domain. It's like moving from differential equations to difference equations. There is still a theory for analysis of the control loop but it is a different or modified theory.A control loop which is well tuned and stable at a fast scan rate may, and often will, become unstable if the scan rate is made slower. The implicit time delays introduced into the loop by the slow cycling affect the tuning.If the scan rate becomes really large compared to the process time constants the control problem tends towards on-off control with the control output switching in big steps. That is what I meant with my "thermostat" comment.

author: Kremmen
author_rank: Super Contributor
timestamp: April 29, 2012, 06:44:59 pm
content: OK, now i understand your meaning better.Basically i have no argument with anything you say. In fact the temp controllers that we have discussed here do operate in just this on/off fashion. But still i maintain that it is not an inevitable consequence of their nature, more a practical feature.A digital implementation of (say) a controller is by definition a discrete time system. It cannot be anything else since the connection to the real world is by periodic sampling of the variables.Regarding discrete time systems such as a discrete PID controller, my recommendation would be to analyze them as they usually are - via the z transform. Then you can apply the well known rules of analysis such as for stability, that the poles of the transfer function must lie inside, or at least on, the unit circle of the complex z plane. This analysis method makes it obvious that sampling time is just a parameter in the calculation of the z transforms. Once you have the z transform of the transfer function it is a well known technique to perform a root locus analysis to see if the loci stay within the boundary of stability. If not, again well known methods can be used to trim the control terms to bring the transfer function into order. So varying the sampling rate is going to move the root loci and then you may have to trim the control terms or other variables to re-stabilize the system.

author: T4P
author_rank: Super Contributor
timestamp: April 29, 2012, 07:27:20 pm
content: The one on DX (which is much cheaper on DX) is the C700 that has a 5V Logic output .This onehttp://www.aliexpress.com/product-gs/543885943-New-Dual-Digital-F-C-PID-Temperature-Controller-REX-C100-Smart-temperature-meter-thermostat-digital-temperature-wholesalers.htmlhas the info but which is the C100This is the cheapest C100 :http://www.aliexpress.com/product-fm/504102627-100-New-Dual-Digital-F-C-PID-Temperature-Controller-REX-C100-wholesalers.htmlwith a 12V output

author: metalphreak
author_rank: Frequent Contributor
timestamp: April 30, 2012, 08:14:59 am
content: REX-C700http://www.rkcinst.co.jp/english/pdf_manual/imnzc18e3.pdfREX-C100http://www.rkcinst.co.jp/english/pdf_manual/imnzc17e3.pdfC100 / C700 etc is just the model number for the series. There are different versions of each. You can clearly see on the DX images, the label on the side for the pinout, and it only shows relay contacts, as its the relay model. The SSR ones have a specifically labelled SSR output on them.The full model number on the label is REX-C700-FK02-M*AN -> PID autotuning (reverse), K type 0-400deg C,Relay Contact (M), Alarm 1 Deviation high, No Alarm 2.Part of the reason why I bought from 'mixtea' on ebay, is he fully specifies which model he is selling.Too many of the generic sellers list both relay and SSR output in the specs, but this is just for the overall series. They DO NOT have the capability to do both relay and SSR in one model on these cheap units. Feel free to waste $20 finding out the hard way though.

author: Teknotronix
author_rank: Regular Contributor
timestamp: April 30, 2012, 11:15:59 am
content: Nice work there!I am in the process of putting my oven together. Bought a Breville Pronto fan forced oven, hope it turns out well. Ordered a Crydom SSR and a K type thermocouple from element 14 today which should show up in a week hopefully.For the controller I went with this option as it seemed great for the price:http://www.rocketscream.com/wiki/index.php/Reflow_Controller_Shield_(Arduino_Compatible)http://www.rocketscream.com/blog/category/projects/arduino-related/reflow-oven-controller/

author: T4P
author_rank: Super Contributor
timestamp: April 30, 2012, 05:52:25 pm
content: Thanks for giving me a hard knock on my head , i appreciate it .I decided to do some heavy searching and found this :http://www.aliexpress.com/fm-store/708669/211228595-494653745/PID-Digital-Temperature-Control-Controller-F-C-CH102.htmlAnd then earlier on i found the same one you bought on ebay :http://www.aliexpress.com/product-fm/547278095-Digital-PID-Temperature-controller-25A-SSR-K-thermocouple-probe-wholesalers.html