We have all seen "static" Christmas lights that always stay on, these instructions will allow you to build a christmas tree light controller using a PLC (Programmable Logic Controller) to make dynamic light displays. In these instructions we will set up three sockets that are under control of the PLC, and you can plug lights into these sockets.
Connect Power to the CUSB
- Buy or obtain a PLC unit, preferably one that is easy to use. In this example we'll use the CUSB 22-R [1]
- Cut and trim back the outer covering of your AC power cord.
- Find 3 wires inside, one green, one black, and one white.
- Splice all three wires.
- Hook up the green wire to the CuSB where its labeled "FG", which is frame ground.
- Screw down tight.
- Connect the black and white wires from your AC power cord onto the terminal headers as shown.
- Black and White wires do not have polarity, so you can put either or onto the CUSB labels, N and L.
- Leave these wires unscrewed or loose for the moment.
Hook up the AC Outlets
- Connect a wire from the CuSB connector labeled COM to the CUSB connector N.
- Connect a wire from the CUSB connector labeled P40, to one of screws on the AC connectors. Polarity doesn't matter so any of the two screws will work.
- Screw down tight.
- Repeat the above step for the rest of the AC connectors.
- Connect a wire from the CUSB label P41, to one of screws on the AC connectors and also connect from CUSB label, P42, to one of screws on the AC connectors.
- Connect a wire from CUSB label L to the other screw on the AC connectors.
- Repeat the steps above for each AC connector which will leave you with something like the image shown here.
- Connect light strings to each of the AC connectors.
Program the PLC
- Connect the serial cable to program the unit.
- Copy and paste the following code into CublocStudio and download to your CUSB:
Const Device = CB280
Dim Interval As Long
Interval=300
Do
High 40
Low 41
High 42
Wait Interval
Low 40
High 41
Low 42
Wait Interval
If Interval>100 Then
Interval=Interval-50
Elseif Interval>0 Then
Interval=Interval-10
Else
Interval=300
End If
Loop
Check and Wrap up
- Check to make sure it all works.
- Tighten and check every connection.
- Insulate or protect where needed.
Things You'll Need
- 1 CuSB22R from | cubloc.com
- 1 AC power cord (like the one for your computer or get it here: | cubloc.com)
- 3 AC Connectors from Home Depot
- A bunch of spare wire.
Tips
- Change the Interval=300 line so the lights start blinking slower or make a completely different program for your controller.
- Put PLC controlled lighting on a deer structure (or something similar) and time the lights so it appears animated.
- Feel free to email me: [2]
- You can also connect light strings in series, per a relay.
Warnings
- As with anything electrical make sure everything is disconnected from the wall power before making connections.
Comments
No Comments Exist
Be the first, drop a comment!