Page 4 of 4 FirstFirst ... 234
Results 31 to 36 of 36

Thread: Mega 2560 and Vixen 2.1 SSR relays flicker when vixen runs

  1. #31
    Join Date
    Nov 2009
    Location
    Morrisburg, On, Canada
    Posts
    2,471
    Post Thanks / Like

    Default Re: Mega 2560 and Vixen 2.1 SSR relays flicker when vixen runs

    Quote Originally Posted by darko886 View Post
    Thank you all for the help! LightUp, you solved it sir. I went back and checked my Vixen setup and I had 16 elements listed, but sure enough I had 48 channels listed for my controller. Changed that to 16 and no more flickering! Thank you so much, I would have never guessed that.
    Glad you solved it. Yep... it's hard to troubleshoot remotely, without being able to look over your shoulders to see what you actually did.

  2. #32
    Join Date
    Oct 2014
    Location
    Sauk City, WI USA
    Posts
    738
    Post Thanks / Like

    Default Re: Mega 2560 and Vixen 2.1 SSR relays flicker when vixen runs

    Quote Originally Posted by darko886 View Post
    Code:
    #define MEGA_VIXEN
    //#define UNO_VIXEN
    
    #ifdef MEGA_VIXEN
      #define MAX_CHANNELS 52
      int channels[MAX_CHANNELS] = {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53};
    #endif
    
    #ifdef UNO_VIXEN
      #define MAX_CHANNELS 18
      int channels[MAX_CHANNELS] = {2,3,4,5,6,7,8,9,10,11,12,13,A0,A1,A2,A3,A4,A5};
    #endif
    
    int incomingByte[MAX_CHANNELS];
    
    void setup()
    {
      int i;
      
      Serial.begin(9600); // set up Serial at 9600 bps
    
      for ( i = 0; i < MAX_CHANNELS; i ++ )  pinMode(channels[i], OUTPUT);
    }
    
    void loop()
    {
      int i;
      
      if (Serial.available() >= MAX_CHANNELS)
      {
        for (i=0; i < MAX_CHANNELS; i ++)      incomingByte[i] = Serial.read();
      }
    
      for (i = 0; i < MAX_CHANNELS; i ++ )    analogWrite(channels[i], incomingByte[i]);
    }
    That is the code I'm using. If I remember correctly, the baud is 9600. I did plug the -DC into the GND.

    I'm also trying to figure out if it's Vixen or the Arduino & SSR that are causing the issue. Is there a way to test the Arduino & SSR without Vixen?
    this is the "easiest" sketch and one of the worst for syncing lights.
    just a guess on my part. you have zero cross ssr and are trying to pwm without a zero cross detection circuit. recipe for disaster.

  3. #33
    Join Date
    Nov 2009
    Location
    Morrisburg, On, Canada
    Posts
    2,471
    Post Thanks / Like

    Default Re: Mega 2560 and Vixen 2.1 SSR relays flicker when vixen runs

    Quote Originally Posted by MikeKrebs View Post
    this is the "easiest" sketch and one of the worst for syncing lights.
    just a guess on my part. you have zero cross ssr and are trying to pwm without a zero cross detection circuit. recipe for disaster.
    This is how many get started without knowing the pitfalls. In their excitement they can overlook some issues they don't understand, but are willing to give it a go. Very few seem to research it to any real depth before they make the plunge. But, we are here to help, right?

  4. #34
    Join Date
    Nov 2017
    Posts
    39
    Post Thanks / Like

    Default Re: Mega 2560 and Vixen 2.1 SSR relays flicker when vixen runs

    So the consensus here is that the victor sketch is better and will still work for me?

  5. #35
    Join Date
    Nov 2009
    Location
    Morrisburg, On, Canada
    Posts
    2,471
    Post Thanks / Like

    Default Re: Mega 2560 and Vixen 2.1 SSR relays flicker when vixen runs

    Quote Originally Posted by darko886 View Post
    So the consensus here is that the victor sketch is better and will still work for me?
    Some years ago, many new to the lighting scene, had issues with serial ports, baudrate, channel counts, inverted logic, and Vixen interface problems. We saw repeat beginner problems and many had different sketches they found on the web that they wanted us to modify for them. It was thought that most problems would resolve themselves if all the beginners would start with the same sketch. Victor took it upon himself to do that so most could get started with a sketch that included all the basic items needed for these various relay and SSR products in one sketch. This minimized us having to constantly modify sketches to suit various needs. It was not designed for pixels. Yet some wanted both relays and pixels with one Arduino and so there are a few sketches here that do that, but it was not done by victor.


    If you use Vixen, relays and zero-cross SSRs then victor's sketch will work for you.

  6. #36
    Join Date
    Nov 2016
    Posts
    11
    Post Thanks / Like

    Red face Re: Mega 2560 and Vixen 2.1 SSR relays flicker when vixen runs

    Quote Originally Posted by LightUp View Post
    Some years ago, many new to the lighting scene, had issues with serial ports, baudrate, channel counts, inverted logic, and Vixen interface problems. We saw repeat beginner problems and many had different sketches they found on the web that they wanted us to modify for them. It was thought that most problems would resolve themselves if all the beginners would start with the same sketch. Victor took it upon himself to do that so most could get started with a sketch that included all the basic items needed for these various relay and SSR products in one sketch. This minimized us having to constantly modify sketches to suit various needs. It was not designed for pixels. Yet some wanted both relays and pixels with one Arduino and so there are a few sketches here that do that, but it was not done by victor.


    If you use Vixen, relays and zero-cross SSRs then victor's sketch will work for you.
    yeah thanks, Victors did not work for mine at all. I went back to the original i had and now it seems to work the way it should, no issues. so there must have been something i had copied wrong, anyway it works perfect now, i just wanted basic functions of on and off and maybe some dimming all works.

    here is the working code:
    #define MEGA_VIXEN
    //#define UNO_VIXEN

    #ifdef MEGA_VIXEN
    #define MAX_CHANNELS 48
    int channels[MAX_CHANNELS] = {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,22,23,24, 25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41 ,42,43,44,45,46,47,48,49,50,51,52,53};
    #endif

    #ifdef UNO_VIXEN
    #define MAX_CHANNELS 18
    int channels[MAX_CHANNELS] = {2,3,4,5,6,7,8,9,10,11,12,13,A0,A1,A2,A3,A4,A5};
    #endif

    int incomingByte[MAX_CHANNELS];

    void setup()
    {
    int i;

    Serial.begin(9600); // set up Serial at 9600 bps

    for ( i = 0; i < MAX_CHANNELS; i ++ ) pinMode(channels[i], OUTPUT);
    }

    void loop()
    {
    int i;

    if (Serial.available() >= MAX_CHANNELS)
    {
    for (i=0; i < MAX_CHANNELS; i ++) incomingByte[i] = Serial.read();
    }

    for (i = 0; i < MAX_CHANNELS; i ++ ) analogWrite(channels[i], incomingByte[i]);
    }

    so far it works....

Page 4 of 4 FirstFirst ... 234

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
  •