I will show you how to create your own computerized light show!!  If you have any questions or comments feel free to post.




  A few options are;

  • LOR ( Light-O-Rama
  • Vixen Lights
Most of these light shows have a big setup cost for the software and hardware. However they are a much easier setup. The vixen lights is free but will take some foot or should I say finger work but if you are up for it it will be well worth it. I chose to use vixen lights and I have already done all of the searching and will share all of this with you in one spot. So grab some snacks and a drink and get ready to learn. I decided to use the arduino as the hardware controller, but there are many supported hardware options. 

Step 1: Things needed

  • Vixen lights program
  • Arduino ( I'll assume you know how to use one )
  • Relay board or if you choose to build one click here  for my build info
  • Female cord ends ( I found some on ebay ) But the ones on LoghtORama web site are longer.
  • Plastic enclosure (see pic)
  • Computer
<p>awesome project! I love mine and I plan on using it for many years to come. I also purchased a high power fm transmitter so traffic can hear the music. I have videos of it too. facebook.com/eightbitrip</p>
<p>I really like your set. Do you have any additional details on how you put it together? I'd like to build one for the holidays.</p>
<p>i have the vixonlight i am using the sainsmart 16 ch. 12v powerd sepertly and weating on theftdi 5v breakout yhanks</p>
<p>Try this code; BobP2 posted this in the comments below, he supplied this to help with better control. I modified it a bit to fit the 16 channel set up you are going for. Load it into the arduino and let me know from there any additional help you need. </p><p>const int numChannels = 16;<br>// List Arduino pins in Channel number order<br>int channels[numChannels] = {2,3,4,5,6,7,8,9,10,11,12,13,A0,A1,A2,A3};<br>int incomingByte[numChannels];<br><br>void setup()<br>{<br> Serial.begin(9600);</p><p><br> for(int i = 0; i &lt; numChannels; i++){<br> pinMode(channels[i], OUTPUT);<br> // Start with lights turned off<br> //digitalWrite(channels[i],0);<br> digitalWrite(channels[i],1);<br> } <br><br><br>}<br><br>void loop()<br>{<br> if (Serial.available() &gt;= numChannels)<br> {<br> for (int i=0; i&lt;numChannels;i++)<br> incomingByte[i] = Serial.read();<br><br><br> for(int i = 0; i &lt; numChannels; i++)<br> //digitalWrite(channels[i], incomingByte[i]);<br> digitalWrite(channels[i], 255-incomingByte[i]);<br><br> }<br>}</p>
<p>wirenut1980 is there a random codr i can put in wit the sketch i got fron you thanks john</p>
<p>With the code provided it takes the data from vixen and converts it to an output. If you were to try to add a random there wouldn't be a way to have it both ways. When vixen isn't sending data to the arduino it has no way of knowing when this happens and so has no way to fire off a random sequence. I have seen others ask the same question and get the same answer I have given.</p>
<p>thanks wirenut 1980 john</p>
<p>is there or can i ad a random mod to use when the vixen is not runnihg thanks for the help</p>
<p>is there a place to go for help on vixen that is not over my head found some but not user frendly am trying to use vixen thanks hor the help</p>
<p>Every thing I have/are learning about vixen is from <a href="http://www.doityourselfchristmas.com" rel="nofollow">www.doityourselfchristmas.com</a> you can search the wiki and forum. You can also post a question by searching the forum for your specific topic then adding a new thread. Everyone there is very helpful. </p>
<p>hi i have the mega 2560 i am in need of the program to work with the 16 ch relay board. i have the vixonlight in my comp. thanks cbjk@sbcglobal.net</p>
<p>Thank you for viewing. I need to gather some more info. What version of vixen lights are you using? What type of relay board are you using? </p>
<p>Thanks for the instructable. Google got me here when I was trying to fix a problem. Since this helped, I'd thought it only polite to give back. Two details. First, I rewrote the Arduino code similar to Expert Noob. Second, my Sainsmart relays (3 x 8 relays/board) is reversed from the Arduino pins (0 is On, 1 is Off) so the code below accounts this. A side note, in an ON/OFF situation, Vixen sends either a 0 or a 255. Hopefully, this code will help others.</p><p>In this code, there are 24 relays, but I left the 15 relay code commented. To change from 15 to 24 relays, only two lines need to be changed (the number of relays and the actual pins used). To change too reversed relays, another two lines need to change.</p><p>//const int numChannels = 15;<br>const int numChannels = 24;<br>// List Arduino pins in Channel number order<br>//int channels[numChannels] = {2,3,4,5,6,7,8,9,10,11,12,13,A0,A1,A2};<br>int channels[numChannels] = {22,24,26,28,30,32,34,36,23,25,27,29,31,33,35,37,40,42,44,46,48,50,52,54};<br>int incomingByte[numChannels];<br><br>void setup()<br>{<br> Serial.begin(9600);</p><p><br> for(int i = 0; i &lt; numChannels; i++){<br> pinMode(channels[i], OUTPUT);<br> // Start with lights turned off<br> //digitalWrite(channels[i],0);<br> digitalWrite(channels[i],1);<br> } <br> <br><br>}<br><br>void loop()<br>{<br> if (Serial.available() &gt;= numChannels)<br> {<br> for (int i=0; i&lt;numChannels;i++)<br> incomingByte[i] = Serial.read();<br> <br><br> for(int i = 0; i &lt; numChannels; i++)<br> //digitalWrite(channels[i], incomingByte[i]);<br> digitalWrite(channels[i], 255-incomingByte[i]);<br> <br> }<br>}</p>
<p>Glad my instructable helped. Thank you for the post of the code as this will help many others. The reason sites like this exist is to help people by giving a starting point from there new ideas are created and re shared. This means things can only get better. </p>
<p>I ordered an arduino uno R3 and I have 8 relays. What do i need to plug in to the arduino uno from the relays and what kind of code do i need to use to make this work in vixen. I am really new at this and really need some help. Any would be greatly appreciated. I really need to know what programs need to be open when running vixen and where do i need to put in the code.</p>
<p>I need a few details before I can help. Have you read the information on how to program the arduino? Have you had a chance to fully read the information in this instructable? What kind of relays are you using? Are they individual with pins on the bottom no board, individual with a small circuit board on them, or combined on a single circuit board. It would be helpful if you could post the information for the relays. Post a pictures of the relays as well.</p>
<p>I made a setup similar to this using the Arduino Mega 2560 and a 16 channel relay board. I used the code from this article, but when I program my lights in Vixen 2 when the lights are supposed to be off, they are on, and when they are suppose to be on, they are off. I know I can just program it the way I want and then select invert, but is there something easy that I messed up somewhere along the line?</p>
<p>sounds like you have inverted relays: High is off, Low is on. You might want to switch your wires on the relays if they are on NO to NC or from NC to NO depending on how that is set up. The Arduino code can also be re written (probably easiest if things are already build). In the past, I have had to switch HIGH with LOW, however this code has none of that so a &quot;not&quot; or ! will be needed somewhere. I'll see If I cant rewrite this code as I progress through this process.</p>
<p>Try this code on the arduino, also only the first few lines need to be changed in order to compensate for more or less channels.... Notice the ! I added before the last 'incomingByte[i]'?<br><br>int ledPin[] = {</p><p> 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, A0, A1, A2, A3 };</p><p>int pinCount = 16;</p><p>int incomingByte[16];</p><p>void setup()</p><p>{</p><p> Serial.begin(9600);</p><p> for (int i = 0; i &lt; pinCount; i++) {</p><p> pinMode(ledPin[i], OUTPUT); </p><p> digitalWrite(ledPin[i], HIGH); </p><p> }</p><p>}</p><p>void loop()</p><p>{</p><p> if (Serial.available() &gt;= pinCount)</p><p> {</p><p> for (int i=0; i &lt; pinCount; i++)</p><p> {</p><p> incomingByte[i] = Serial.read();</p><p> }</p><p> for (int i = 0; i &lt; pinCount; i++) {</p><p> digitalWrite(ledPin[i], !incomingByte[i]); </p><p> } </p><p> }</p><p>}</p>
<p>Thank you for viewing. That is a weird thing to happen. If you can reply with a few pictures of your set up including the relay board so I can see what might be going on here. </p>
<p>It's not exactly the same design since I used an already built relay board, but the code is essentially the same. I just used all of the digital pins instead of the PWM pins. Let me know if you see something obvious that I'm doing wrong. Thanks!</p>
<p>The relay board you are using utilizes 12v relays. From what I can see from the picture you are trying to power the relay board from the arduino? is this correct? The arduino supplies 5v+. This is simply not enough power for 1 relay let alone 16. This could damage the arduino. My suggestion is to connect a ground wire from the relay to the arduino and then connect a 12v wall wart to the relay board. The arduino and relay board should share the same ground. </p>
<p>I do have 12 volts powering the relay board. It's not exactly clear in the picture, but I have a separate power source for it. Once plugged in the relay board and arduino are both on. Since the USB cable also supplies power to the arduino, should I not have power (jumper wires) going from 5V on the arduino to the relay board? Right now I have the 16 digital I/O pins from the arduino to the relay board. Also i have a jumper wire going from a 5V pin on the arduino to a 5V pin on the relay board. Same thing with the ground. Maybe that's the issue?</p>
<p>That could be an issue. It doesn't hurt to try to remove the 5v+ but leave the ground from the arduino and relay board an see what happens.</p>
<p>It's a little hard to fully make out the wiring. I put together a simple diagram. please refer to it to see if you have wired your setup the same and let me know. </p>
<p>The video is no longer valid :(</p>
<p>How so?</p>
<p>How do you do it with light o rama?</p>
<p>Sorry for the late reply. I was out of town. I have never looked in to Light o rama so I am not sure. A great place to get help for this is <a href="http://www.doityourselfchristmas.com" rel="nofollow">www.doityourselfchristmas.com</a> you can search for help, or you can post a question and someone will help you out. Good luck. </p>
light-o-rama is a completely different beast all together it's prebuilt and preprogrammed, if I'm not mistaken.
<p>Mine is being quite mixed up. Using the channel tester in Vixen, the lights that turn on are seemingly random, sometimes one channel lights two. Right now I'm only using LEDs ran straight into the arduino with just resistors. I honestly have no clue what's up.</p>
<p>Post the code that you are using here so I can take a peak at it.</p>
<p>I'm using the code from this article! Might it be that I've got the event period at 50ms? Or, that I'm only using 13 channels? The same thing has also been happening with several other people's codes made for this same thing.</p>
<p>If you use more or less channels then what is in my posted code (15ch) then you must adjust the code and vixen accordingly. The video explains this however you need to change the following lines in the code: </p><p>int incomingByte[15]; to int incomingByte[13];</p><p>if (Serial.available() &gt;= 15) to if (Serial.available() &gt;= 13)</p><p>for (int i=0; i&lt;15;i++) to for (int i=0; i&lt;13;i++)</p><p>you also have to remove two channels from each section that contains A-O</p><p>Then you must update vixen through the profile of your sequence that is attached to generic serial this must also be 13 ch. any time you add or remove these items listed above they must be adjusted. The reason for the randomness is that if vixen sends out a set number of code like 13 channels but the arduino is looking for 15 like the posted code then it gets confused. Example if you have 15 eggs and one crate that holds 12 the remaining eggs have no place to go. </p>
<p>Ah, there we go! It works perfectly now, and now I can transition to building the actual display diorama. Thank you much so!</p>
<p>Glad to see you got it working it will be lots of fun from here on out</p>
<p>Got it done! Here's a video of it with a couple songs. Thank you for this guide and workings!</p><p>http://youtu.be/wXTR-QDN4KY</p>
<p>New link: http://youtu.be/1vOkF8O_usg</p>
<p>That is AWESOME!! Great job with the syncing and amount of detail that went into your project. </p>
<p>Does anyone know if the code has to be changed for the Arduino Mega? Btw, does this code work with Vixen 3?</p>
<p>Not sure if it will work with Vixen 3. But this code will work with the mega. If you would like to use any of the higher number pin you simply write them in. Hope this helps.</p>
<p>Anyone know if it is possible to upload the sequence code onto the arduino so that a pc is not required? Or is there any software that will write the code for you once you have designed the sequence?</p>
<p>Thank you for viewing. I came across this page a while back. Bill uses vixen to write the sequence then converts it to a word file and then uses some python script so it can run stand alone. It should be a great place to start. </p><p><a href="http://www.billporter.info/2012/10/08/our-geeky-wedding-electronic-wedding-wishing-well-ewww/" rel="nofollow">http://www.billporter.info/2012/10/08/our-geeky-wedding-electronic-wedding-wishing-well-ewww/</a></p>
<p>Excellent, thank you - looks good.</p>
OK. Thank you i will try that.
Hi, <br> <br>Great! Can you give the arduino code ?
Thank you for your interest! So sorry I was updating 3 instructables in one night and must have lost track of the files. I posted a zip file as well as copied and pasted the code. I even added the &quot; How to create a vixen sequence &quot; video.

About This Instructable


84 favorites


More by wirenut1980: Garden storage Wet Shelf Talking Pumpkin Costume Arduino Light Display With Vixen
Add instructable to: