Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 36

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

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

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

    Quote Originally Posted by darko886 View Post
    I actually only have 16 channels, I accidentally posted to original code prior to me changing it to 16. Should I still adjust the baud rate?
    That number of channels give 60HZ, which wouldn't be a rapid flicker. But you may try it.

    The testing of the Arduino & SSR can be done by using a "power-on" test that cycles through each channel for say 1/2 a second before it gets to start the Vixen reading stuff. The sketch (i.e. http://doityourselfchristmas.com/for...om-mode/page23 ) in post #1 uses a "test sequence" for this purpose.
    If it still flickers then it is puzzling. I haven't experienced this phenomenon.

    Are you sending a Vixen sequence of 52 channels?
    Last edited by LightUp; 11-30-2017 at 03:15 PM.

  2. #22
    Join Date
    Nov 2017
    Posts
    39
    Post Thanks / Like

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

    Quote Originally Posted by LightUp View Post
    That number of channels give 60HZ, which wouldn't be a rapid flicker. But you may try it.

    The testing of the Arduino & SSR can be done by using a "power-on" test that cycles through each channel for say 1/2 a second before it gets to start the Vixen reading stuff. If it still flickers then it is puzzling. I haven't experienced this phenomenon.
    Pardon my ignorance but do you have an example of a power on test I could use? When I get home I will take pictures of my setup and video of the flicker so you see exactly what it's doing.

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

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

    Yes, I had edited my previous reply while not realizing you sent your reply.

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

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

    Quote Originally Posted by LightUp View Post
    Yes, I had edited my previous reply while not realizing you sent your reply.
    Awesome, thank you so much for that. With regards to what I'm sending from Vixen, I pretty much set up a test sequence where I had each channel turn on and off for a second, and then do the same to the next.

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

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

    Quote Originally Posted by darko886 View Post
    Awesome, thank you so much for that. With regards to what I'm sending from Vixen, I pretty much set up a test sequence where I had each channel turn on and off for a second, and then do the same to the next.
    I was wondering if you were sending 52 vixen channels but reading 16 in the Arduino sketch. If so, then Vixen's 52 channels of data would possibly cause a flicker at 9600 baud.

  6. #26
    Join Date
    Nov 2017
    Posts
    39
    Post Thanks / Like

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

    Quote Originally Posted by LightUp View Post
    I was wondering if you were sending 52 vixen channels but reading 16 in the Arduino sketch. If so, then Vixen's 52 channels of data would possibly cause a flicker at 9600 baud.
    Unfortunately no, I have only 16 channels in Vixen as well. Do you think the Vixen version would matter as well? I have the newest version. I'll be home in a few hours and I'll try some of your suggestions and let you know if any work.

  7. #27
    Join Date
    Nov 2009
    Location
    Morrisburg, On, Canada
    Posts
    2,540
    Post Thanks / Like

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

    No, I don't believe it is a Vixen version problem. I don't recall anyone having this issue in recent months. There have been people who claimed flicker with LEDs but they used "snubber", which in this case is a 47K 1/2 watt resistor across the SSR output where your lights connect to. But only some people had this experience.

    Since you say that your SSR indicator LED also flickers, it makes me think that the problem is more associated with your Arduino - SSR interface. Hence a "test sequence", just using an Arduino sketch without using Vixen, may help to track it down.

  8. #28
    Join Date
    Dec 2014
    Location
    Southern California
    Posts
    800
    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 code uses AnalogWrite to write to all of the used pins. If you are using pins other than PWM (analog), the code won't work properly. Considering that you are using Sainsmart SSRs, they probably do not support dimming, so the analogWrite won't matter anyway. I suggest using the Victor_PV sketch found here - http://doityourselfchristmas.com/for...th-Random-mode
    Victors code also has a Self-Test feature that will light the channels one at a time in order, so you can see if the MEGA/SSR is wired correctly without using Vixen.
    Kevin

    2017 - Pi3 w/FPP controlling 8 ESPixelsticks driving 1250pixels and 3 Arduino MEGAS communicating with ESP-01s driving 96 channels
    2016 - 184 channels of Blinking/Flashing using 4 Arduino MEGAs and cheap home-made props.

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

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

    That's good point kev, as I was just looking at the code again and noticed that too.
    The other thing about our usual "recommendation sketch" you have pointed to is to remember is to use the header "~!" (without the quotes) in Vixen Generic Serial setup.

    Edit:
    I tried a crude sketch to use the analoWrite and it did give a sort of a flicker. I used LEDs as I don't have the SSR board. I also didn't use Vixen, but a stand-alone sketch using 8 LEDs.
    Last edited by LightUp; 11-30-2017 at 05:06 PM.

  10. #30
    Join Date
    Nov 2017
    Posts
    39
    Post Thanks / Like

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

    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.

Page 3 of 4 FirstFirst 1234 LastLast

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
  •