Announcement

Collapse
No announcement yet.

Upgraded - issues with flickering PWM, and auto connecting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Upgraded - issues with flickering PWM, and auto connecting

    I last upgraded the plugin and sketches about 2 years ago.

    Just upgraded to current beta plugin and sketches.

    PWM was working fine before with fade in and out, but was a relatively low PWM rate.

    Now, the lights are flickering every couple of seconds (irregular intervals) up to 100% then 0% quickly before returning to a set level. THe effect is like when a florescent light is flicking on and off. What should I check? Would this be because I've got old devices in Homeseer, do they need to be upgraded?

    Also If the Arduino loses network connection for a while, then it returns, the plugin does not auto connect. I have to click connect, and sometimes even that does not work, I have to restart HS3 for connection to restart.

    I am using genuine Arduino Uno + genuine Ethernet shield, and also a genuine Arduino Ethernet. Auto connect is ticked on board setup.

    Is this expected behaviour?

    Cheers

    #2
    Anyone seen flickering with the PWM outputs? Cheers.

    Comment


      #3
      Fluorescent lights can't be dimmed. That's probably why you see this issue. I have LED strip lights for my closets that go up the sides and along to top of the door. There was some pretty bad flickering. This actually comes from the library that the Arduino plugin is using. Here are my personal notes how I fixed the issue:

      By default the LEDs will flicker. To remove the flicker modify the C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp file as follows:
      Replace
      #define SOFTPWM_FREQ 60UL with
      #define SOFTPWM_FREQ 100UL.
      So this worked if my fade in/out time was less than about 2100 but above that the light would turn on/off instantly. It turns out that when increasing the frequency the step size increase became 0 when in fact it shouldn't be less than 1. So in the function SoftPWMSetFadeTime replace
      fadeAmount = 255UL * (SOFTPWM_OCR * 256UL / (F_CPU / 8000UL)) / fadeUpTime;
      with
      fadeAmount = 255UL * (SOFTPWM_OCR * 256UL / (F_CPU / 8000UL)) / fadeUpTime;
      if (fadeAmount <= 0)
      {
      fadeAmount = 1;
      }
      Note, there are two places in this function where this needs to be done. Once for the fade-in time and once for the fade-out time.

      Comment


        #4
        Coming back to this.

        Here's a video of the flickering on the LED lights. They flicker randomly during fade up, constant level, full on, and fade down. They worked fine on a previous version of the plugin from a couple of years ago. Anyone any ideas?

        Fade up time is set to around 1300ms

        https://youtu.be/ceFEJa-seso

        Cheers,

        Comment


          #5
          Anyone?

          Comment


            #6
            it have to come from the arduino side .

            What was the plugin version you were using before ?

            Comment

            Working...
            X