Results 1 to 9 of 9

Thread: LED "flutter"

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

    Default LED "flutter"

    I'm running 16 channels on an Arduino Mega, windows 10. I have LED lights along the eave of my house. They light up according to the music/light sequence I wrote, but instead of a calming, constant glow, the LED's flicker like a Vegas casino sign. I suspect it is 60 Htz from the circuit board or the Arduino. Is there a way to smooth this out?

  2. #2
    Join Date
    Dec 2012
    Location
    Hudson MA
    Posts
    3,181
    Post Thanks / Like

    Default Re: LED "flutter"

    What type of SSR are you using?
    Are you trying to dim?
    Do you have a proper zero cross input to the arduino and have you tied it into your code?
    Do you have enough load to keep the SSR triggered?


    2018 - Moving and going to visit my Daughter in New Zealand. Most likely I will be dark or nearly dark, Some static stuff that is simple to put up.

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

    Default Re: LED "flutter"

    Tell me bout zero cross over. It looks like its a 110 V AC power input circuit and a corresponding Arduino code alteration. Is that close to corrct. If so, where do I get the circuit?

  4. #4
    Join Date
    Jan 2016
    Location
    Ashburn, VA
    Posts
    302
    Post Thanks / Like

    Default Re: LED "flutter"

    It may be even more basic.

    It sounds like you are using AC powered LED strings.

    Cheap LED strings powered by AC are not "on" all the time. Because there have the cheapest electronic driver the manufacturer can get away with, the LED's flicker at the frequency of the AC circuit (60Hz in the US) . To see what I mean, take a handful into a darkened room plug them into the wall then shake them back and forth very rapidly. You will see that the LED are not glowing all the time. When they are not moving, Persistence Of Vision allows us to see them as constant.

    Expensive LED strings use more complex drivers to reduce the flicker.

    When controlling, especially dimming, AC powered LED strings, there are a number of odd effects that can be observed.

    The question about zero crossing is important in dimming AC circuits. There is a lot written about it already.

  5. #5
    Join Date
    Dec 2012
    Location
    Hudson MA
    Posts
    3,181
    Post Thanks / Like

    Default Re: LED "flutter"

    Quote Originally Posted by empac99 View Post
    Tell me bout zero cross over. It looks like its a 110 V AC power input circuit and a corresponding Arduino code alteration. Is that close to corrct. If so, where do I get the circuit?
    The Zero crossing detection circuit is used to tell the software when the AC (any AC) signal is close to the point at which it is zero volts. This allows the software to determine how long to delay before turning the AC output on. The longer the delay, the dimmer the resulting light output. Keep in mind that the SSR turns itself off as it nears the zero volt point. The software only has to turn the output on until just before the ZC point. This means the software needs to have an accurate time source and the ZC circuit to keep the SW in sync with the AC line.


    2018 - Moving and going to visit my Daughter in New Zealand. Most likely I will be dark or nearly dark, Some static stuff that is simple to put up.

  6. #6
    Join Date
    Dec 2014
    Location
    Southern California
    Posts
    744
    Post Thanks / Like

    Default Re: LED "flutter"

    what sketch are you using? you could be losing synchronization of the data stream. I use cheap led strings and don't notice flickering until I dim them a lot. As Martin asked, what SSR are you using?
    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.

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

    Default Re: LED "flutter"

    I'm running 2 Sainsmart 8 channel SSR's. I don't see other distinguishing markings on them. I have 3 strings of GE StayBright 216-Count 19.6-ft Multicolor Integrated LED Plug-In Christmas Rope Lights. These are mount-and-leave "tape" lights.

    Sketch as follows:
    #define MEGA_VIXEN
    //#define UNO_VIXEN

    #ifdef MEGA_VIXEN
    #define MAX_CHANNELS 16
    int channels[MAX_CHANNELS] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18};
    #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]);

  8. #8
    Join Date
    Nov 2018
    Posts
    10
    Post Thanks / Like

    Default Re: LED "flutter"

    I also have four 8" stars with incandescent mini bulbs, 8 candelarias, each with a C7 incandescent bulb. Finally there is a small LED flood light that lights up my Mr. Grinch at the appropriate parts of his theme song. All sequences are run on Vixen 3.5u3

  9. #9
    Join Date
    Dec 2014
    Location
    Southern California
    Posts
    744
    Post Thanks / Like

    Default Re: LED "flutter"

    Try changing analogWrite to digitalWrite and add a section of code to turn off (low) or on (high).

    instead of this -
    for (i = 0; i < MAX_CHANNELS; i ++ ) analogWrite(channels[i], incomingByte[i]);

    Try this -
    for (i = 0; i < MAX_CHANNELS; i ++ )
    if (incomingByte[i] < 127) {
    digitalWrite(channels[i], HIGH);
    }
    else {
    digitalWrite(channels[i], LOW);
    }

    Also, this sketch does not have a means to synchronize the data. Some sketches look for a header or footer and sync off of those.
    Last edited by kev; Yesterday at 11:49 AM.
    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.

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
  •