|AutomationDirect Live Chat|
Part 4 of 4
Fully Programmable System. This video will teach you how to convert a Simple Automated Halloween Prop Into a Fully Automated System using NITRA Pneumatics and CLICK PLC.
Legacy Video Sequence Number: L-PNU-CLK-001-4
to learn more visit http://www.automationdirect.com/pneumatic-parts
Welcome to our automated Halloween prop video. This is the fourth of four videos, so if you missed the first three, please, go back and watch them before continuing on. In this video I plan to show you how to fully automate our pneumatic system we previously created. For ease of demonstration, I will leave our original two setups for reference and create a complete new Third system. In this system I will still use an electrically operated pneumatic solenoid valve, and I will still use a photo sensor. The difference is that, I am going to incorporate a controller or a PLC to control the solenoid when it is turned on and how long we want it on. Maybe I will show how we can trigger the air cylinder to move in a back and forth motion a few times. This system will have a standard 2 port air cylinder like this one vs. the spring returned style that we had previously used. So you will either have to use 2 small solenoids to control it, or a two way solenoid valve like this one. It is called a 3 port 5 position valve. I will explain a little more on the differences later. I have several 2 port air cylinders here. Your requirements may differ and you may want more travel like one of these large cylinders here. I plan to use this smaller one for ease of space on this demo. Also, if I had chosen to use a larger air cylinder, I would need to account for the large air volume needed in order to move the cylinder rapidly. This means that I would have had to use larger fittings, larger air tubing, larger hose and larger capacity air valves. So keep all of these factors in mind when selecting your parts. OK, so I picked up a small PLC called the “CLICK”. I did this for 3 reasons… A, it is self contained, so no additional parts or IO cards are needed, B: it is very inexpensive and C: the software is FREE! Oh.. and since this is AutomationDirect, I had a few lying around. No need to overcomplicate a project right? We still could have used a DL05, DL06 or even a DL105 since we can get a limited FREE version of Direct Soft, but the CLICK is still inexpensive and the software is easy to use and it leaves us with tons of capabilities to expand if we need to. In other words, if we ended up wanting to use 10 or 20 of these automated systems in a haunted house, we could control each one of them in the same or different ways or pretty much control the WHOLE haunted house with this one PLC. First, let’s take care of the plumbing side of this. We still plumb our main air source into the manifold or solenoid valve. I am using a 3 port valve so, we have a supply in, 2 ports offer air out and then we still have our exhaust ports. This v alve is called a 3 port 5 position with center closed it is part number: AVS-523C1-120A. This means that we can trigger air to one side to make the cylinder extend out, trigger the air to the opposite side to make the cylinder retract in, or trigger the valve to return to center and it closes off all ports and keeps pressure on both side A and side B which allows the air cylinder to stay in its current position. Otherwise, if the center was exhausted, the cylinder would be able to travel by force or gravity to either side A or side B. I probably could have used the same spring return style cylinder and one solenoid valve but the direction I chose on this last prop gave us more flexibility and control. Next, we plumb the 2 ports that will supply the air to the pneumatic cylinder. As I mentioned earlier, I will use these adjustable flow control fittings here… they will allow us to adjust the air pressure at the cylinder in order to speed up or slow down the flow. This makes the action smoother and prevents damage to our cylinder. Now that the system is plumbed, let’s wire it up. This may get a little more complicated than the previous system. Again, if you don’t have the skills or knowledge to work with electricity, we suggest hiring or finding someone that does so you and your system remain safe. So first, we need to wire up the AC photo sensor we have. It is identical to the last system. This time, we will wire it to the input X1 of the PLC. Next, we wire up the outputs Y1 and Y2 on the PLC to the solenoids. An extra step I am going to make is to incorporate a suppression diode on each output. The reason why is – solenoids can generate a spike in voltage and will send an over voltage to the PLC. To avoid damaging the PLC, we use these diodes and they will suppress or capture the spike. I am using a Ziplink module that we sell here at AutomationDirect, it is part number: ZL-TSD8-120. It is very inexpensive, easy to use and will save you money and headaches in the long run. Now, the last step is to wire up the power to the PLC itself. Again, we have a complete 120vac system, so we needed to use this power supply because the CLICK PLC requires 24vdc to operate. If we had chosen to use a 24 Volt DC system, we could omit this part and just powered our CLICK PLC from the main 24vdc source like one of these. Last is programming the PLC. I won’t go into great detail on programming, but simply show you how I programmed this system with a few lines of code. We offer detailed programming videos and training videos here at AutomationDirect and if you need further instruction, we have the resources for that. The code I used says that if the sensor is triggered, it turns on input X1. This will in turn activate Y1 output and extend the alien head out. Since we want the head to stay out, I will use a timer to start timing. I have timer T1 turned on and it times for 5 seconds. Once T1 has reached its set time, we turn off output Y1 by resetting it and turn on output Y2 which retracts the head. So if someone trips the sensor, it will start the cycle run through and reset and be ready for the next cycle. Let’s change the code and make the head move back and forth. Input X1 turns on, setting an internal bit and turning on timer T1. Timer T1 is set to time to 15 seconds. In those 15 seconds I put compare statements every few seconds telling the output Y1 to turn on. As you can see on rung 4, if the value of the timer is greater than or equal to 1, and the value of the timer is less than or equal to two, then we turn on output Y1. We don’t do this directly, because I am using internal C bits to trigger the output. Like I said, there are MANY ways to do this and achieve the same results. You get the picture right? So when I put the PLC in run mode and trigger the sensor, you can see what happens. OK, I’m happy that we were able to show so many ways to achieve the same results and I hope you are able to stop by AutomationDirects website and pick up a few parts, and be on your way to creating your own automated Halloween prop or just something fun. Please, if you create something cool, drop us a line or a link to your system in the comment fields below (if you are watching on YouTube). We would love to see what you have. And yes… some of the professional haunted prop companies do use our equipment for their props that they sell. Keep in mind… All of the products we have used in this system are products that AutomationDirect sells with the exception of the air compressor. The tubing, fittings, wires, terminals…even the Teflon tape! So keep us in mind for all of your automation needs. Thanks for watching and we hope to see you again soon.