Introduction: Arduino Light Display With Vixen
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
THIS PROJECT USES HIGH VOLTAGE! IF YOU DO NOT KNOW HOW TO HANDLE HIGH VOLTAGE HAVE A FRIEND WHO DOES HELP YOU!
I AM NOT RESPONSIBLE IF YOU GET ZAPPED OR SERIOUSLY INJURED!
A few options are;
- LOR ( Light-O-Rama
- Vixen Lights
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
Step 2: The Software
Vixen lights software;
First things first. Download the software from here www.vixenlights.com I am using version 2.1.1.0. Now keep in mind some of the sequences will not work across different versions. On the link above be sure to read the page and what to install first and so on. After download is complete extract files and check the box that says " show extracted files " to a location you will remember. When the extracted files appear right click on the vixen deer and select send to desktop. ( This will allow for fast access )
Step 3: Set Up a Sequence
Click on the vixen deer icon, you will see a grey screen with a tool bar on the top. ( it may ask if you would like to upgrade, answer no )
- On the top left tool bar, click on SEQUENCE, then NEW EVENT SEQUENCE, then VIXEN STANDARD SEQUENCE.
- A window will open ( New Sequence Wizard )
- Click next,( Event Period )
- then next again, ( Profile )
- Click on Profile Manager button. A new window will open ( Profiles )
- Click on the blue (+) new window will open ( New Profile )
- Type the name of your choice and click OK. A new window will open ( Edit a Profile )
- Chose how many channels you wish to have. ( for this instructable choose 16 and click add ) on the left side
- Click on the box with 4 color square, new window will open ( Channel Colors )
- Click new color a new window will open ( Color ) here you will select 16 colors of your choice.
- On the ( Channel Colors ) window you can drag the colors on the right to the channels on the left of your choice.
- When done click OK.
- on the ( Edit a profile ) window click on Output Plugins. New window will open ( Sequence Plugin Mapping )
- Select Generic Serial from the left menu and click on use.
- Now click on the Generic Serial in the box on the right then click on ( plugin Setup ) under channel numbers.
- A new window will open (Setup )
- Select a com port that your arduino uses and a baud rate of 9600.
- Click on OK.
- Then Click done.
- Then done again. ( New Sequence Wizard window)
- Click on the NONE drop down menu and select the profile you created.
- Then click Create it.
- A ( Save as ) window will open.
- Type the same profile name here.
Step 4: Create a Sequence
- Open vixen
- Click on Sequence (top left)
- Choose " open an event sequence "
- Click on the one you created ( sequence will open )
Add Music
To add music;
- Click on the box with only a music note ( top of page )
- Click on Assign audio
- pick through your audio files and select one of your liking
- Click OK
An empty box means this channel will be off. A colored box means this channel will be on. You can select several boxes and right click and choose on. This will make things a bit faster.
Be sure to save your work often in case it crashes.
Step 5: Schedule a Show
- Choose " Programs " from the tool bar
- Select " Manage " a new box will open ( Program Management )
- Under the " Programs " section click on the blue + a new box will open
- Enter a name of the new program
- Click OK
- Select the program you just created ( in the middle box ) it will turn blue
- Click and drag sequence(s) from the far left menu ( available sequences ) to the far right menu ( program event sequences )
- Under " Test " make sure the " use program's plugin setup " is selected
- click ok ( box will close )
- Click on " Programs" on the tool bar
- Click on Schedule ( Scheduler will open )
- Choose the view you prefer
- Pick a day and double click ( Timer will open )
- Chose " Select Program " ( chose program you created )
- chose the " Execution start " you would like ( day and time )
- Click " repeat " ( if you want this option )
- Under " Recurrence " choose your preference ( how often, then start date and end date )
- click OK
Step 6: Hardware
The arduino: Keep in mind that when using the arduino with vixen that the channels will be off by 2. Example channel 1 in vixen will operate pin 2 on the arduino. This is due to the fact that pin 0 and pin 1 is a TX RX and will not work with this set up. It's best to make a note to put with the equipment so that you will remember this.
There are some choices on hardware. I chose the most simple option to get started. A regular relay board I built. The only down fall is it's just a on/off option. Vixen can do fading but this will require a more advanced relay board. This may be in my future and will add info here when ready.
You can see my relay board layout on my other instructable. The arduino sends the on off signal to each relay that in turn will make the lights go BLINKY BLINKY.
I used the same method but a more narrow board so I could fit it the the box I chose. I used and orbit outdoor sprinkler timer box. It's rigid and the size I needed.
Step 7: The Arduino Code
TIP:
You can use more than one arduino. All you have to do is add the same exact code to both arduinos. Then in vixen add a second controller to your profile section. Then open each controller and choose which channels you want to go to each arduino keeping in mind each arduino will need to be assigned a different com port.
Adding more channels:Read below or see video.
To add more channels simply add the new lines in each section just increasing the line number by 1. you must also change the number of total channels in the 3 sections of command line. You also have to go into vixen open the profile you will be using then choose the controller and change the amount of channels you will be using.
int A = 2;
int B = 3;
int C = 4;
int D = 5;
int E = 6;
int F = 7;
int G = 8;
int H = 9;
int I = 10;
int J = 11;
int K = 12;
int L = 13;
int M = A0;
int N = A1;
int O = A2;
int i = 0;
int incomingByte[15];
void setup()
{
Serial.begin(9600);
pinMode(A, OUTPUT);
pinMode(B, OUTPUT);
pinMode(C, OUTPUT);
pinMode(D, OUTPUT);
pinMode(E, OUTPUT);
pinMode(F, OUTPUT);
pinMode(G, OUTPUT);
pinMode(H, OUTPUT);
pinMode(I, OUTPUT);
pinMode(J, OUTPUT);
pinMode(K, OUTPUT);
pinMode(L, OUTPUT);
pinMode(M, OUTPUT);
pinMode(N, OUTPUT);
pinMode(O, OUTPUT);
}
void loop()
{
if (Serial.available() >= 15)
{
for (int i=0; i<15;i++)
{
incomingByte[i] = Serial.read();
} // Arduino pins
digitalWrite(A, incomingByte[0]); // Pin 2
digitalWrite(B, incomingByte[1]); // Pin 3
digitalWrite(C, incomingByte[2]); // Pin 4
digitalWrite(D, incomingByte[3]); // Pin 5
digitalWrite(E, incomingByte[4]); // Pin 6
digitalWrite(F, incomingByte[5]); // Pin 7
digitalWrite(G, incomingByte[6]); // Pin 8
digitalWrite(H, incomingByte[7]); // Pin 9
digitalWrite(I, incomingByte[8]); // Pin 10
digitalWrite(J, incomingByte[9]); // Pin 11
digitalWrite(K, incomingByte[10]); // Pin 12
digitalWrite(L, incomingByte[11]); // Pin 13
digitalWrite(M, incomingByte[12]); // Pin A0
digitalWrite(N, incomingByte[13]); // Pin A1
digitalWrite(O, incomingByte[14]); // Pin A2
}
}
Attachments

Participated in the
Microcontroller Contest

Participated in the
Make It Glow Contest

Participated in the
Halloween Decorations Contest

















89 Comments
Question 3 years ago
hi there
is there a way to save code to a sd card and sequences work by itslef without a pc or pi ?
Answer 2 years ago
most have a test code in them to test the relays before hooked up to a computer. my 48 channel one does.
Answer 3 years ago
Not that I know of at this time. The program relies on knowing what channels are patched to what line in the sequence. It doesn't simply build that into a data string that can be sent out, the PC or PI routes that info.
5 years ago
Bro, I need your expert opinion..... I made 16ch Christmas lights controller. But the problem is when i connect 240v to the relays, the arduino and the relay board got freeze and disconnected from the computer, so the lights are freeze. So i dont known what to do. Please help me. REPLY
Reply 2 years ago
check to make sure the voltage that your relays are rated for. most for the Arduino are rated at 110V.
Reply 5 years ago
Sorry to hear it's not working but can you submit a pic of the relay setup? And the information of the relay board so I can do some research.
Reply 5 years ago
i post a link(problem video) but it not appear here.i dont know why?
and this is my sketch
Reply 5 years ago
you dont mind, give me your email or any messengers for quick communication. thanks
Reply 5 years ago
Can you post the information on the relay board, name and where you got it so I can look it up. I have a feeling there is some electrical discharge that is making it's way back to the controller causing it to suddenly stop.
Reply 5 years ago
I bought this from Ebay.
Name"16 Channel 5V Relay Module Board Optocoupler Power Supply Arduino ARM"
photos
Reply 5 years ago
Make sure that the controller has it's own power supply, the relay board has it's own power supply. Make sure to connect a ground wire from the Arduino negative to the relay board negative. If this doesn't solve the problem you might have to consider different relays (non machinical type) like a solid state. Like this one .https://www.sainsmart.com/products/8-channel-5v-solid-state-relay-module?utm_medium=cpc&utm_source=googlepla&variant=45099713876&gclid=CjwKCAiA07PRBRBJEiwAS20SIEW_PjDp_BpU45tOkjJ8uj_-61HejF4LMvHi-hC34_OueDK56FuD5BoClCoQAvD_BwE I have a feeling that the relay board being generic may not be suitable for the high voltage even though the relay it self is rated for that. I feel it could be voltage flyback in the circuit causing the Arduino freeze.
Reply 5 years ago
I already have separate Power Supplys for both, and common ground. i thing i need to try SSR.
i am try to make this for 2 years, but still its ...
by the way, thanks man.
Reply 5 years ago
problem video https://drive.google.com/file/d/0B5MrGrCGznlqWDJmV...
sketch https://imgur.com/nz4PF0O
and one thing, when I play the sequence without connecting 240v(no lights) its works for long time(full sq). but when I connect 240v its stop(freeze) shortly.
https://drive.google.com/open?id=1qgsb5qvakHzYCrUp...
watch this also
Reply 5 years ago
It looks like the setup is good. I had that same problem at one time. Try moving anything that could induce a electrical field by the USB cable. Like the light bulb(being florescent it produces electrical noise that can be induced into the USB wire) also any power supply like the wall worts. If the data to the Arduino gets interrupted it will just stop working till it's reset. You can also try a shorter USB cable or one with a ferrite bead on it. This can also help with electrical noise. Use my username at Hotmail to contact.
Reply 5 years ago
i already tried the short cable. but not works.
https://drive.google.com/file/d/1qgsb5qvakHzYCrUpE...
watch this video, everything perfectly works without 240v connection.
the error comes when i connect the 240v (lights).
5 years ago
I used this tutorial to create a dancing water fountain. Not quite finished yet, but working well!
Thanks!!
Reply 5 years ago
Thank you for the post. The fountain looks great!
Reply 5 years ago
I have since edited the code to contain the script within the arduino only, cutting out the PC.
Works perfectly
Reply 3 years ago
could you please share how you achieved that?
Question 4 years ago
You have no idea how much this instructable has helped! I have spent the past 4 weeks reading so many forums to try and get some answers and this is the only one that seems to make sense. I was able to get this working with Vixen 3 in a couple of minutes. No issues at all. The problem I then ran into is that the Arduino Uno is limited to only 6 PWM ports and I need to control 10 RGB LED lights which requires 30 PWM pins. First I was just going to use 5 different nanos (2 RGBs per nano) but then realized that Vixen limits you to 3 comm ports so that's not feasible. I am now trying to cover all 10 RGB LED's with one Nano and connect 2 PCA9685 16-Channel Servo Drivers which would give me enough PWM ports to cover the 10 LED's. I cant figure out how to code it though. Does anyone know how to adapt this code to account for the 2 breakout boards attached to the Uno? I know it requires the Adafruit PWM library as well as the wire library but I am lost when it comes to understanding how to combine that with this. I have asked for help on other forums as well but haven't had any luck.