Christmas Lights!!!!
Hi All
Thought i would share my christmas project with everyone. I have always wanted to copy those crazy uTube videos of christmas light to music. Well i finally looked into it and found that everyone is generally using Light O Rama. Which is cool, but cost dam near 800 bucks for 32 channels. So i thought i would build it all myself. So i grabbed my BS2 from my Boe Bot, bought 20 1AMP PC board relays off of ebay for 15 bucks, (Spent way to much for transistors, resistors, soldier, diodes·and pcb board from Radio Shack, (Hate that place.) and went to work. Took me about 3 weeks total so (Which is way to long, I made a few stupid mistakes since i don't do this stuff often, and used visual studio C++ for the first time.). Anyways, I made my own relay boards, threw together a very dirty housing for them with 16 outlets, put up all my lights, laid out alot of extension cord and wrote a gui in Visual C++ to controll the lights over serial. At first i tried just programming the BS2, quickly found that to be very limiting, not really surprising. Overall it is working out very well. I did rip off the actual sequences from other people. I was finding that actually writing the sequence manually was taking way way to long. I took a look at Light O Rama software and i must say, it is very nice for writing a sequence. Then i struck gold and found that their Version 2.0 software stores the files as xml. So from that i found a couple sights where people post there LOR files, downloaded some good ones for 16 channels and wrote a parser into my gui. Worked out great. The tricky part is assigning the channels in their sequence to the appropriate thing in my yard. I plan on having a total of 4 songs this year. I have 2 tuned out and working great so far, just a little bit more work and the other 2 will be done. Now i am waiting and hoping the FM transmitter i ordered off of Ebay from hong kong makes it here in time for christmas. That way people will be able to hear the music in their car.
It worked out that I seem to only be able to send the serial commands every 40 milliseconds reliably.
Which is ok I think.
The LOR stuff has twinkle and shimmer effects.
I think i can do that next year by using the pulsout command on the BS2 side of things.
A couple lessons learned, should have used bigger relays. 1 Amp isn't much and doesn't allow me to expand alot. I actually had to build a 17'th circuit because the porch lights were drawing to much current to go thru 1 relay.
I used mechanical relays, and there lifetime at full load is 100,000 cycles no load 5 million.
Running lights like this I do not expect them to last more than 2-3 years.![confused.gif](http://forums.parallax.com/images/smilies/confused.gif)
Managed C++ appears to be a big pain in the butt.
Without LOR software i don't think i can easily expand my number off relays much without making things to complicated.
Never assume those transistors in that old parts draw are NPN because they are labeled as such.
My wife has been great, she has let me take alot of time to do this.
Here is the youtube link to my best song so far.
http://www.youtube.com/watch?v=6QhCEZxfU38
Will post more later.
Also here are a couple pics of the setup, will open up the housing and show the relay boards later.
And here is the BS2 code. (I know someone will ask for it.) Simple ehh.
And here is the C++ code and gui.
Please go easy on me when viewing the code.
I know there are some really bad things in there, but it does work and will slowly get cleaned up.
If anyone knows why "delete thread" or thread.Dispose() will not work please please let me know. (See comments in form1.h)
That confused me for a whole night. (I found a way around it, but it would be really nice to be able to kill a thread.)
Also if you have never heard of Holdman, google Holdman Family Christmas and watch his YouTube video.
That dude is amazing.
Post Edited (lboucher) : 12/6/2009 2:26:46 PM GMT
Thought i would share my christmas project with everyone. I have always wanted to copy those crazy uTube videos of christmas light to music. Well i finally looked into it and found that everyone is generally using Light O Rama. Which is cool, but cost dam near 800 bucks for 32 channels. So i thought i would build it all myself. So i grabbed my BS2 from my Boe Bot, bought 20 1AMP PC board relays off of ebay for 15 bucks, (Spent way to much for transistors, resistors, soldier, diodes·and pcb board from Radio Shack, (Hate that place.) and went to work. Took me about 3 weeks total so (Which is way to long, I made a few stupid mistakes since i don't do this stuff often, and used visual studio C++ for the first time.). Anyways, I made my own relay boards, threw together a very dirty housing for them with 16 outlets, put up all my lights, laid out alot of extension cord and wrote a gui in Visual C++ to controll the lights over serial. At first i tried just programming the BS2, quickly found that to be very limiting, not really surprising. Overall it is working out very well. I did rip off the actual sequences from other people. I was finding that actually writing the sequence manually was taking way way to long. I took a look at Light O Rama software and i must say, it is very nice for writing a sequence. Then i struck gold and found that their Version 2.0 software stores the files as xml. So from that i found a couple sights where people post there LOR files, downloaded some good ones for 16 channels and wrote a parser into my gui. Worked out great. The tricky part is assigning the channels in their sequence to the appropriate thing in my yard. I plan on having a total of 4 songs this year. I have 2 tuned out and working great so far, just a little bit more work and the other 2 will be done. Now i am waiting and hoping the FM transmitter i ordered off of Ebay from hong kong makes it here in time for christmas. That way people will be able to hear the music in their car.
It worked out that I seem to only be able to send the serial commands every 40 milliseconds reliably.
Which is ok I think.
The LOR stuff has twinkle and shimmer effects.
I think i can do that next year by using the pulsout command on the BS2 side of things.
A couple lessons learned, should have used bigger relays. 1 Amp isn't much and doesn't allow me to expand alot. I actually had to build a 17'th circuit because the porch lights were drawing to much current to go thru 1 relay.
I used mechanical relays, and there lifetime at full load is 100,000 cycles no load 5 million.
Running lights like this I do not expect them to last more than 2-3 years.
![confused.gif](http://forums.parallax.com/images/smilies/confused.gif)
Managed C++ appears to be a big pain in the butt.
Without LOR software i don't think i can easily expand my number off relays much without making things to complicated.
Never assume those transistors in that old parts draw are NPN because they are labeled as such.
My wife has been great, she has let me take alot of time to do this.
Here is the youtube link to my best song so far.
http://www.youtube.com/watch?v=6QhCEZxfU38
Will post more later.
Also here are a couple pics of the setup, will open up the housing and show the relay boards later.
And here is the BS2 code. (I know someone will ask for it.) Simple ehh.
And here is the C++ code and gui.
Please go easy on me when viewing the code.
I know there are some really bad things in there, but it does work and will slowly get cleaned up.
If anyone knows why "delete thread" or thread.Dispose() will not work please please let me know. (See comments in form1.h)
That confused me for a whole night. (I found a way around it, but it would be really nice to be able to kill a thread.)
Also if you have never heard of Holdman, google Holdman Family Christmas and watch his YouTube video.
That dude is amazing.
Post Edited (lboucher) : 12/6/2009 2:26:46 PM GMT
Comments
Looks like it works very well!
Threads can die, but they should never be killed. Languages/environments that allow you to kill or suspend a thread find themselves dealing with "strange" deadlocks. This is why cancellation is cooperative.
Analogy:
"Kill Thread" is like ground control being able to switch off power on a 747. They might typically get it right and do it while the 747 is on the ground, but if they don't know what the 747 is doing, switching off power could cause the 747 to crash.
"CancelAsync / CancellationPending" on the other hand is like ground control radioing the pilot of the 747 to turn off power. The Pilot could ignore it, but typically the Pilot would honor the request and turn off the engine when it's safe to do so.
What made you use C++ instead of going with a straight PBASIC menu driven code?
humanoido
Merry Christmas!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
But i used C++ for several reason. Knowing more C++ will help me in my job, PBASIC would not.
With a laptop and C++ and can define as many variables as i want. The BS2 can only store so much.
Easily defined functions.
Using a C++ gui i can kick off the music in windows media player at the same time the lights start. cannot do that with PBASIC
ETC ETC...
PS I looked into the Light o Rama stuff too. It is expensive if you go for the complete kits. However, you can get the 16 channel deluxe high power unit in kit form for $159. That's why I am uncertain which way to go. I would love to see a Parallax based open source controller get off the ground...........
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
~~ dRu ~~
Post Edited (dRudRudRu) : 12/19/2008 11:51:06 PM GMT
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
Thanks for the inspiration.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com
Still has a couple bugs, but it is generally working very well.
Ohh and by the way. I have had my first relay failure, I was working quick to get it up and running and did not notice i had 1 relay running 1.5 amps. (They are only rated for 1.0 amps.) Tested my other strands and found the porch relay was also a bit over amps. So i will be fixing those up tomorrow or monday. Still hoping to get that FM transmitter. My sign with the radio station will be ready to go.
Merry Christmas
·· I like your project and I have been working on a simular project but work did not allow me to finish with the hardware design I have some software I wrote in VB2008 that you might like it controls 32 channels over a serial port.
It saves its sequences in an xml fial also on your C: drive look for the name you created in the software and you can view the file directly and also edit it in notepad.
Their might be some bugs in the software so let me know.
All you have to do is have your stamp setup to recieve the serial data and when a channel is on the coresponding 1 is on in the string. Just seperate the string and use if then statement in your stamp code if you need help let me know.
Also their is a free software called Vixen alot of people use check out their websight they have a plugin for using the Efx hardware parralax stocks at it allows dimming of each circuit. http://www.vixenlights.com/
good luck
Attached is the source code for my GUI IN VB2008.... anyone can use the free VB2008 express from Microsoft to veim and modifiy the code.
When you get some of the bugs worked out, do you intend to release the GUI?
·· I if you are talking to me I might release it but am not sure I might start a sight and make it open source so others can help make it better.
I did not mean to Highjack the thread and if anyone is more interested in the software I can start a new thread.
I want to add dimming to the program on each channel next.
Just scrounged it together from parts i had.
I do not suggest anypne make anything to this low of a standard.
Anyways here is a link on the circuit.
http://www.kpsec.freeuk.com/trancirc.htm
Merry Christmas
Post Edited (lboucher) : 12/24/2008 4:15:34 AM GMT
arial view of the relay?
http://www.kpsec.freeuk.com/trancirc.htm
As for the GUI not loading.
I ran into that on a work computer also.
My best suggestion is installing visual studio express 2008. Google it, it is free.
Then build the project yourself.
Probably something in the .Net framework not installed on you computer.
Installing visual studio should fix that.
You will also need to load up the BS2 with the Serial Communition Fast.bs2 file.
Look in the zip file attached to my first post
And you will need to put the attached XML's into the C:/ directory along with the approriate MP3's
I will let you download those legally or illegally yourself.
Look in the code for the specific names.
Then you need to assign the pins to the appriote lights in your yard.
I know my code is hard to read, i need to clean it up a bit.
Its not going to be just plug and play, you will at least have to adjust the channel layout in the C++ code for the different songs.
Then you can easilly open it up in visual studio express 2008.
Also i have fixed several bugs since my first post, so you will want the latest code.
Also this is hardcoded to use COM4, so a user would need to edit that.
Lucas
My lights to Let It Snow
http://www.youtube.com/watch?v=6nZLGOxQDnA
My lights to Jingle Bells Techno
http://www.youtube.com/watch?v=6QhCEZxfU38
Thank You for sharing this web page on how to use Transistors this will help me out a lot
http://www.kpsec.freeuk.com/trancirc.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
Planning on using triacs and optocouplers instead of relays and transistors, already have them ordered from Mouser. They should last a much longer time then the 100,000 cycles for the relays, and give me much more available current for each channel, and cheaper. The only thing I know I'll miss is the clicking of all the relays.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
IT / Web / PCB / Audio
Thanks for putting this solution out there.
·
Doesn't have any information on lifetime, does anyone know how long these last?
Thanks
Lucas
Uses Cosmo 3023 Triac driver Opto-isolators. www.hongjing-tech.com.cn/COSMO/KMOC3023.pdf Fairchild equivalent at Digikey is 73 cents (P/N MOC3023M)
and the Triacs are SanRex TMG8C6 (marked T8C6). www.sanrex.com/discrete_triac_pdfs/TRIAC/Through%20%20hole%20---%20Standard/TO-220AB/TMG8C60-R.PDF
The same Triacs are at Jameco for 84 cents as part number 657053. Interestingly, the Triacs are capable of 8 amps. This makes me believe that the 1.25amp max listed is due to the wiring/traces and the fact that all 6 outlets are running from a single 15A outlet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
IT / Web / PCB / Audio
Post Edited (WBA Consulting) : 12/29/2008 5:16:42 AM GMT
This looks like a really cheap way to proceed, and looks like you have a great hack going there.
The parts seem real cheap. Looks like a total cost per io of under 5 bucks.
Did some reading and i think i generally understand the circuit.
If you wouldn't mind, could you take a look at that board and show me a wiring diagram about how the triac is wired to the opto isolator and the opto isolator to the controll chip.
I am kinda wondering what the capacitor in the picture is for?
Also is there a controllable resistor on that board for the diming?
Not quite sure how that works.
Thanks
I also found the "timer only" box at home depot online for $20. I bought two in hopes they have the same Triac boards. Then I'll have 12 more channels in weatherproof extension boxes.
Gemmy Light Show Timer without Sound Model 19495
www.homedepot.com/webapp/wcs/stores/servlet/ProductDisplay?storeId=10051&langId=-1&catalogId=10053&productId=100646547
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
IT / Web / PCB / Audio