# PID (Temperature controller Setup)



## booboohead (Jan 2, 2011)

Good Day,

I am having issues setting up my PID that I have put together with the intent to control temperatures when smoking meat. I need help with those experienced in automation. A typical application would be to set the controlled temperature for 110 C and if it drops by 5 C kick off the SSR relay. Attached to the relay is a 12V DC fan that will provide air to the smoker in turn raising the temperature. When it reaches 110 C - the SSR relay will turn off. I am confident with my wiring as attached in this post. 

Not shown in the diagram: I had to use an old AC adapter after the switch to step-down the Higher AC Input to a lower 12V DC. Could it be that I must purchase a 5-60V DC DC to DC SSR and run the fan directly to it? I don't see why not the adapter is rated for the AC range of the SSR?

I am of course controlling a fan and not an element - this is simply the wiring I followed. 

Issues/Questions:

1) My PV reading will go well below sub zero shortly after being taken out of hot water and takes 5-7 mminutes to get back to idle temp
2) The PV value is off by 6 degrees when idle - not sure if this is common before calibrating?
3) When setting the SV to a test temp of 25 and I bring the idle temp to 25 the fan will not trigger? I have set it to be 3 degrees outside of my SV
4) Using Autotune will trigger the fan 



PID SPECS

REX C100 FK02V*AN

http://www.rkcinst.com/english/pdf_manual/imnzc21e1.pdf

Power : AC 100-240V 50/60HZ
Output, alarm and self-tuning can be indicated by:LED
Relay output: contact capacity 250V AC 3A (resistive load)
Insulation resistance: >50M ohm(500V DC)
Insulation resistance : 1500V AC/min
Insulation resistance : Power Consumption < 10 VA

SSR SPECS
-Output Current:40A
-Input VoltageC 3-32V
-Output Voltage:24-380V AC
-Output Voltage Range:Standard Type


----------



## concrete_joe (Oct 6, 2014)

what thermo-couple are you using?

a PID may be too complicated, look at Maxim for 8pin dip that can do the job. 

the SSR must be rated for the voltages and currents needed, etc.

perhaps you killed one of the SSR's ?? where's the resistor to limit that current on the control side of SSR??

i would perhaps ditch the heavy 40A SSR in favor of a simple power mosfet, put a 2k resistor across PID SSR and tie gate of P-channel mosfet to the "-" terminal of PID SSR with a 1k resistor. the mosfet controls the current of the fan, etc.

the PID is a on/off type of convergence switch. i have found that precise temp control using fans come by way of PWM control, like some computer PC motherboards use. if you build a PWM controller set the frequency at about 30Hz, then PWM that to the fan.


----------



## booboohead (Jan 2, 2011)

concrete_joe said:


> what thermo-couple are you using?
> 
> a PID may be too complicated, look at Maxim for 8pin dip that can do the job.
> 
> the SSR must be rated for the voltages and currents needed, etc.


Thanks. Yeah I know but I have an AC to DC adapter in the output of the SSR. This serves the purpose of providing the necessary voltage in AC and converting to DC for the 12V PC fan.

Another thought is to completely bypass the SSR and hook the fan to the SSR OUTPUTS on the PID. These send a low voltage signal to the SSR to power it so it can relay as needed. I believe the 12V fan falls in this range. Thoughts?


----------



## concrete_joe (Oct 6, 2014)

probably much easier to find a PID that runs in the 12vdc range, then you can have the whole system run from a single wall wart or battery, etc.

but in general, if the components are rated at the voltages you have on their inputs then it should work. i am assuming the PID SSR output matches that of the control side of the bigger SSR?

you are better off looking at forum.allaboutcircuits.com


----------



## ddawg16 (Aug 15, 2011)

Lets to get basics....

It looks like you are using a cheap Watlow or Omron.

Make sure you have the right TC and the unit configured for the right one. It should be a type J.

Best way to confirm it's accurate...dip the TC into an ice bath....it should read 0 deg C. Then dip it into a pot of boiling water. It should read 100 C adjusted for altitude. If the reading goes down when heated up, the TC is wired backwards.

The controller needs to be configured correctly. On/Off, reverse acting.

The fan....you really need a time delay on there. It's coming on during Autotune because the controller is turning on the output above 50%. So the fan comes on. To get good control you need the fan to stay on for about 30 seconds after the heat turns off. Otherwise, you are not pushing the heat off those heater elements.

Tuning....Set integral and derivative to 0. Adjust gain until it overshoots. Back off gain a little then adjust integral until it holds SP.


----------



## concrete_joe (Oct 6, 2014)

ddawg,
its a fan blowing air into a smoker with a TC as the component in the heat, etc. there is no "heating element".

you can make one, but i would use PWM and a temp stepper like Maxim has, or just buy something already done and adapt it to the smoker.
http://www.abt.com/product/61385/Big-Green-Egg-DIGIQ.html


----------



## booboohead (Jan 2, 2011)

ddawg16 said:


> Lets to get basics....
> 
> It looks like you are using a cheap Watlow or Omron.
> 
> ...


Worse its actually a REX..EBAY China Special LOL. Got the heatsink, K Thermocouple and PID for $25. I will take your advice - not sure what you "mean by On/Off, reverse acting"

As per my model code my PID is a Reverse PID Action, K Type, Voltage Pulse Output with a Deviation high alarm (no second alarm)


----------



## curiousB (Jan 16, 2012)

if you plug the AC adapter for the DC fan into a wall plug does the fan run full speed? I am wondering of the AC/DC can deliver enough DC current to turn a fan. You have to have voltage and current right.

If you put a DVM on the SSR input side do you see the voltage there calling for the relay to actuate? In otherwords is the controller sending a output to the SSR?

Can you send a 12VDC voltage into the SSR input instead of from the controller to see if the relay actuates, the AC/DC xmfr works and the FAN runs (ie verify the drive side of the system).


You need to narrow things down. Its not apparent if you have a control issue or a drive issue.

Be sure that a DC voltage into the SSR drives the FAN at full tilt before you waste a lot of time on the control side.


----------



## concrete_joe (Oct 6, 2014)

also depends on type of SSR that big one is. if its a N type then you put power on fan + and connect fan - to + of SSR, then - of SSR to gnd.


----------



## booboohead (Jan 2, 2011)

curiousB said:


> if you plug the AC adapter for the DC fan into a wall plug does the fan run full speed? I am wondering of the AC/DC can deliver enough DC current to turn a fan. You have to have voltage and current right.
> 
> Confirmed. I did this when I was selecting my Power supply for the fan.
> 
> ...


Thanks folks ever so much for your help!

@concrete_joe: Heck no I don't want to pay over $200 for a unit I can do for $35 bucks in addition to gaining some electrical knowledge lol


----------



## ddawg16 (Aug 15, 2011)

concrete_joe said:


> ddawg,
> its a fan blowing air into a smoker with a TC as the component in the heat, etc. there is no "heating element".
> 
> you can make one, but i would use PWM and a temp stepper like Maxim has, or just buy something already done and adapt it to the smoker.
> http://www.abt.com/product/61385/Big-Green-Egg-DIGIQ.html


I saw the "Element" in the diagram and thought of heater elements...

Actually, I'd toss the SSR. You are making it more complicated than it has to be.

The 'output' of the temp controller should be a physical relay. Most of them have either NO/NC outputs or a jumper to configure it for NO or NC

If you are using a 12Vdc fan...then run one leg of the 12v through the controller contacts. Done.

Assuming your relay is NO, set up the controller for normal acting, not reverse acting


----------



## booboohead (Jan 2, 2011)

ddawg16 said:


> I saw the "Element" in the diagram and thought of heater elements...
> 
> Actually, I'd toss the SSR. You are making it more complicated than it has to be.
> 
> ...


I might just do that..mentioned that in Post 3 of this thread. I know some have done this and say it decreases the life of your PID - but due to cost being so cheap I am not too concerned. I will take a print of the ideas from others and use that as a last resort. I know my 12V fan is actually within the range of voltage that the pid uses to "power" the relay. I know I know...this is not the same as the power provided to the load on the other side of the relay.


----------



## concrete_joe (Oct 6, 2014)

its gonna cycle quite a bit, which will eventually kill a mechanical relay and eventually the fan. i suspect for a smoker there is no way to keep the fan running at say 5-10% PWM as this will likely drive temps up to high.


----------



## ddawg16 (Aug 15, 2011)

Exactly what does the fan do?


----------



## curiousB (Jan 16, 2012)

combustion air for the embers. Add air, combustion goes up, heat goes up, smoke goes up. 

All this talk is giving me a hankering for some good ole BBQ.......


----------



## ddawg16 (Aug 15, 2011)

curiousB said:


> combustion air for the embers. Add air, combustion goes up, heat goes up, smoke goes up.
> 
> All this talk is giving me a hankering for some good ole BBQ.......


That is what I thought.

I love technology....but, in a case like this, simplicity seems to be the way to go.

I'd use a mechanically operated thermostatic controlled damper


----------



## concrete_joe (Oct 6, 2014)

ddawg16 said:


> That is what I thought.
> 
> I love technology....but, in a case like this, simplicity seems to be the way to go.
> 
> I'd use a mechanically operated thermostatic controlled damper


you can, but using smoking coals means the rate of temp change is very slow. with forced air control you can ramp quicker and the controller can account for coals burning down, and with some existing controllers out there you can program a temp curve any way you like.

i suspect though, the fan in OP's need should have a NC damper door so that when fan is off air cannot freely flow, perhaps a small hole in damper door to allow minimal air to keep ambers lit, etc.

i can also suggest you take a look at building a SMT reflow oven controller (buy a DIY kit), the DIY ones using tabletop toaster ovens (you toob has plenty of vids). the controllers are programmable thus would allow you to build programs for anything you are cooking, thus giving consistent cooks everytime, etc.

if you want basic set & forget temp the look for simple oven controller chips, National and Maxim have some. look at LM3911, etc. small dip and a mosfet for fan driver (with a few discrete parts) should yield a nifty controller.

but like i said, smoking is an art, starting and finishing food using a programmable controller like the reflow ovens use would be most flexible and yield best results.


----------



## concrete_joe (Oct 6, 2014)

take a look here, see MAX6510, very simple.
http://www.digikey.com/Web%20Export/Supplier%20Content/Maxim_175/PDF/maxim-dg-thermal-management.pdf?redirected=1


----------



## curiousB (Jan 16, 2012)

concrete_joe said:


> take a look here, see MAX6510, very simple. http://www.digikey.com/Web%20Export/Supplier%20Content/Maxim_175/PDF/maxim-dg-thermal-management.pdf?redirected=1


Doing this at a component level instead of a module level is 10-20x the difficulty. There are dozens of brands of controllers out there. I see little value in reinventing the wheel slugging it out at a component level. I doubt the OP does a lot if PCB artwork


----------



## concrete_joe (Oct 6, 2014)

curiousB said:


> Doing this at a component level instead of a module level is 10-20x the difficulty. There are dozens of brands of controllers out there. I see little value in reinventing the wheel slugging it out at a component level. I doubt the OP does a lot if PCB artwork


i suggested the same a few posts back, but in OP's diagram he's at a component level now, etc.

you can buy a reflow controller already built, would just need the know-how and free software to program it, which is basic & simple to learn and do.

but i never discourage doing things at the "component" level, leave the choice up to OP, etc.


----------



## curiousB (Jan 16, 2012)

I think your diagram is wrong. 


pin 6 & 7 are power input lines to power up the controller. You show them as outputs to the SSR. You have power coming into pins 1 & 2 which are alarm outputs. Fortunately NO (normally open) so you likely didn't damage anything. Did the controller even light up?!?! I suspect not, and that might have been a useful bit of info to include.....

I believe you power up the controller via 6&7 (but I am not sure if it is 120VAC or something less).

The control output of the controller is pin 4&5 which can be configured as a simple NO dry contacts.

pins 4&5 can switch 250V @ 3A so it seems you don't need the SSR since I doubt it is more that 300W to a small blower fan. You could still use the SSR to save on the relay contacts from wear out (repeated switching of an inductive load). I would do that after you get it working without...

So then I would wire neutral to one side of the AC/DC transformer 120VAC receptacle. Then I would run 120VAC hot to pin 4 of teh controller and then pin 5 to the hot side of the receptacle (now a switched receptacle) for the AC/DC xfmr to the fan.

I would then run power into pins 6 & 7 but I am not sure what voltage your controller accepts (120 or something less).



.


----------

