[DIY106]
Do it yourself !
Zedomax Party Light II – Make a computer controlled Party Light Part II
Okay, last time I made a computer controlled party light in 90 seconds but I ran into some problems. The party light was an experiment and I needed something that would be more realistic.
Something that has isolation to protect against electrical surges and what not that could cause pre-mature device failure and all that jazz.
So I just took the idea and went a little deeper.
Here’s a video of Party Light II in Action:
video://www.youtube.com/watch?v=z4i4eNVeXXU
Parts List:
6(or more) Clip-on bulb thingee $30
Available at Home Depot
1 Din-rail $1
Available at www.din-rail.com
1 CuSB-22R $129
Available at cubloc.com
Estimated Time to Assemble: 1 hour
Estimated Time to Program: 20 minutes (or none if you use my source code)
Connections

(Wiring, notice I have a yellow wire between label COM and L)
(Sticking it on the DIN rail w/ the clip on bulbs)
(The CuSB has a DIN-rail mount, so
you can just stick it on the DIN-rail)
Here’s a simple diagram for connections:
.
(When a relay turn On, the blue line gets connected w/ the red line via the green line)
(party time~)
Program Source…
You can simply copy and paste the code to your CublocStudio and then download to your CuSB PLC.
You can play around with it by changing the numbers of For…Next loops and the delay times of sub functions.
BASIC Source Code:
[relay002.cul]
Const Device = CB280
Dim a As Byte
Do
For a=0 To 2
Program1 100
Next
For a=0 To 2
Program2
Next
For a=0 To 2
Program2B
Next
For a=0 To 2
Program3
Next
For a=0 To 2
Program4 100
Next
For a=0 To 5
Program4 50
Next
For a=0 To 5
Program4 40
Next
For a=0 To 10
Program1 30
Next
Loop
End
Sub Program1(d As Integer)
one
Delay d
two
Delay d
one
Delay d
two
Delay d
one
Delay d
two
Delay d
one
Delay d
End Sub
Sub Program2()
Dim B As Byte
Out 42,1
Out 43,1
Out 44,1
Out 45,1
Out 46,1
Out 47,1
For B=41 To 47
Out B,(Outstat(B) Xor 1)
Delay 100
Next
For B=47 To 42 Step -1
Out B,(Outstat(B) Xor 1)
Delay 100
Next
End Sub
Sub Program2B()
Dim B As Byte
Out 42,1
Out 43,1
Out 44,1
Out 45,1
Out 46,1
Out 47,1
For B=47 To 42 Step -1
Out B,(Outstat(B) Xor 1)
Delay 100
Next
For B=41 To 47
Out B,(Outstat(B) Xor 1)
Delay 100
Next
End Sub
Sub Program3()
oneA
Delay 200
twoA
Delay 400
oneA
Delay 200
twoA
Delay 400
oneA
Delay 200
twoA
Delay 400
oneA
Delay 200
twoA
End Sub
Sub Program4(d As integer)
one
Delay d
Out 42,0
Out 43,0
Out 44,0
Delay d
one
Delay d
Out 42,0
Out 43,0
Out 44,0
Delay d
one
Delay d
Out 42,0
Out 43,0
Out 44,0
Delay d
one
Delay d
Out 42,0
Out 43,0
Out 44,0
Delay d
two
Delay d
Out 45,0
Out 46,0
Out 47,0
Delay d
two
Delay d
Out 45,0
Out 46,0
Out 47,0
Delay d
two
Delay d
Out 45,0
Out 46,0
Out 47,0
Delay d
two
Delay d
Out 45,0
Out 46,0
Out 47,0
Delay d
End Sub
Sub one()
Out 42,1
Out 43,1
Out 44,1
Out 45,0
Out 46,0
Out 47,0
End Sub
Sub oneA()
Out 42,1
Out 43,0
Out 44,1
Out 45,0
Out 46,1
Out 47,0
End Sub
Sub twoA()
Out 42,0
Out 43,1
Out 44,0
Out 45,1
Out 46,0
Out 47,1
End Sub
Sub two()
Out 42,0
Out 43,0
Out 44,0
Out 45,1
Out 46,1
Out 47,1
End Sub
Taking it Further…
The idea here is very simple, that we can make a party light for this weekend’s labor day barbeque w/ friends while my boss has gone to a meeting…
OR you can use this simple lighting for your next big show,
retail display, clothing store, small nightclub or bar, bottom of your car (use DC lights), office, open-house, parties, holloween, etc…etc…
Anyways, we will make some new things next time I get a chance…
If you are having any trouble with above app, please e-mail max@zedomax.com
If you have any cool apps you’d like to share or want some kind of DIY, please e-mail to max@zedomax.com
We do accept free samples for DIYs, please email max@zedomax.com 🙂
Pingback: Zedomax Party Light II- Make a computer controlled Party Lights | zedomax.com - blog about DIYs and Review on reviews of gadgets and technologies...
Pingback: Comfile Technology Blog » How to Build a Party Light using a CuSB22R PLC
Pingback: Zedomax DIY 127 - Make an Ethernet controlled Color Organ! | zedomax.com - blog about DIYs and Review on reviews of gadgets and technologies...
Pingback: Halloween DIY - How to Make a Disco Ball Costume! | zedomax.com - The DIY, HOWTO, Hacks, Gadgets, and Tech Blog!
I have posted on your youtube video about the cubloc programming. Im really into this and I would love it if i got a reply by email. I know you’re probably onto bigger and better things since 2006, but Im new to programming and i LOVE messing with wiring and PCB’s This is my first big project 🙂