Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Arduino + Vixen + Xbee + RGB LED

  1. #1
    Join Date
    Nov 2018
    Posts
    15
    Post Thanks / Like

    Default Arduino + Vixen + Xbee + RGB LED

    Hello all! I am new to the forum and am out of hair to lose in my quest for answers/solutions. After hesitating to post for the longest time for the fear of sounding stupid, I am finally giving in and hoping someone can provide some assistance here. I may have bitten off more than I can chew with the project I am working on but I am too far invested to quit. I apologize in advance for this long post and I know that I tend to ramble but hopefully someone will have some patience to read this and offer some assistance. I will try my best to explain my situation....

    Im using Vixen to schedule/run an LED light show to music. I have the following LED's:

    >2x 100watt LED COB (SINGLE COLOR)
    >12x 10w LED's
    >10x 100w RGB LED COB
    (This makes a total of 44 channels coming out of Vixen)
    >Side note, I eventually intend to expand this to also sequence 100+ additional channels but they wont need PWM so if I can figure out the problems below, I should be more than fine in taking what I learn from this to expand to as many channels as needed.


    I also have the following components to use
    :

    >Plenty of Arduino Megas, Nanos & Unos
    >As many Xbee's as needed (I have 3 right now but will get more if needed)
    >2 PCA9685 16 Channel 12 Bit PWM Servo Driver
    >1 3.0 USB 7 Port Splitter
    >single, double, and 16channel relays
    >2x XBEE Shields for Arduino Nanos
    >1x XBEE Shield for Arduino Uno
    >What seems like an endless supply of other accessories you could use for working with Arduinos that I have accumulated in trying to do this project
    >Basically, in summary, components or getting the pieces I need is not an issue because I refuse to quit and want to get this project up and running :-)


    I have been able to do the following successfully:

    >Get up to 3 Arduino boards connected to Vixen via USB Com port to run the lighting sequence for the 2 100w LED COBs (NON RGB) & the 12 10w LED's in addition to 2 of the RGB LED's. This was done setting up 3 controllers in Vixen and connecting each Arduino to its own USB port and then to their respective LED's.


    Where it all went downhill and where I am now stuck:

    >Trying to get the XBEE to connect to Vixen and send the commands remotely to the Arduinos in "the field" instead of connecting the arduinos directly to the USB Com Ports. The plan was to have 1 xbee connected to vixen and 1 Xbee in the field. The xbee in the field would recive the command lines from the XBEE at the computer and then communicate the lines of commands to all of the field units through one of the input pins. So in essence, 1 field xbee, would "Serial print" 44 channels of code to all of the field units at the same time and each field unit knows which of the 44 channels it should read and act on.
    >Trying to control the remaining 8 RGB LED's


    Problems/Issues:
    >If getting Vixen to communicate through XBEE to multiple field arduinos is beyond my intelligence then I will submit to giving up on the wireless part and hard wire the arduinos to the USB com ports if that is what needs to happen.
    >In order to do that though, I think I would need to have a total of 6 Arduinos connected (Since each Arduino only has 6 PWM ports which means each one can only control 2 RGB LED's and since I have 10, I would need 5 arduinos for those 10 lights alone) (Which would mean I'd set up 6 controllers in Vixen) But from what I am understanding, I can only control up to 3 of them from Vixen. Even if I use a USB Hub with 7 ports. (Is that correct?)
    >I thought that the Xbee would solve that issue because I could then set up only 1 controller in Vixen (that one controller being the XBEE) and if I just have that send out the 44 channels to the field units, I could have each field unit only act on certain channels (Sketch that I thought might work if I could get the XBEE part figured out is attached)
    >Then I thought well if I need to give up on the wireless AND I can't do more than 3 comm ports, maybe I could use two PCA9685 16 Channel 12 Bit PWM Servo Drivers so that I could control ALL 10 RGB LED's from only 2 Arduinos and the rest of the non-RGB LEDs could be controlled from the 3rd. But now that I am trying to understand how to use the 16 channel servo drivers, I am beyond confused and everything I am reading is becoming so confusing and I just cant comprehend it.


    Attached (in both .doc and PDF format):
    >Code for each of the field units that I thought would work if I was able to use the XBEE to send vixen commands to all of the field units
    >Code for the Xbees (The code I attached I know is wrong and does not work, I cant figure out how to code it)

    Last thing is, I sincerely appreciate anyone who takes the time to read this post and offer assistance. I promise that I have spent hours upon hours searching the internet and other threads to try and find my answer before posting (As I know that is a common complaint on threads). Looking forward to hearing your feedback/thoughts/suggestions.


    -Chris
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2009
    Location
    Plymouth, MN
    Posts
    9,014
    Post Thanks / Like

    Default Re: Arduino + Vixen + Xbee + RGB LED

    XBee usually connects to Vixen via serial connection, using an USB/XBee Explorer board. Sparkfun sells them for about $25: it's essentially an USB interface/power supply for the XBee. Then Vixen is set up to talk to it via a normal comm port, with normal baud rate settings. BTW, the fastest you'll be able to use the XBee is at 57600baud through its serial UART.

    I don't know how you'd make it work through an Arduino since the Arduino becomes interfaced to the PC via the USB connection.

    Here's a link to the SparkFun unit
    https://www.sparkfun.com/products/11812

    http://digwdf.com/store/
    The DIGWDF Store will be closing at the end of this year.
    While it's still open, please check us out for blinky-flashy gizmos that nobody else on the planet makes!

  3. #3
    Join Date
    Nov 2018
    Posts
    15
    Post Thanks / Like

    Default Re: Arduino + Vixen + Xbee + RGB LED

    Yes, I have one of those as well. I couldn't figure out how to test though if the Xbe was actually sending out the code that it was receiving from Vixen so I didn't know if it was even getting the data. I will try playing around with it some more tonight though. I had the XBee configured as a "Coordinator" in the Xbee settings, but maybe I need to set it up as a "Router"?

  4. #4
    Join Date
    Feb 2009
    Location
    Plymouth, MN
    Posts
    9,014
    Post Thanks / Like

    Default Re: Arduino + Vixen + Xbee + RGB LED

    If you're not setting up a mesh network, you don't need nor want a coordinator/router setup. Set them all up and "end points" and don't use destination addresses, either. You might take a look at the Ren-W information in the Wiki. There's a lot of information there about configuring and using Xbee radios.

    http://www.doityourselfchristmas.com...less_Converter

    http://digwdf.com/store/
    The DIGWDF Store will be closing at the end of this year.
    While it's still open, please check us out for blinky-flashy gizmos that nobody else on the planet makes!

  5. #5
    Join Date
    Nov 2018
    Posts
    15
    Post Thanks / Like

    Default Re: Arduino + Vixen + Xbee + RGB LED

    So before I go the route of DMX and Ren Controllers, I want to try using 2 PCA9685 16 Channel Servo controllers connected in serial to an Arduino Uno which if I understand correctly, it will give me enough additional PWM ports to cover the 10 RGB LED's. I have 2 of them coming in tomorrow and have been scouring the internet trying to figure out how to assemble the code. I cut and paste from different sketches I found online and hope that if what I put together is not correct, it is at least close. If anyone with more experience in this can take a look at the code below and let me know your thoughts/suggestions it would be greatly appreciated.

    #include <Wire.h>

    #include <Adafruit_PWMServoDriver.h>



    Adafruit_PWMServoDriver pwm1 = Adafruit_PWMServoDriver(0x40);

    Adafruit_PWMServoDriver pwm2 = Adafruit_PWMServoDriver(0x41);



    int i = 0;

    int incomingByte[30];



    void setup() {

    Serial.begin(9600);

    Wire.beginTransmission(0x40);

    Wire.beginTransmission(0x41);

    Wire.begin();



    pwm1.begin();

    pwm1.setPWMFreq(60);

    pwm2.begin();

    pwm2.setPWMFreq(60);



    }



    void loop()

    {

    if (Serial.available() >= 30)

    {

    for (int i=0; i<30;i++)

    {

    incomingByte[i] = Serial.read();

    }

    pwm1.setPWM(0,0,incomingByte[0]);

    pwm1.setPWM(1,0,incomingByte[1]);

    pwm1.setPWM(2,0,incomingByte[2]);

    pwm1.setPWM(3,0,incomingByte[3]);

    pwm1.setPWM(4,0,incomingByte[4]);

    pwm1.setPWM(5,0,incomingByte[5]);

    pwm1.setPWM(6,0,incomingByte[6]);

    pwm1.setPWM(7,0,incomingByte[7]);

    pwm1.setPWM(8,0,incomingByte[8]);

    pwm1.setPWM(9,0,incomingByte[9]);

    pwm1.setPWM(10,0,incomingByte[10]);

    pwm1.setPWM(11,0,incomingByte[11]);

    pwm1.setPWM(12,0,incomingByte[12]);

    pwm1.setPWM(13,0,incomingByte[13]);

    pwm1.setPWM(14,0,incomingByte[14]);

    pwm2.setPWM(0,0,incomingByte[15]);

    pwm2.setPWM(1,0,incomingByte[16]);

    pwm2.setPWM(2,0,incomingByte[17]);

    pwm2.setPWM(3,0,incomingByte[18]);

    pwm2.setPWM(4,0,incomingByte[19]);

    pwm2.setPWM(5,0,incomingByte[20]);

    pwm2.setPWM(6,0,incomingByte[22]);

    pwm2.setPWM(7,0,incomingByte[23]);

    pwm2.setPWM(8,0,incomingByte[24]);

    pwm2.setPWM(9,0,incomingByte[25]);

    pwm2.setPWM(10,0,incomingByte[26]);

    pwm2.setPWM(11,0,incomingByte[27]);

    pwm2.setPWM(12,0,incomingByte[28]);

    pwm2.setPWM(13,0,incomingByte[29]);

    pwm2.setPWM(14,0,incomingByte[30]);

    }}

  6. #6
    Join Date
    Nov 2018
    Posts
    15
    Post Thanks / Like

    Default Re: Arduino + Vixen + Xbee + RGB LED

    Update: 2 PCA9685's came in today. I hooked them up according to the Adafruit instructions. Ran my test code and nothing worked. Not one LED lit up. I again searched online for answers and got nothing. I have no hair left to pull out. This is very frustrating.

  7. #7
    Join Date
    Nov 2018
    Posts
    15
    Post Thanks / Like

    Default Re: Arduino + Vixen + Xbee + RGB LED

    I realize I'm having a conversation with myself at this point and now understand it is because most if not all of the people on this forum are in crunch mode for their XMAS displays haha. I have time until I need to get my project up and running so I will continue plugging away and trying to get this sorted out. I gave up on the PCA9685s for now as I found out that the Arduino Megas have 15 PWM ports each. (Not sure how I missed that in all of my searches). Anyways I got my prototype working and am going to start working on assembling the actual high powered devices. I may need to reach out to you all for help in getting it transitioned to wireless with XBEE but that can wait till after the holidays. I wish you all a Happy Holiday Season and best of luck with your displays. Looking forward to seeing some videos and pics of your work!!

  8. #8
    Join Date
    Feb 2018
    Location
    Ohio, USA
    Posts
    4
    Post Thanks / Like

    Default Re: Arduino + Vixen + Xbee + RGB LED

    so you are using Arduinos to run your display too. I am daisy chaining three Arduino Megas together each running 48 relays to run A/C & D/C Lighting, lip sync signs, fire flies and electronic fire works. I have the first bank working. Now just getting the other two finished to get ready to start setting up over thanks giving.

  9. #9
    Join Date
    Nov 2018
    Posts
    15
    Post Thanks / Like

    Default Re: Arduino + Vixen + Xbee + RGB LED

    Yes, my show planning actually started with my annual backyard fireworks display. I do one every year and each year it has gotten bigger. The past 2 years I switched to electronic igniters and build a push button ignition board but I always wanted to do it to music. So I was looking for a way to have them ignite on their own on a schedule. That is how I came into using Arduinos. I then picked the songs and realized that if I was going to have fireworks for the whole two songs I was going to need soo many and that would cost a fortune so I figured I would fill some of the space with light. The project has continued to grow and since I am new to arduino and all of this other stuff, there is definitely a bit of a learning curve. I got the light part down now but since I cant seem to figure out the PWN boards, im limited to the megas and with Vixen maxing out at 3 controllers, I only have 162 cues. 42 of them are already consumed with the lights alone. So I definitely need to eventually figure out how to daisy chain the arduinos or get the PCA9685's to work somehow. Little by little, I will get there. Just gotta keep working on it.

  10. #10
    Join Date
    Aug 2011
    Location
    Zephyrhills, FL
    Posts
    124
    Post Thanks / Like

    Default Re: Arduino + Vixen + Xbee + RGB LED

    I have a few xbees connected to renard plus controllers. I have all 3 xbee modules set to be identical in the xbee program and the range is pretty good. 1 is connected to the explorer board on a raspberry pi running falcon Christmas with the files from Vixen 3 and the other two connected to the controllers (not daisy chained). So both controllers listen to the same data string from the pi then the controllers chose the data they want to use to from the settings in the controller. For example I'm sending a string of data with 48 channels and both xbees see that full string, one controller is set for a start address of 1 so it grabs channels 1-24 the other controller is set for a start address of its either 3 or 4 but it grabs channels 25-48. It works flawlessly. Renard controllers have dc versions that may work for your needs.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •