PDA

View Full Version : PID questions


StirCrazy
03-09-2010, 04:11 PM
Ok for all you guys out there that play with PIDs I have a couple questions. I am looking for one that can accept the input from two different K probes.

I want one input to be used for measuring temp and switching on/off an element to maintain this temp. the other probe input is used to measure a different temp and then make changes to the first one.

so lets use a oven as an example.. I want the one probe to measue the oven temp and then maintain that temp. I want the other probe to measure the temp of the roast in the oven and then be able to set off an alarm when a preset is reached (would be nice if I could program more than one preset) and also the ability to change the oven temp set point if another condition is reached.

another nice feature would be able to control the first probe so that I could say hold at one temp for two hours then raise the temp 10 degrees every hour.

anyways if some one knows how I can do this for an afordable price let me know..

Thanks
Steve

ScubaSteve
03-09-2010, 05:55 PM
Doing dual input control systems is a PITA. Actually building it isn't really an issue but tuning and making it stable is. The simplest set-up is have it set-up such that you are essentially using the temperature difference between the two probes but that only works for certain applications.

Can you give me a pretty good decription of what you are trying to accomplish? I need to know what is part of the system that you are trying to control (like size and number of tanks, where your heating elements are located, how you are moving the flow about, etc). I'll try me best to draw up the most stable configuration for you.

banditpowdercoat
03-09-2010, 08:11 PM
YA, I don;t know of Any PID controller that has RTD inputs. But I do know Honewells UDC 5000 has a 4-20mA input. That can be used to set setpoint alarm points etc.

But, that said, Siemens LOGO Mini PLC now has PID capability, and you can add more than one RTD card so with that it may be possible.
Any other full blown PLC it will be capable, but your looking at alot of $$$. The LOGO's are only a couple hundred, and about $100/temp card. I have a couple of them on my 150g, and use them at work alot too. Great little relay box for sure.


What is it your attempting?

StirCrazy
03-09-2010, 08:29 PM
Doing dual input control systems is a PITA. Actually building it isn't really an issue but tuning and making it stable is. The simplest set-up is have it set-up such that you are essentially using the temperature difference between the two probes but that only works for certain applications.

Can you give me a pretty good decription of what you are trying to accomplish? I need to know what is part of the system that you are trying to control (like size and number of tanks, where your heating elements are located, how you are moving the flow about, etc). I'll try me best to draw up the most stable configuration for you.

ok so what I am doing is an electric smoker. so I need a PID to maintain a setpoing temp. I found some with rise also so I can program it to sit at 120 degrees for 2 hours then 130 for an hour then 140 for an hour so going up 10 degrees every hour till it hits 180 then hold. this would only be one type of smoke, the rest would be a set temp till I turn it off.

the other probe I was hoping I could stick it into a hunk of meat and have it display the meat temp and then set off an alarm at a specific temp and then when another temp is reached I was hoping I could have it adjust the main temp. so for an example when the meat reaches 180, drop the cabnet temp from 225 to 180 for a holding tempature.

I can do everything buy buying to cheep PID's except for the hold temp thing which isn't a hugh deal would just be nice, but I was hoping to be able to get away with just one if I can.

this is the one I was thinking of using for the main control if I do a two PID setup.
http://www.auberins.com/index.php?main_page=product_info&cPath=1&products_id=5

Steve

DiverDude
03-09-2010, 09:15 PM
Ok....as someone who loves to smoke a brisket (or whatever) on the weekend, you've got my curiosity.

Are you making your own smoker or modifying an existing one ?

I've seen systems like this for charcoal smokers -but they controla fan which blows more or less air into the combustion chamber to control heat.

Also, PID my be overkill for something this simple. Usually the way these things go is that you set your chamber temp and then monitor internal meat temp until done. Then you either turn off the heat and/or remove the meat (or fish !) mmmmm....mesquite smoked Regal Tang !

Kiddding !!! Juuuust kindding 'bout the Tang !

banditpowdercoat
03-09-2010, 09:19 PM
Those controllers will work nicely and you most likely won't find what your looking for in 1 controller. If you do, expect it to cost thousands!

I have a few of those 1/16th DIN controlers in use too, on my powder coat oven's etc. They work great.

One thing you could do is run the main temp, through the "meat temp" controllers second alarm output. In a N/C setup, so the main controller control's heat, but if the meat get's to the second alarm level, the alarm controller interrupts the main heat control circuit

StirCrazy
03-09-2010, 10:13 PM
Ok....as someone who loves to smoke a brisket (or whatever) on the weekend, you've got my curiosity.

Are you making your own smoker or modifying an existing one ?

I've seen systems like this for charcoal smokers -but they controla fan which blows more or less air into the combustion chamber to control heat.

Also, PID my be overkill for something this simple. Usually the way these things go is that you set your chamber temp and then monitor internal meat temp until done. Then you either turn off the heat and/or remove the meat (or fish !) mmmmm....mesquite smoked Regal Tang !

Kiddding !!! Juuuust kindding 'bout the Tang !

building my own, I tried to buy a MES at canuck rubber but they sold out befor I got there and the reg price on the one I want is about 450 so I said screw it i'll build my own. I can get the sheet metal for around 150.00 and that is with them bending up the two boxes for me so all I have to do is weld them up and put isulation between them. be about 20 bucks for an element, 75 bucks for the one PID then some racks and paint. figure I'll be done for about 250 to 300, but instead of getting a 18x16x40 smoker, I'll get one that is 24x24x48 with a lot more function and automation. I was looking at it and I am thinking of making an external chip burner with a 120watt element in it or something like that.. I can hook that to the one alarm output of the PID and the main burner to the 10 amp output so it directly controls the main burner to maintain the heat in the smoker, but I can put a varable in so that if the temp gets over 130 then energize alarm 1 and that will start the smoke generator.

Bandit, you can't realy control the smoker temp through the meat as the idea of smoking is long and low heat.. so you want the smoker to be at 235 degrees for regular smoking, and the meat will slowly cook, in the case of a brisket it could take 12 to 16 hours. if you use a difarential type thing then it will crank the heat to start and slowly lower it which will not give you good BBQ. what I was thinking is a brisket is done when it is 195-205 degrees (varries with different people) so I thought it would be handy to have a hold feature so when the one probe read a meat temp of 205 it would tell the controler to change the smoker temp from 235 to say 175 degrees as a holding temp to prevent over cooking. but that is going to be to much work.. I found one that can do it but I am looking at 600 bucks instead of just over 100 for a couple single input ones.

the only time the cooking process changes is if I want to cold smoke, then I want to run the smoke generator but keep my cabnet temp under 90 degrees, or when making Keilbassa. for this you want to hold at 120 degrees for 2 hours to dry it out, then jump 10 degrees every hour and apply heavy smoke till you hit 180 degrees then hold at that temp till internal temp of the meat is what ever. so I could use the ramp functions to do 120 for two hours then each step would be 10 degrees higher for 1 hour. and again I could set the alarm 1 relay to 125 degrees so it starts the smoke after the first step is complete.

I guess the simplest way is just to get the one PID for 77 bucks as it has a 20amp relay built in and the rise function and just use a wireless theromomitor to monitor the meat as I already have one of thoes..

Steve

StirCrazy
03-09-2010, 10:16 PM
Dan I just re-read your sugestion and I think I misunderstood, do you mean to use the meat controler PID alarm output to energize the smoker temp controler? so that as long as the meat is under the set value it will allow the main controler to do its thing, but ones the meat reaches the set temp it cuts the power off to the main controler? the only issue with that would be for the first 2 or 3 hours you don't put the probe into the briskit as you want the outside to be cooked a bit befor you insert it to eliminate the possibility of draging bacteria into the inside of the meat where it is going to be at a lower temp for longer.. mind you that is just a set point change.. start it out at 250, then when I stab it readjust it to the temp I want the meat to be.. not a big deal..

so more or less using the meat temp as a limit switch for the cabnet temp.

Steve

banditpowdercoat
03-09-2010, 10:32 PM
Dan I just re-read your sugestion and I think I misunderstood, do you mean to use the meat controler PID alarm output to energize the smoker temp controler? so that as long as the meat is under the set value it will allow the main controler to do its thing, but ones the meat reaches the set temp it cuts the power off to the main controler? the only issue with that would be for the first 2 or 3 hours you don't put the probe into the briskit as you want the outside to be cooked a bit befor you insert it to eliminate the possibility of draging bacteria into the inside of the meat where it is going to be at a lower temp for longer.. mind you that is just a set point change.. start it out at 250, then when I stab it readjust it to the temp I want the meat to be.. not a big deal..

so more or less using the meat temp as a limit switch for the cabnet temp.

Steve


Yes, thats what I was meaning. I'm not familiar with smoking meat but ya. Or, what if the meat temp probe stays out of smoker while you cook for the first couple hrs, then it will remain cooler, then put in meat?

Also, I know the PID says it has a 10A capable contacts on it, but do yourself a favor and wire a relay with it. A relay is cheaper, and WHEN it fails(not If, WHEN), it can be replaced easier. Usually the whole PID control has to be changed when the relay goes. and I have had them go. It's not only current, it's current over amount of cycles. And when the cooker is up to temp, the PID will be Pulse Modulating the element on off on off. Doesn't take long to fry contacts that way. In my experience Ive changed a few of them. Companies hate it when you tell them their $5000 PID controller is toast because someone used the internal contacts to switch load.

StirCrazy
03-09-2010, 10:54 PM
SO I should get the SSR output one then instead. now the alarm outputs are 3 amp, should I use external SSRs on them also for 1 amp loads? these ones won't be on/off cycling they will be on for the duration of the smoke.

hmm that leaves a spar alarm output.. I could rig up a time based sprayer to bast the meat every 30 min... hmmmm

Steve

banditpowdercoat
03-09-2010, 11:05 PM
SSR outputs do last longer for sure. And I wouldn't worry about the alarm output's they will be fine. It's just relays wear out faster when subjected to higher loads and cycles. The PID may in all fact outlast your smoker, and if you just used the relay contacts directly, you may get 20 years use. But it may also crap out in 2 years. I always like putting in cheaper parts for the places that will see the most abuse.

DiverDude
03-09-2010, 11:49 PM
Ok, I see -so you want a fairly large unit. I was going to harass you for going electric and suggest that you just get the Webber Bullet (what I have) but you said the magic words "cold smoke". I wouldn't mind an electric smoker so I could cold smoke fish and sausage (not that I make sausage much these days -so much work !) but frankly, I'm almost scared that if I got one I'd get lazy and not use my charcoal unit anymore !

Any interest in rolling your own controller ? I used to sell microcontrollers for a living and if you like electronics, you can have a lot of fun making exactly what you want, yourself !

I figure it's just a matter of time before I design autonomous systems to monitor my tanks' variables, ATO -maybe some dosing in the future.....

ScubaSteve
03-10-2010, 12:26 AM
If you want to ramp and dwell, you can go on ebay and get a pretty badass multipoint controller for cheap. I just got 4 of them for my lab this way last week; cost me about $150 but it would have been over $3000 new. University surplus is awesome!

Like DiverDude suggested, I would consider going the microcontroller unit. The easiest to work with is the Arduino. It costs $50 and is EXTREMELY flexible in what is can do. You could make an Arduino do exactly what you want for next to nothing! Hell, you could even control the thing from the comfort of you laptop.

StirCrazy
03-10-2010, 03:04 AM
It costs $50 and is EXTREMELY flexible in what is can do. You could make an Arduino do exactly what you want for next to nothing! Hell, you could even control the thing from the comfort of you laptop.

Hmm now that sounds interesting.. would be nice to be able to look at the laptop and check temps on a long smoke while I am watching hockey. but i imagine that getting wireless would make it not so cheep. Does the arduino take any kind of inputs from thermocouples?

Steve

StirCrazy
03-10-2010, 03:45 AM
hmm reading up on the Arduino, little bit harder to get probes and such that can be stuck into a roast. might be more simple for me just to use the PIDs and have two of them.

Steve

ScubaSteve
03-10-2010, 06:26 AM
hmm reading up on the Arduino, little bit harder to get probes and such that can be stuck into a roast. might be more simple for me just to use the PIDs and have two of them.

Steve

Nah, I don't think you'll have a problem. You'd be surprised what probes you can get that can be stuck into a roast. Heck, I could help you find some of the lab grade probes I use at work for cheap. Shoot me a PM and I can help you out. You can even pull the probe off of an old digital meat thermometer.

I found a few links to people using arduinos for smokers if you haven't already found them:

http://www.smokingmeatforums.com/forums/showthread.php?postid=455330
http://techblips.dailyradar.com/story/arduino_based_talking_remote_thermometer/
http://www.casualhacker.net/blog/2010/01/arduino-control-of-alton-brown-smoker/
http://qpidproject.blogspot.com/

I say give'r a go. If I can use an Arduino to control my $15K experiment set-up remotely, I'm sure it can do a smoker as well.

If you don't go Arduino route, try ebay for PID controllers. You'd be surprised what you can find.

Lampshade
03-10-2010, 07:21 AM
I used to use Omron E5CK Temp controllers for near everything. The PID is extreamly smart, and has a communication channel for multiple settings. You can pick them up off ebay pretty easy, I've managed to get most of mine for < $20. Any questions let me know.

Heres a link to a spec sheet:
http://www.ia.omron.com/product/family/1437/index_fea.html

banditpowdercoat
03-10-2010, 01:37 PM
This Arduino looks intriguing.... I'm going to have to look into it further

DiverDude
03-10-2010, 07:26 PM
If you want to try the Ardunio (or any other micro), you can got to my old company (still being run by someone else) here in Calgary so you don't have to deal with international shipping:

www.HVWTech.com

ScubaSteve
03-11-2010, 01:00 AM
Dude, that's a whole website of fun you got there! who needs to shell out $200+ for a tank control system when I could shop there.

I heard rumors that they are giving away free Arduino to Canreef-ers...:mrgreen:

DiverDude
03-11-2010, 03:10 AM
Weeellll...it's just a different form of addiction. If you ever thought it'd be cool to own an aquarium-related business, let me tell you: if you love it that much, don't do it as a biz ! I was nuts for the electronics thing; started and ran that company for 10 years and in the end wanted nothing to do with it.

I still have a lot of equipment and tools but I still dread it a bit. I'm thinking that I'll eventually warm back to it and a fun project controlling parameters of a tank could be just the project to do that.

StirCrazy
03-14-2010, 07:15 AM
hmm I'll check thing out.. I was just in victoria for the last 4 days so I just saw these

Steve

StirCrazy
03-15-2010, 03:32 PM
Ok, so I have been looking, and frankly I am not sure about the Arduino because of the programing thing. But if I was to go with the Arduino, what all would I need to buy for hardware.

here is the requirments.

two temp inputs two controled outputs (one 1200 watt element and one 100 watt element)

some sort of display which could show curent temp, set point and meat temp.

now for function it needs to
-maintain the set cabnet temp by use of the 1200 watt element.
-adjust cabnet temp to predetermined set point when specific meat temp is reached.
-allow different types of programing for different cooking styles. say doing a spicif temp for 2 hours then adding 10 degrees per hour till another temp is reached then hold at that temp.

I also need it to be able to turn on the 100 watt element when a specific cabnet temp is reached.


Now I don't know how much it would cost to have but wireless ability so I can monitor/controle from my laptop would be nice. but not nessaray.

so how much would it cost me to get all the stuff I need to do this?

Steve

DiverDude
03-16-2010, 12:32 AM
Well, I won't kid you -the whole microcontroller/electronics thing is a hobby unto itself. The real perk though is that whatever you can create with it can be applied to other hobbies or just about anything.

There is a lot of information out there on various applications and ways of doing things like controlling a 1200W element. It would be wise to consult various forums so you don't reinvent the wheel.

In the end though, you need to make a commitment to learn how to program a micro (Arduino or other). Once you've commited to a specific micro, you'll need to invest a little cash in some development tools a few microcontrollers to experiment with etc. You'll also need a soldering iron and a multimeter to be able to do anything useful.

In short, don't look to a microcontroller just for a solution to this specific project but rather as a skill you will acquire that will allow you to make all KINDS of things for your smoker, monitor things in your aquariums -you name it. That said, it is not a quick and simple thing and will take time, much like a reef tank doesn't instantly thrive.

StirCrazy
03-16-2010, 05:19 AM
hmm just read over 100 topics on a forum and it seams all they are good for is blinking lights and making robots :cry: no one using them for temp control it seams.

Steve

ScubaSteve
03-16-2010, 06:23 AM
hmm just read over 100 topics on a forum and it seams all they are good for is blinking lights and making robots :cry: no one using them for temp control it seams.

Steve
Dude, look at the first link I posted for ya. It has exactly what you are looking for including code! You'd just need to modify it a bit for the second sensor.

StirCrazy
03-16-2010, 01:44 PM
Dude, look at the first link I posted for ya. It has exactly what you are looking for including code! You'd just need to modify it a bit for the second sensor.

yup I was looking at that one actualy. I am a member of that forum and it caught my eye the other day.

I guess the one big question I have is, is there a place I can go online to learn about all this stuff. like a "for dummies write up" pr PDF file I can download that will explain how to assemble code and upload it.. I guess the hardware part is easy enough.. figure out what you need and put it togeather. but it is the programing side that has me hesident.

I see the the programing and such from that smoking meat forum but I have no idea what to do with it.

Steve

banditpowdercoat
03-16-2010, 01:48 PM
I'd love to play around with Arduino, but I have so many other things on the go. No darn time LOL But, if there was a PDF for dummies... LOL Hmmm

DiverDude
03-16-2010, 04:12 PM
Just about any micro can control just about anything; it's all a question of how easy it is (relative to other micros). Some are better for some things than others.

If you're looking for code on how to control a 1200W element, you likely won't find it. If however, you look for code/info on controling high-current AC loads, you'll most certainly find things. This is where the electronics knowledge/understanding comes in. You rarely find exactly what you want so you have to know enough to make the necessary changes for your application.

Like I said before, there is a learning curve to this and not only will you need to learn how to program your specific controller (Arduino) but you'll need to grasp some microcontroller and electronics concepts as well. Not to pee on your parade but given where you are today, you can expect this project to take months to complete. When you are done though, you'll be in a position to make other things in a much shorter time-frame.

I'll say it again: If you just want to make the smoker work, then desigining your own controller is not for you. It's as much about the journey as the destination !

StirCrazy
03-16-2010, 06:00 PM
Just about any micro can control just about anything; it's all a question of how easy it is (relative to other micros). Some are better for some things than others.

If you're looking for code on how to control a 1200W element, you likely won't find it. If however, you look for code/info on controling high-current AC loads, you'll most certainly find things. This is where the electronics knowledge/understanding comes in. You rarely find exactly what you want so you have to know enough to make the necessary changes for your application.

Like I said before, there is a learning curve to this and not only will you need to learn how to program your specific controller (Arduino) but you'll need to grasp some microcontroller and electronics concepts as well. Not to pee on your parade but given where you are today, you can expect this project to take months to complete. When you are done though, you'll be in a position to make other things in a much shorter time-frame.



the electronics is the easy part, I have no problem with that as I used to do a lot of electrical and electronics with work. but the electronic part for me has been designing single purpose circuts with relays, opamps, diods, limit switches ect.. not computer chips. I have found several projects that will do what I consider simular but the issue is the programing. I can pick up on it quite easy but I need to know where to start learning the programming. by the looks of it it won't be to difficult as I use to play with a bit of C++ back in the day but that was a while ago. So I guess I need to relearn code and how to combine codes and load them on the chip.

now another concern I have is can this set up have multiple selectible programs on it. so when it first starts up I can pick a sausage program or a constant temp program.

Steve

StirCrazy
03-16-2010, 06:37 PM
ok so I found some answeres, can have two programs in memory at once so I would have to upload the one I want to use.

found some good programing basics pages and looks like my best bet is to buy a starter kit and play and then buy some addons.

now the different flavors of the boards.... I was looking at the mega and now I have been reading a bunch on the Duemilanove, and I have read that you can also get it with a built on wifi.. so what is the differnace between the mega and the Duemilanove that would make either more desiriable for some one like me who is starting out?

Steve

StirCrazy
03-16-2010, 07:06 PM
ok so looking around would this be a good kit to order for playing around?

http://www.hvwtech.com/products_view.asp?ProductID=1205

I figure it has a temp probe so I could play by getting it to turn off and on lights at different temps.

Steve

DiverDude
03-16-2010, 07:41 PM
ok so looking around would this be a good kit to order for playing around?

http://www.hvwtech.com/products_view.asp?ProductID=1205

I figure it has a temp probe so I could play by getting it to turn off and on lights at different temps.

Steve

That would be a great place to start.

As for the number of programs you can have, I think you're having a conceptual issue. You can write one program that will handle multiple types of meat and/or timing cycles. the question is: How much program space (i.e memory) does any particular chip have ? THAT will limit the size of the program.

When I sold HVWTech.com, the Arduino was just starting to be known and I don't know a tremendous amount about it myself. From what I can gather though, with previous C++ experience and some electrical/electronics background, you are FAR better equipped to get into this than many people I used to sell development tools to !

StirCrazy
03-16-2010, 09:26 PM
That would be a great place to start.

As for the number of programs you can have, I think you're having a conceptual issue. You can write one program that will handle multiple types of meat and/or timing cycles. the question is: How much program space (i.e memory) does any particular chip have ? THAT will limit the size of the program.



hmm.. I got it from somewhere else that you can only have one program on the chip at a time, but I have been reading code all morning trying to figure out out a bit and I might be able to have a selectible loop routeen, but having two seperate programs isn't a big deal either as it takes a couple seconds to upload the one you want to use. or if I use quick disconects for the inputs/outputs I could easily have two units and just plug in the one I want. I actualy found a PID front end here
http://www.arduino.cc/playground/Code/PIDLibrary so i need to do some more reading to figure out how to combine it with my other requirments.

Steve

StirCrazy
03-17-2010, 04:12 PM
Ok so I ordered a development kit, should be here friday.. so I will start playing and seeing what this can do.

didn't get a LCD or wirless for now figured I would work on getting other things working befor adding more headach :mrgreen:

Steve

DiverDude
03-17-2010, 05:58 PM
Very wise. You will want an LCD at some point as it will make development and troubleshooting much easier. Of course, you'll need some kind of display for your project too !

StirCrazy
03-17-2010, 08:24 PM
Very wise. You will want an LCD at some point as it will make development and troubleshooting much easier. Of course, you'll need some kind of display for your project too !

now I was reading that for playing with this if I have it pluged into my laptop through the USB that I can use my laptop to monitor?

I think later I will get a WiFi shield and use a web page as a monitor or maybe a LED. the cool thing I was looking at is the actual board is only 30ish bucks so to build more stuff with be cheep compared to my initial purchase.

Steve

DiverDude
03-17-2010, 09:25 PM
Again, I'm not very familiar with the Arduino but other micros have the ability to send information back to the PC and have it display there. The hitch to that is that it takes time -albeit only milliseconds- but this can affect how the rest of your program runs and can sometimes actually cause probmlems that wouldn't otherwise exist.

you'll be fine to start though.

Have at 'er !

StirCrazy
03-18-2010, 07:25 PM
Well got my kit today, overnight shipping for 9 bucks.. not bad at all.
I am surprised by how small it is.. might be a bit of a challange by ham fisted people like myself :mrgreen:

I got it installed and comunicating with my lap top and i uploaded a test program to make a led flash on the board.. rather underwhelming but it confirms that everything is working properly. and I could make a self contained fake car alarm light with how it is set up now :mrgreen:

anyways better go outside and get my welder tested now that I got the right liner for the gun and i'll play with electronics later.

Steve