PLC - Touchscreen Control Panel (TEB Based)

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

muhteeus

Well-Known Member
Joined
Sep 5, 2012
Messages
310
Reaction score
41
Location
Trophy Club
Hi all. I have been lurking for a little over a year and decided to share my latest project with you.

The design is based off of the 30Gal + system from TheElectricBrewery.com. I however have made a few notable changes:
  • PLC and Touchscreen Interface
  • 24VDC control
  • Cleaner wiring through the use of terminal blocks and wireways

I have also replaced the Amazon Control parts with motor contactors and cube relays. I believe this makes the TEB system a bit simpler to wire and provides more robust control.

I wanted to stick as close to the price of the part kit that is provided on TEB site. Due to this constraint I have chosen a Koyo Click PLC with a C-More Micro Graphic Touch Screen, which both include free software. I have also eliminated other components to cut down on cost:
  • AC-DC boards
  • Switches and LED indicators
  • Voltmeter and Ammeter
  • Transformers

I will keep a list of documents in this post, including links to PLC and HMI logic. I will post updates in the first 4-5 posts below this.

***NOTE***
This design is tenative, things are subject to change. I will try to keep my documents as up to date as possible. I am also very open to design suggestions!

9/19/13 - Changes to documents:
  • BOM - Changed SSR to FOTEK, this is a $25 savings. Added diodes, resistors, relays, sockets, screws, and tap.
  • Panel - Add 2 additional interposing relays, remove endblocks for spacing.


9/12/13 - Changes to documents:
  • BOM - Remove 24VDC lamp, add fusing and terminal blocks, add motor starter surge supression, add wiring
  • Bezel - Remove 24VDC lamp, Change 1/16DIN to 1/32DIN for new MLT PID Controller
  • Panel - Add fusing blocks, add PLC Disconnect, remove DC Supply blocks

PLC Brewery.ckp - Password muhhh

View attachment Bezel Layout v1.3.pdf

View attachment BOM v 1.4.pdf

View attachment Panel Layout v1.2.pdf
 
9/25/13:
Let the mounting begin. The TB ends were backordered, and I am about 12" short on my 1" wireway.

Drilling\tapping the holes with the greenlee combo! Don't forget cutting oil!
vjZS0nX.jpg


Mounting DIN Rails and wireway
NdWaE90.jpg


Clipped on components! Looking good!
ifTS7Mh.jpg



9/19/13:
Started working on getting components mounted to the subpanel. I'm likely going to use M5 x 0.8mm x 10mm screws and a tap to hold things down.

I also spent some time looking at current requirements and decided put in 1n004 diodes on the coil controlled devices. Due to requiring 12W (0.5A@24V), I have added interposing relays to drive the large contactors.

BkL5jTb.jpg



9/12/13:
I have made the PLC logic available. I will be working on the HMI screens this weekend and will post that when it is ready.

I have also been working out some issues with my intial design in terms of isolation and fusing. I have updated all documents with new surge supression and fusing on plc I/O. I have yet to source diodes or mov's for the cube relays. I also want to note that the cost of purchase is substantially above the TEB\Kal model. $200 over budget... I am ok with this lol.

I have some ideas to flesh out the modbus comm and initialization sections of logic that will also be in the works this weekend. These will probably remain unfinished until I purchase the SOLO controllers and C-MORE HMI.

9/11/13:
The subpanel, wiring duct and relays are in. Now I can start assembly\wiring\drilling on the subpanel!
56ok0C2.jpg


9/10/13:
I purchased the subpanel, wiring duct, and relays. Little by little my parts will be bought. In the order I have bought things I will have a home for my components!

I also took a couple hours last night to flesh out the main brewing process logic. Each step is manually started and told to complete via the HMI. This way we can ensure that the heaters and pumps are not damaged by low liquid level, and that all hoses are routed correctly.

The step logic is set-up so that once the criteria for step end are satisfied, and the brewer presses the "Next Step" HMI button, the PLC moves the next step value into the current step register and Latches the "Step x complete" bit, which will give visual indication that the step has been processed. Upon completion the "Next Step" HMI button will move a value of 0 to the current step register, advancing the system back to the idle state and unlatching the step complete registers.

The start\stop of the pumps and elements is handled by the step logic and an operator button. For example, during step 1, the water pump will not start until step 3100 which is entered by an operator button. I need to read more on the MODBUS abilities of the PLC to see if it supports a single coil write (05 command) which will allow me to switch the PIDs between Auto\Manual modes. If so I will add logic to write Manual - 0F SP to the PIDs to ensure they are off until the brewer sees that the elements are safe.

So, I believe the skeleton logic is roughly 70% complete. All that is left is to write the Communication Logic to talk to the PIDs: Reads will happen cyclically as fast as possible. Writes will pause read, and be set either by HMI Pushbutton or by the Brewing Process Step Logic.

Hopefully my text is easy to understand. I will try to upload the .ckp file today so that the logic is easier understood. There is no commenting at the moment, I was holding the baby while writing code, so I was trying to be quick.

9/9/13:
Spent some time this weekend discussing a functional spec with the Triumvirate.

Converted all discrete devices (pumps, contactors) to Two-State Devices. My two state device logic provisions for auto\manual modes, feedback alarming, feedback simulation, alarm auto silencing, Alarm Enable, and interlocking.

Auto\Manual allows us to have HMI control in manual mode, and PLC control in Auto Mode.

Sample control bits would be:
  • C100 = Wort Pump Mode
  • C101 = Wort Pump Auto Command
  • C102 = Wort Pump Run Command
  • C103 = Wort Pump Run FB1
  • C104 = Wort Pump Stop FB0
  • C105 = Wort Pump Interlock
  • C106 = Wort Pump Simulate FB1
  • C107 = Wort Pump Simulate FB0
  • C108 = Wort Pump Alarm Enable
  • C109 = Wort Pump Alarm Auto Clear

I will put in an initialize word for all Two State Devices in order to "configure" them for our needs.

I will attach the Two State Device logic tonight.
I reordered the Logic into neater subroutines, and started work on the brewing process step-machine. The steps will be per the TEB steps:
  • 0 = Idle, Error
  • 1 = Heat Strike Water
  • 2 = Transfer Strike Water to MLT
  • 3 = Mash
  • 4 = Mash Out
  • 5 = Sparge
  • 6 = Boil
  • 7 = Cooling

I am going to provision for adding valves in the future. That way when we hard plumb, I will just have to unpack the valve word to bits, and set the bits to the auto command for the valves!

9/6/13:
I haven't got much done in the last few days due to taking care of my daughter. I do want to clarify my wiring convention for those of you who are wondering.

NFPA-79
BLUE (+24V)- "ungrounded dc control conductors"
BLUE/WHITE (24V Com) - "for grounded (currentcarrying) dc circuit conductor."
BLACK (+120Vac) - "ungrounded line, load, and control conductors at line voltage"
RED (-120Vac) - "ungrounded ac control conductors at less than line voltage"
WHITE (Neutral) - "Where an ac circuit includes a grounded conductor,"
YELLOW(120Vac control coil) - "Ungrounded circuit conductors that remain energized when the supply disconnecting means is in the off position"
YELLOW/WHITE(120Vac control coil neutral) - "for grounded (current-carrying) circuit conductor, which remains energized when the main disconnecting means is in the off position."
GREEN(GND) - "used to identify the equipment grounding conductor where insulated or covered."

9/4/13:
The PLC and accessories have arrived. Time to start programming.
B9wCVzw.jpg



9/3/13:
I have purchased the PLC and a few accessories to begin the project. Picked up the PLC, power supply, battery, programming cable, and my 35mm DIN rail.

The plc design logic is based on the switch design of TEB.
  1. Wort pump and Water pump have no interlocks.
  2. Interlock Boil and HLT with each other to ensure only one can be on at a time.
  3. Alarm handler for generic alarming and silencing with a global mute for the 80dB ***** alarm.
  4. Interlocking based on communication loss to Touchscreen or PLC failure.
  5. Device state at start up will be in the off position.
  6. Device state at failure will be in the off position.

The touchscreen design logic is based on the following design specs:
  1. Touchscreen control to start each pump.
  2. Touchscreen control to choose Boil\HLT element.
  3. Touchscreen timer setpoint selection and display.
  4. Touchscreen simulation of device feedback via automation.
  5. Touchscreen to manage alarms, include buzzer and silence.

Gsof56n.jpg

1st rungs of stupid-simple logic.

6qRhHYK.jpg

Boil timer. The rung below is just a seconds to HH:MM:SS converter.

tvdIDM0.jpg

Alarming. The alarm handler is yet to be fixed, since I just figured out how to use pointers.

3JnEdDh.jpg

Main screen WIP. Need to add pumps and dynamic animations.
 
I like your idea! I'm curious why you chose to use separate PID controllers instead of just programming the PLC and using an RTD or thermocouple card? It looks like the price difference between 4 port RTD card and individual PID is ~$10. Depending on your layout, you could add a 4th probe and run a fermentation chamber pretty easily with a little additional wiring.

I found this forum post on the PID capabilities of the clickplc. http://forum.automationdirect.com/showthread.php?t=11633 I'll admit I didn't read all of the linked posts and haven't used the click PLC's, but from what I gathered, it's a bit more programming but fewer components and less wiring.

Interested in your progress!
 
I like your idea! I'm curious why you chose to use separate PID controllers instead of just programming the PLC and using an RTD or thermocouple card? It looks like the price difference between 4 port RTD card and individual PID is ~$10. Depending on your layout, you could add a 4th probe and run a fermentation chamber pretty easily with a little additional wiring.

I found this forum post on the PID capabilities of the clickplc. http://forum.automationdirect.com/showthread.php?t=11633 I'll admit I didn't read all of the linked posts and haven't used the click PLC's, but from what I gathered, it's a bit more programming but fewer components and less wiring.

Interested in your progress!

I am not sure how robust of a control scheme would be provided by the Click PLC PID code. The ease of using discrete PID control just seemed simpler to me. Tuning PID loops is not my forte, I have done it, but I am not great at it.

I guess I need to think long and hard on this. This one module would reduce my I/O requirements (due to handling alarms internally). Plus It would clear up my front panel (which I appreciate).

**The cost, however, increases a bit, I will need 1 I/O point. I just noticed that the MLT controller has no control capability... only display.

***I could eliminate my Alarm output and use the embedded alarming in the C-More Micro Panel... That way I will not need the I/O point. I still need to justify $12.5 vs. the ease of using discrete, auto-tuning controllers.

Decided to go ahead with the SOLO controllers, Which have autotune and the ability to talk to the PLC via RS-485. This is not the most cost-efficient solution as it increases cost by $90, but it is the best choice (after discussing with the Triumvirate) for us. I have updated the BOM and Bezel Layout to Reflect this.
 
***I could eliminate my Alarm output and use the embedded alarming in the C-More Micro Panel... That way I will not need the I/O point. I still need to justify $12.5 vs. the ease of using discrete, auto-tuning controllers.

There's a lot to be said for easy. Certainly some time savings on the programming side.
 
Great Job & Like What Your Are Doing, Will Keep Following Your Post(s)
Like The PLC/HMI Equipement & Software Cost, Affordable
Never Used Them Yet, You Will Be The R&D GoTo
Keep Us Informed w/Programming & Networking Updates & Thank's
 
Great Job & Like What Your Are Doing, Will Keep Following Your Post(s)
Like The PLC/HMI Equipement & Software Cost, Affordable
Never Used Them Yet, You Will Be The R&D GoTo
Keep Us Informed w/Programming & Networking Updates & Thank's

Thanks! I have to admit that your post was my inspiration to make my own! I saw and said, "Hey, I can do that, I do it every day at work!"

I will be posting the .ckp files of the finalized logic and .mgp files for the screens. I am about 30% done with the logic.
 
I hate self-bumping but I have made massive changes to the parts list and layouts. I have also updated the progress log with pictures and steps taken to protect the PLC from transients.
 
Nice advanced build!

Which touchscreen are you going to embed in your cp and how will you manage to mount it on the front panel?
 
New news. I have been dealing with life, and having a blast with my daughter. I just funneled $1200 into a new computer and now I am back to this project.

I will be making a few changes:
  1. I will try to use 110V heating elements for the time being due to house wiring concerns
  2. I have inherited an Allen Bradley Micrologix 1200 PLC that will replace the CLICK plc.
  3. I will be making changes to have the PLC only control piping and timers.
 
New news. I have been dealing with life, and having a blast with my daughter. I just funneled $1200 into a new computer and now I am back to this project.

I will be making a few changes:
  1. I have inherited an Allen Bradley Micrologix 1200 PLC that will replace the CLICK plc.

What do you like about the AB vs. Click to make the change?

Cheers,
ClaudiusB
 
[*]I have inherited an Allen Bradley Micrologix 1200 PLC that will replace the CLICK plc.

Interested In What Model# On The ML1200 You Have?
I'am Hoping You Received The "WAR" Series That Supports
Dual Communication Ports.
 
What do you like about the AB vs. Click to make the change?

Cheers,
ClaudiusB

The AB is a Micrologix 1200L40WAR. It supports the RSLogix500 software, which IMO is much better than click (although not free). It also supports a wider instruction set (namely PID and STI). It also has 24Inputs and 16Outputs. I also have 2 analog inputs. Lastly, it was free!
 
Since I am deadlocked (PLC has yet to be pulled from the plant, and funds for parts running low) I spent some time sketching out the P&ID for the valves and flows. I used a few manual valves for cost concerns. Let me know what y'all think. Keep in mind, this is a hard-plumbed, Kal-based layout.

This is the GOOGLE docs P&ID

8 x 2 way solenoids is the best I can do. The layout allows for CIP as well... which may be added in the future :).

Also, using a simple drum sequence based on step number (my favorite for batch control) we can easily move the valves using a control word.

I would simply add a 3s delay timer to the pump start logic, and make sure to stop the pumps at the completion of every step (to give valves time to set). Add in a few timers for step progression and... BAM... a fully automated brewery.

View attachment Valve Drum Sequence.pdf
 
Sounds Like You Have 2 Analog Input Cards Total Of 8 Channels/Great
I'am Using a Small 24Vdc Muffin Fan On Top Of Processor Running Always
Besides The Cabinet Fan, Will Get Warm Inside
Keep Us Up Todate!

http://AB.Com
Quick Links; Go To Literature Library (Left Side On Page) SEARCH
Your AB Product, Get PDF Manual(s) Free.
Also Seen Today Canada EBay Seller RSLogix-500 $200.00 CD
States Cannot Be Registered, Also States Activation Included,
Wonder If This Means The "MASTER Disk" Is Included?
No Master-Disk No Want, RSLogix EVMOVE Fails When You Need It,
Only Way Is Have The Master-Disk To Recover Or Software Is No Good.
Cannot Be Registered, He Is Not The AB Registered Owner, If He Was,
He Can, Through AB/Rockwell Transfer Owner/Registration To You/Free.
 
So for some reason I can't edit my old posts? Too OLD?

3/21/2014 - Massive changes y'all. Updated the BOM to reflect new parts and 30A design:
  • Removed C-More Screen from BOM, new control will be done with PC based AdvancedHMI and EthernetIP driver
  • Removed other C-More and Click accessories
  • Added new ebrewsupply.com parts and prices
  • Removed parts pertaining to 50A model (contactors, relays, recepticles, etc.)
  • Added 30A Parts (see above)
 
A great MMI and for free.

I am comfortable in ICONICS, but the Trial License was too strict (And I could never afford licensing). The AdvancedHMI works on the same underlying VBA as ICONICS. You can even design your own custom modules...

Now, I will probably build a cheap ($200-$300) computer to run this... but who cares.

The MicroLogix will be on my home network and accessible from any computer running the AdvancedHMI or RSLogix:ban:

edit: ClaudiusB, just checked out your brewery pics... never got that far into them... but WOW. Automatic GRAIN, HOP, WATER dispensing? Amazing... I am completely blown away, and jealous!!!
 
The MicroLogix will be on my home network and accessible from any computer running the AdvancedHMI or RSLogix:ban:

!
I do exactly the same thing plus I take advantage over power line communication adapters.

Cheer,
ClaudiusB
 
Ordered a few more parts Friday. Hoping to get the enclosure next month so I can start putting things together. I am going to run the wiring for the panels this week! I have also been working on the Keggle. I will be adding some holes for element, probe, outlet etc. tonight!
 
Since I can't edit my oldest posts... I will start posting files HERE

Went ahead and ordered some parts:
  • 25A-240V Breaker
  • 20A-120V Breaker
  • 25A-240VAC Contactor x 3
  • 40A SSR x2
  • SSR Heatsinks x2
  • 120V 22mm LED x2
  • 120V NO 22mm Keyswitch
  • 120V 80dB 22mm Alarm Buzzer (R.I.P. My ears)
  • Panel Mount RJ45 Pass Through for Ethernet (lets get this sucker online!).

So that should get me to the point where I can prewire the panel before it goes into the cabinet. I may need a few more terminal blocks...

A question, how interested would anyone be to see a brewday video (edited for length) with the system in action? I could post a recording of the HMI and the physical system side by side? Granted... I am about 6 months from completion on this thing.
 
A question, how interested would anyone be to see a brewday video (edited for length) with the system in action? I could post a recording of the HMI and the physical system side by side? Granted... I am about 6 months from completion on this thing.

Go for it, I wait.
 
I'm interested to see how this turns out. I use a Koyo Click and a Cmore touch screen on my system, even though I have a couple micrologixs 1200's sitting around. Personally I like both, the only reason I went with the click is because the RTD cards are cheaper.
 
I'm interested to see how this turns out. I use a Koyo Click and a Cmore touch screen on my system, even though I have a couple micrologixs 1200's sitting around. Personally I like both, the only reason I went with the click is because the RTD cards are cheaper.

Yeah. I like them a lot for how cheap they are. The only reason I really chose the ML1200 is that it is free and prewired in a decent cabinet. The RTD cards are absurd though!

Now for an update: Started working on the wiring for what I have, trying to get the panel pre-wired for the install. I also didn't even look when I ordered the 1" wireways, now I am thinking 2.25" or 3" might be better.

ThEX6ET.jpg


Side note: THHN is some rigid ****.

PS - Seriously, we filter language here?

EDIT: Just got the PLC and panel delivered to my office!

wjhIZKj.jpg

GgeYA0Y.jpg

wnKPZNK.jpg


Annnnd the 1761-NET-ENI is working! Now I can talk Ethernet to DF1!! Now I'm seriously back to work haha!

StqKmgf.jpg
 
Yeah. I like them a lot for how cheap they are. The only reason I really chose the ML1200 is that it is free and prewired in a decent cabinet. The RTD cards are absurd though!

Now for an update: Started working on the wiring for what I have, trying to get the panel pre-wired for the install. I also didn't even look when I ordered the 1" wireways, now I am thinking 2.25" or 3" might be better.

ThEX6ET.jpg


Side note: THHN is some rigid ****.

PS - Seriously, we filter language here?

EDIT: Just got the PLC and panel delivered to my office!

wjhIZKj.jpg

GgeYA0Y.jpg

wnKPZNK.jpg


Annnnd the 1761-NET-ENI is working! Now I can talk Ethernet to DF1!! Now I'm seriously back to work haha!

StqKmgf.jpg
No wire numbers in your panel?
 
Not yet. Still have to come up with a convention and buy some labels. Any suggestions?

I use only Grafoplast wire markers.
I can't stand those white ones, every AB integrater uses them.

Cheers and good luck with your project.
Remember we home brewers are watching the pro;)

ClaudiusB
 
Update: Spent my lunch break writing the rough rough logic in RSLogix. I still need to flesh out the process section. I am also considering wiring in feedback from the relays and PIDs for alarming.

Added the .RSS ladder logic and .PDF RSLogix Report with the ladder printed out.

edit: The logic is broken, I did not realize that the MicroLogix does not support CPT instructions. You also can't seem to do any sort of online edits... LOL.I will be posting a revised .RSS this evening, it took most of the night to get RSLogix and AdvancedHMI setup on the wife's laptop (bad idea). I have to edit the device logic in order to support the touchscreen control (the toggle function in advanced HMI seems to be having issues with the way my device logic handles bumpless transfer from Manual to Auto...). So expect version 1.1beta tonight! Once I get the HMI ironed out, I will be posting the main control screen!
 
Update: Lunch break progress on the Main screen. Designed to look good on my tablet (1280x720), and work well with touch control. The spacing at top and bottom are for a logo, generic info, and a nav bar.

IXt4xDp.jpg


Edit: Just realized I forgot the sparge step.... completely. It's not in the logic, nor the screens. Damn. Guess thats what I meant by transfer to kettle?

Need to add the following:
  • Start heating sparge at mash time -15min.
  • Start Water pump on user PB
  • Start Wort pump on user PB
  • Change wording and graphics on HMI to match PLC.
 
Update: Lunch break progress on the Main screen. Designed to look good on my tablet (1280x720), and work well with touch control. The spacing at top and bottom are for a logo, generic info, and a nav bar.

IXt4xDp.jpg


Edit: Just realized I forgot the sparge step.... completely. It's not in the logic, nor the screens. Damn.
Looking great and all for free.

Cheers,
ClaudiusB
 
Update: Ironed out some issues in logic during testing. Added alarm handler ack and the start brew button to the main screen!

CatahoulaBrewingCo.RSS

AdvancedHMI Release 1.1

Update 4/10/14: I got the wireless adapter installed and hooked up to the PLC, but lacked an outlet to plug it in! So, if everything boots up and talks, expect a demo video of AdvancedHMI controlling over WIFI to the ML1200 :rockin:
 
Back
Top