Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Do we need 100 channels for 100 ws2812b pixel icicles strands.

  1. #11
    Join Date
    Jan 2016
    Location
    Lizella, GA
    Posts
    838
    Post Thanks / Like

    Default Re: Do we need 100 channels for 100 ws2812b pixel icicles strands.

    Were you planning on connecting the Pixels to the Relays? Because that won't work, they are not AC lights and require a data stream sent down the string to tell each LED what to do.
    Matt 2016, 1st Show

  2. #12
    Join Date
    Nov 2017
    Posts
    13
    Post Thanks / Like

    Default Re: Do we need 100 channels for 100 ws2812b pixel icicles strands.

    I am having dedicated Uno for megatree and pixel will that work.

  3. #13
    Join Date
    Nov 2017
    Posts
    13
    Post Thanks / Like

    Default Re: Do we need 100 channels for 100 ws2812b pixel icicles strands.

    Quote Originally Posted by Ruppro View Post
    Were you planning on connecting the Pixels to the Relays? Because that won't work, they are not AC lights and require a data stream sent down the string to tell each LED what to do.
    Pixel directly from datapin of Uno to pixel with separate power supply and relay only for ac lights.

    This is what I tried for AC relay dedicated Uno.

    http://kbarre123.github.io/blog/2015...rry-christmas/

  4. #14
    Join Date
    Nov 2011
    Location
    Chicago - Southwest Suburbs
    Posts
    6,666
    Post Thanks / Like

    Default Re: Do we need 100 channels for 100 ws2812b pixel icicles strands.

    Quote Originally Posted by SJBosco View Post
    I have a new issue I am using one of the simple sketches provided in this forum.

    The moment I open Vixen all 8 led lights on relay goes ON permanently. However when I run a test from the sketch it works fine when not connected to VIXEN. Tried the solution of inverting but of no help.

    I want to connect 16 ch or 2 8ch relay to control from vixen. Wondering if my sketch is wrong.
    It sounds like your outputs are inverted. Off is on and on is off. You probably want to invert your outputs in the sketch.


    Sent from my iPhone using Tapatalk

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

    Default Re: Do we need 100 channels for 100 ws2812b pixel icicles strands.

    I am not sure if my questioning for the problem is right.

    Let me try to put it up again

    1x Arduino UNO + 1x 8 ch relay to control all AC lightings

    Currently the issue is the sketch in the above link is used for trial. Vixen simple sequence with 8 AC lights with 8 ch set in Vixen3.

    I connect then UNO usb to laptop it's all fine. The moment I open the vixen applicarion relay lights are always on. The relay is powered from UNo not using external power supply for relay.

    Once i sort this issue I want to be able to connect pixel tree to the same Uno if thats possible which I am sure it is seeing many posts on this forum.

    For icicles may be I can use a dedicated Uno if hardware is constraint or buy a new one which can support all these in one for vixen sequencing.

    Looks like I haven't been able to crack a single step yet to move forward. This is the first time I have ever done this.

    I am breaking my head to crack this.

  6. #16
    Join Date
    Nov 2017
    Posts
    13
    Post Thanks / Like

    Default Re: Do we need 100 channels for 100 ws2812b pixel icicles strands.

    Quote Originally Posted by jchuchla View Post
    It sounds like your outputs are inverted. Off is on and on is off. You probably want to invert your outputs in the sketch.


    Sent from my iPhone using Tapatalk
    I did see one of your comments for then same issue and tried with headers and invert but not successful. Let me post video and sketch that I tried. May be that will reduce my unnecessary posting.

  7. #17
    Join Date
    Nov 2017
    Posts
    13
    Post Thanks / Like

    Default Re: Do we need 100 channels for 100 ws2812b pixel icicles strands.

    So Below is the UNO and Relay Pic. The moment I upload this sketch to UNO all relay lights are on.

    https://drive.google.com/open?id=0B3...1lUExjOEpGQjNV


    Code:
    // Define pins on Arduino that will control the relay.
    #define CHANNEL_01 2
    #define CHANNEL_02 3
    #define CHANNEL_03 4
    #define CHANNEL_04 5
    #define CHANNEL_05 6
    #define CHANNEL_06 7
    #define CHANNEL_07 8
    #define CHANNEL_08 9
    
    // Define size of array to hold channels
    #define CHANNEL_COUNT 8
    
    // Define array to hold channels
    int channels[] =
    {
      CHANNEL_01, CHANNEL_02, CHANNEL_03, CHANNEL_04, CHANNEL_05, CHANNEL_06, CHANNEL_07, CHANNEL_08
    };
    
    // Define array to hold incoming data stream from Vixen
    int incomingByte[CHANNEL_COUNT];
    
    // Define baud rate. This figure must match that of your profile configuration in Vixen!
    #define BAUD_RATE 57600
    
    void setup()
    {
      // Begin serial communication
      Serial.begin(BAUD_RATE);
    
      // Set up each channel as an output
      for (int i = 0; i < CHANNEL_COUNT; i++)
      {
        pinMode(channels[i], OUTPUT);
      }
    }
    
    void loop()
    {
      if (Serial.available() >= CHANNEL_COUNT)
      {
        // Read data from Vixen, store in array
        for (int i = 0; i < CHANNEL_COUNT; i++)
        {
          incomingByte[i] = Serial.read();
        }
        // Write data from array to a pin on Arduino
        for (int i = 0; i < CHANNEL_COUNT; i++)
        {
          digitalWrite(channels[i], incomingByte[i]);
        }
      }
    }
    Last edited by SJBosco; 11-15-2017 at 12:20 AM. Reason: Missed the issue

  8. #18
    Join Date
    Nov 2017
    Posts
    13
    Post Thanks / Like

    Default Re: Do we need 100 channels for 100 ws2812b pixel icicles strands.

    I uploaded this sketch to UNO. But when I run the Sequence not relays ch are triggered. But Rx keeps blinking. Please help

    Code:
    // Copy from this line down to your new sketch
    // This code was written by Victor Perez for doityourselfchristmas.com based on the code from Zparticle, Si_champion and Neil Tapp.
    // To adapt the code to your case, just change this top section, with the #define lines.
    // how many channels will vixen be sending. Can be set to any number from 1 to 48 for Arduino Mega, and 1 to 18 for Arduino Uno.
    
    #define CHANNEL_COUNT 8
    
    // speed for the com port for talking with vixen. From 9600 to 115200. Use the same speed as set in Vixen.
    #define VIXEN_COM_SPEED 57600
    
    // Timeout waiting for serial input before going to random mode (in milliseconds).
    #define TIME_OUT 200
    
    // If the relays turn On and Off opposite to Vixen sequence, change "#define MODE NOT_INVERTED" for "#define MODE INVERTED"
    #define NOT_INVERTED 1
    #define INVERTED 0
    #define MODE NOT_INVERTED
    
    // which pins control which channels
    // You can change these assignment to use different pins, but be very careful to not repeat the same pin number for 2 channels. 
    // which pins control which channels
    #define CHANNEL01 2
    #define CHANNEL02 3
    #define CHANNEL03 4
    #define CHANNEL04 5
    #define CHANNEL05 6
    #define CHANNEL06 7
    #define CHANNEL07 8
    #define CHANNEL08 9
    #define CHANNEL09 45
    #define CHANNEL10 44
    #define CHANNEL11 43
    #define CHANNEL12 42
    #define CHANNEL13 41
    #define CHANNEL14 40
    #define CHANNEL15 39
    #define CHANNEL16 38
    #define CHANNEL17 29
    #define CHANNEL18 28
    #define CHANNEL19 27
    #define CHANNEL20 26
    #define CHANNEL21 25
    #define CHANNEL22 24
    #define CHANNEL23 23
    #define CHANNEL24 22
    
    int channels[] = { CHANNEL01, CHANNEL02, CHANNEL03, CHANNEL04, CHANNEL05,
        CHANNEL06, CHANNEL07, CHANNEL08, CHANNEL09,
        CHANNEL10, CHANNEL11, CHANNEL12, CHANNEL13, CHANNEL14, CHANNEL15,
        CHANNEL16, CHANNEL17, CHANNEL18, CHANNEL19, CHANNEL20,
        CHANNEL21, CHANNEL22, CHANNEL23, CHANNEL24 };
    
    int incomingByte[CHANNEL_COUNT];
    
    int i = 0;     // Loop counter
    
    volatile unsigned long timer_a = 0; // new line
    
    //setup the pins/ inputs & outputs
    void setup() {
    
      // specifically for the UNO
      sei();  
    
    // initalize PWM Channels / Pins
      for (i = 0; i < CHANNEL_COUNT; i++) {
        pinMode(channels[i], OUTPUT);
      }
    
    // set all the relays to off to start with
      if (MODE == NOT_INVERTED) {
        for (i = 0; i < CHANNEL_COUNT; i++) {
          digitalWrite(channels[i], LOW);
    
        }
      }
    
      else {
        for (i = 0; i < CHANNEL_COUNT; i++) {
          digitalWrite(channels[i], HIGH);
        }
      }
    
      testSequence();
    
    // set up Serial according to the speed defined above.
      Serial.begin(VIXEN_COM_SPEED);
    }
    
    void loop() {
      if (Serial.available() >= (CHANNEL_COUNT + 2)) {
        timer_a = millis(); // new line
        int uno = Serial.read();
        if (uno == 126) {
    
          int dos = Serial.read();
          if (dos == 33) {
    
            for (i = 0; i < CHANNEL_COUNT; i++) {
              // read each byte
              incomingByte[i] = Serial.read();
            }
            if (MODE == NOT_INVERTED) {
              for (i = 0; i < CHANNEL_COUNT; i++) {
                int value = incomingByte[i];
                if (value <= 127) {
                  digitalWrite(channels[i], LOW);
                } else {
                  digitalWrite(channels[i], HIGH);
                }
              }
            } else {
              for (i = 0; i < CHANNEL_COUNT; i++) {
                int value = incomingByte[i];
                if (value <= 127) {
                  digitalWrite(channels[i], HIGH);
                } else {
                  digitalWrite(channels[i], LOW);
                }
              }
            }
    
          }
        }
      }
    // Random mode code. Random mode starts if no serial input has been received in TIME_OUT millisenconds
      else {
      //turn them all on
            unsigned long diff = millis() - timer_a;
            if (diff >= TIME_OUT) {
             timer_a = millis ();
             turnLightsOn();
      }
    }
    }
    
    void testSequence() {
    
      if (MODE == NOT_INVERTED) {
        for (i = 0; i < CHANNEL_COUNT; i++) {
          digitalWrite(channels[i], HIGH);
          delay(500);
          digitalWrite(channels[i], LOW);
          
        }
      }
    
      else {
        for (i = 0; i < CHANNEL_COUNT; i++) {
          digitalWrite(channels[i], LOW);
          delay(500);
          digitalWrite(channels[i], HIGH);
        }
      }
    }
    
    void turnLightsOn()
    {
      for (i = 0; i < CHANNEL_COUNT; i++) {
      digitalWrite(channels[i], HIGH);
      }
    }

  9. #19
    Join Date
    Nov 2009
    Location
    Morrisburg, On, Canada
    Posts
    2,398
    Post Thanks / Like

    Default Re: Do we need 100 channels for 100 ws2812b pixel icicles strands.

    For which sketch do you want assistance?

    Your last posted sketch requires the header ~! in case you forgot. Without this header it won't do anything until it detects these two characters.
    It is prudent to first get the relay lights working as per "Test Sequence", then deal with the Vixen part.
    Let us know how you are making out.

  10. #20
    Join Date
    Nov 2017
    Posts
    13
    Post Thanks / Like

    Default Re: Do we need 100 channels for 100 ws2812b pixel icicles strands.

    Quote Originally Posted by LightUp View Post
    For which sketch do you want assistance?

    Your last posted sketch requires the header ~! in case you forgot. Without this header it won't do anything until it detects these two characters.
    It is prudent to first get the relay lights working as per "Test Sequence", then deal with the Vixen part.
    Let us know how you are making out.
    LightUp - Got I working exchanged the relay and now I can get the relay control working as expected. Now if you could help me get Relay code and ws2811 strings code to work in conjunction will be helpful.

Page 2 of 3 FirstFirst 123 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
  •