Announcement

Collapse
No announcement yet.

PID control on Productivity 1000 for Home Brewing

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • PID control on Productivity 1000 for Home Brewing

    New to the forum and first time posting. I am currently switching my propane home brewing system to an all electric PLC controlled system. I have no previous experience with PLC's or HMI's, so Ladder logic is pretty new to me.

    I recently purchased a Productivity 1000 CPU with a P1-15CDD2 Combo Discrete card and a P1-04ADL-1 Analog 0-20mA card. To start with, I will only have a total of 8 I/O in the system for now. Four Analog Inputs for my PT100's. Two Discrete Outputs for relay control of circulation pumps. Two Discrete Outputs for relay control of 5500 watt heating elements. In the future (no hurry till I get the present figured out) I would like to add a couple level switches in my kettles, a few solenoid valves and maybe a load cell for measuring volumes of kettles.

    So far I have been able to setup the four Analog PT100's by simply wiring them to the card and setting up the scale function to convert the 0-8191 value to Fahrenheit (nice feature on this series) then using another rung to give me an average over a half second so I don't get so much bounce on the reading. Done this on all four. I also have the two rungs complete for the relays that will control my small Chugger Pumps. Those were simple Out Coils with a NO and NC contacts using another NO to read the coil to maintain power to the coil. I am using AdvancedHMI as my interface. Once I figured out how to assign the Modbus addresses, it went pretty smooth. I tested out all the inputs with this HMI and they all seam to work well. Temps read accurately and I can energize and de-energize my relays though the simple HMI I have set up.

    Now we get to the point of where I am having problems. The last two discrete outputs to control my elements. One of the reasons I chose this controller was that it had built in PID function. Assigning tags and numbers to the PID has been very confusing to me. I printed out the document from the Help tab on the PID parameter entry box and have read through it, but still seems Greek to me when putting in the numbers and tags or assigning where they come from. The example that is provided at the end of the document lost me very quickly. It started with a "Time Proportioning Control" setup with good detail of the steps and layout, but I still have trouble understanding the tags assigned in the example. The last page shows the PID loop with no explanation on any of it (the way I see it)

    I've been searching since I got this PLC, but have not had good luck finding much (literally nothing) out there for the 1000 series PLC.

    Curious if anyone has any suggestions on the best way to fill in parameters and write the rung (or rungs) that will be needed. I want to be able to put in (where is it assigned from?) a set point (and manually adjust it), and let the PID do its thing to fire the relay controlling the heating element to hit and maintain temperature from the feed back of my RTD sensors. I will have two of these PID's. One for my Hot Liquor Tun to get to a temperature range of 175 strike water to pump over to my Mush Tun, then used again to maintain a temperature of about 155 for recirculating mash through a HERMS coil. The second will be to boil the wort in my Boil Kettle. This one may not need to be a PID, but more of a timer that turns off and on for a set amount of time once the boil is reached. Might be easier this way. Accuracy is not as important on this one other than not wanting to boil over.

    Any help on this would be greatly appreciated.

  • bsinkovich
    replied
    Little, i looked at the Average function help and got the equation this function is using and I was wrong. This can be used to smooth a reading. I ran some testing and you can use it just as you are. My bad.

    Leave a comment:


  • littlecellar
    replied
    Didn't even think about the average function spanning over the entire time of the brew day. Putting the timer on makes sense. Still a little confused about how the timer works to reset the average temp from your example above. Wouldn't the input of the AVERAGE command have to be reset every 5 seconds? When I read it, it looks like it is just forcing a rewrite of the value for the output over and over every 5 seconds. Maybe I am looking at this too hard. Still trying to understand how all this works.

    This is what I put in my program. Seems to work, but I don't have a good way of testing it over a large temperature span as of yet to see if it averages correctly. I trust you are right, it's just my inexperience that has me a little confused.

    Click image for larger version

Name:	Average Timer Logic.png
Views:	20
Size:	31.2 KB
ID:	110643

    Leave a comment:


  • bsinkovich
    replied
    Little, i see now how the rtd was being red with a current module, using a rtd to current converter. If you use the average function to smooth the temp reading you will have to reset the output tag to zero. Take, say 10 raw temp readings, sent to average input tag, use the output tag as the current smoothed temp, reset the output tag to zero and start again. If you don't reset the output tag to zero you will have a average temp over the hours of running. The filter I posted above works well if you can't get the average function working. Try this:

    Click image for larger version

Name:	Capture4.JPG
Views:	95
Size:	58.1 KB
ID:	110503

    "Do I just add buttons on my HMI and address them to the tags through Modbus to trigger them?"

    Yes set HMI to toggle the bit and use a coil for auto/man. If bit is true-in auto, if false-in manual. When in manual you can use a copy block to poke in a number into the PID.Output to set manual power.

    Click image for larger version

Name:	Capture5.JPG
Views:	82
Size:	41.6 KB
ID:	110504

    Leave a comment:


  • g.mccormick
    replied
    The enable and auto/manual outs will depend on your system. For instance, you don't want them on if the system is off, and if not calling for heat you would not want them on either. I would suggest that you think about when you want to have heating applied in an automatic way (you can just make a list in normal readable words) then when you are satisfied, code that.

    An example:
    When the system is on and the water is full and the hlt needs to be heated and the pump is already running, then we want heat.


    You also may want to say that when the loop is not enabled, then you should force the output off.


    Attached is a pic of some PID loops and interlocks that I have on a system controlling a parallel refrigeration rack.
    Click image for larger version

Name:	PID_screen.png
Views:	109
Size:	916.7 KB
ID:	110501

    Leave a comment:


  • littlecellar
    replied
    Appreciate all the input from you guys.

    The missing contacts for the enable and auto/manual on the PID were an oversight on my end. Saw them in the example, just forgot to put them in. My question on those two contacts is now, how do I enable them? Do I just add buttons on my HMI and address them to the tags through Modbus to trigger them? bsinkovich, it looks like that is what you did.

    I am using the following logic to read my pt100's. I seen it in one of the video's AD has. The Analog module will automatically assign a value of 0-8191 based off of a 0-20ma scale range. The 8191 number was throwing me off at first because all the videos from AD were saying 0-65535. It wasn't till I realized that this module was a low res 13-bit and not the 16-bit they give in there examples. Thought something was broken. My pt100 is the garden variety you find on Amazon and EBay in the $10 range along with the puck style 4-20ma RTD sensor. Using the Scale function I converted it over to Fahrenheit (0-400 C sensor). In order to keep the number more smooth, I then put that into an average function so it doesn't jump around so much. Seems to be working pretty well.

    Click image for larger version

Name:	Temp Rung.PNG
Views:	92
Size:	5.4 KB
ID:	110497

    Brandon, I am not going to be much help on the gas valve subject. I too, was using propane with those same banjo burners, but everything was manually done. It wasn't until I decided to move my brewing inside, that I started to delve into the automation side of it. bsinkovich mentioned the Honeywell set up that I have seen in other systems online. It seems to be widely used by those who automate their LG systems.

    Bsinkovich, it's going to take me a while to look at what you have in the code you showed above and understand it all. I am still pretty green at this. Been throwing around the idea of something like it using simple SS tank level float switches so I can't dry fire my elements.

    Like the HMI, too.

    Leave a comment:


  • g.mccormick
    replied
    The valves with pilot and main control are like what you would find in your furnace. 24vac signal tells the valve fire is needed. It will energize the pilot and ignitor, when flame present (using the sensor) it will energize the main. If you need to modulate the flame, you will need other valve/pressure control to control the flow of gas.

    Leave a comment:


  • bsinkovich
    replied
    Here is a gas valve w/ pilot control and 24vac control. Done!

    https://customer.honeywell.com/en-US...uct.Rank&asc=1

    Leave a comment:


  • bsinkovich
    replied
    Brandon, to make a LP system with all the safety, ignition and a valve can be done with aftermarket parts. Cost might be the factor here. Between a way to ignite the gas and valves, saftey. Direct ignition or pilot light w/safety. A hot surface igniter, flame sensor and solenoid valve. The other way is to use an all-in-one system. A control voltage tells the system fire is needed and all is taken care of, the lighting gas, safety etc. Look at this Honeywell site, both in residential and commercial areas. With a little thinking I am sure you can come up with a system. Please do not underestimate the safety. Don't use just a manual pilot light and solenoid valve. I just looked at this idea last week but have not had a lot free time to go down this road yet.

    https://customer.honeywell.com/en-US...&catpath=1.2.7

    Leave a comment:


  • Brandon_
    replied
    I don't want to hijack the thread, but littlecellar and bsinkovich may have some insight on this.

    My step Dad not to long ago asked me to design him an automated system with HMI for his home brew setup (though it's really more small scale commercial as he's working with a local winery). Initially I was going to do it off of a P2K, but since the P1K is now available, I'm going to go that route.

    The issue I'm having is finding automated pilot valves to handle his burners (direct fired system) Growing up with him, I know fair amount about brewing and automation, but LP valves is a bit out of my realm of expertise. The winery that he's in does not have the power necessary to run an electric setup (all of his tanks are 55 gal or larger) so he has some large banjo and jet burners (high pressure on the jet's, low pressure on the banjo) to do the work for him. Do either of you have any pointers on what valves I should look at to not only control the LP, but also to ignite and detect ignition as well as flame out? I assume something along the lines of a furnace valve with thermocouple, but again this isn't my expertise.

    Leave a comment:


  • bsinkovich
    replied
    Simple filter for temps. Temp Filter 0-1. 1=no filter.


    Click image for larger version

Name:	Capture1.JPG
Views:	90
Size:	15.4 KB
ID:	110441

    Heater lockout w/ pump control and all that is needed to set up and run the PID

    Click image for larger version

Name:	Capture2.JPG
Views:	93
Size:	111.5 KB
ID:	110442

    Time base output to SSR heater relay

    Click image for larger version

Name:	Capture3.JPG
Views:	101
Size:	48.2 KB
ID:	110443

    Leave a comment:


  • bsinkovich
    replied
    Littlecellar I am also wondering how you are getting temperature using a RTD and a current module? Please explain. I know it can be done but how are you doing it?

    Leave a comment:


  • bsinkovich
    replied
    Click image for larger version

Name:	20180118_093836.jpg
Views:	91
Size:	128.2 KB
ID:	110436

    Leave a comment:


  • bsinkovich
    replied
    Littlecellar, I have all ready done (almost, needs a little more) what you are looking for. P1k t/c input card and dc out. Manual and auto on three PID loops with time base output. HLT, mash and boil. If I could get AD to add auto tune on the pid thru code I could sell them. PM me and maybe I can help.





    Click image for larger version

Name:	20180118_092414.jpg
Views:	87
Size:	128.3 KB
ID:	110434
    Attached Files

    Leave a comment:


  • PSeries_Eng
    replied
    You should really have contacts on the enable and the manual /auto rungs. You need one on the enable rung because there are certain parameters in the PID instruction that do not take effect unless the instruction is disabled and re enabled( See range max and limits). The manual/auto branch needs a contact so you can put the PID loop in manual to be able to auto tune it. Also you would need a contact on the manual/ auto branch if you wish to control the output manually.

    Leave a comment:

Working...
X