Announcement

Collapse
No announcement yet.

PID control on Productivity 1000 for Home Brewing

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

  • 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:	80
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:	495
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:	430
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:	567
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:	476
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:	451
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:	530
Size:	111.5 KB
ID:	110442

    Time base output to SSR heater relay

    Click image for larger version

Name:	Capture3.JPG
Views:	516
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:	505
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:	456
Size:	128.3 KB
ID:	110434
    Attached Files

    Leave a comment:


  • ADC_CommTeam01
    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:


  • littlecellar
    replied
    Thanks for the reply PSeries_Eng. I think I got it covered using your information and after looking back at the example in the help section of the controller. My ranges are all in degrees Fahrenheit since that is what is coming in out of my averaging rung for the process variable. I think this is correct. I tested it on my desk and it seams to be working. Do have a big overshoot when just heating up the RTD with my hand, but I need to play around with the gain and reset to work that out. Never tuned a PID, so that may be a challenge too.

    I was having a hard time inputting my set point from my HMI which was keeping me from testing this. I couldn't get the controller to let me manually input a Modbus address to the 3xxxx0's when setting the tags. The way I was reading the table, that is where you have to assign write addresses. It kept auto assigning 4xxxx0's to the tag. I finally read somewhere in that document that a 16-bit tag was read/writable in the 4xxxx0's. I was using the auto assigned tag which defaulted to 32-bit. Once I changed the tags I want to manually set from HMI to 16-bit, inputting set points works fine know.

    I am still a few weeks or more from having my kettles set up (still need to weld additional fittings in them), but hope to maybe start that this weekend if it warms up, so the tuning will be on hold for a little while. Main thing for me is to get the program set up and all the components purchased and know that they all talk for now.

    These are the rungs I wrote for the PID that include the timer functions for it (the top average rung is for something else). I didn't realize I had to link the PID with timers separately to make it work. Guess I always assumed they where built in somehow to the PID shortcut. Don't know if there is a simpler way.

    Click image for larger version

Name:	PID Rung.png
Views:	678
Size:	30.9 KB
ID:	110384

    Leave a comment:

Working...
X