Post Go back to editing

ADP8866 - change brightness level of BL during fade-out transition

Dears,

I am implementing kind of "watch dog" for end user - I want LEDs used as UI to turn off autonomously when device hangs.
The idea is: use backlight option for all LEDs (8 pieces), set LEDs to maximum brightness (with fade-in time 0s) and immediately set brightness level it to minimum with fade-out time set to 1.75s. After short period of time (not yet defined), repeat both steps (set to max, followed by set to min, followed by short delay). So it will be like kicking this kind of watch dog. If not kicked, all LEDs will go off on their own indicating user that device hanged.

Unfortunately it seems that the brightness level cannot be changed during transition time defined by fade-out. Can you please confirm that this is behavior of ADP8866?

Regards

Jiří

PS: I am aware that if device will hang in the period of "max" - "min" setting, it will not work as I need (LEDs may stay on if device will hang).

Parents
  • Hi,

    Yes, it is not possible to change the sink current during fade-out time and it will always be 0mA after the fade-out.

    You can achieve your idea by means of changing the BLMX Register after fade-in time to the desired minimum current. The ramp-down of the current from max to minimum is the same as the fade-out. Therefore, the desired "fade-out time" will always be less than 1.75s and it is proportional to the difference of your max and min current. Same goes with min to max current (slope of fade-in time is applied here).

    You can verify this by looking at the Figure 33 on the datasheet.

    Regards,

    Dave

  • Hi Dave,

    sorry for my late response. Thanks for your hint, it is working! Unfortunately not as expected or needed.

    When I turn on all LEDs (8) configured as BL and immediately (from my perspective) turn off all LEDs, the behavior is unexpected - LEDs are randomly turning off in some random pattern like animation. I have to add small delay (20ms) to get desired behavior.

    But because I also need to set time during that is brightness autonomously going down (also 20ms), I am covering only about 50% of run time with my "watchdog".

    for (;;)
    {
        setLedsWithFadeOut(CONFIG_LEDS_BRIGHTNESS_MAX);
        usleep(20000);
        setLedsWithFadeOut(CONFIG_LEDS_BRIGHTNESS_MIN);
        usleep(20000);
    }

    I have also double chekced I2C communication and it was not disturbed. It must be limitation of ADP8866.

    I will think about another option.

Reply
  • Hi Dave,

    sorry for my late response. Thanks for your hint, it is working! Unfortunately not as expected or needed.

    When I turn on all LEDs (8) configured as BL and immediately (from my perspective) turn off all LEDs, the behavior is unexpected - LEDs are randomly turning off in some random pattern like animation. I have to add small delay (20ms) to get desired behavior.

    But because I also need to set time during that is brightness autonomously going down (also 20ms), I am covering only about 50% of run time with my "watchdog".

    for (;;)
    {
        setLedsWithFadeOut(CONFIG_LEDS_BRIGHTNESS_MAX);
        usleep(20000);
        setLedsWithFadeOut(CONFIG_LEDS_BRIGHTNESS_MIN);
        usleep(20000);
    }

    I have also double chekced I2C communication and it was not disturbed. It must be limitation of ADP8866.

    I will think about another option.

Children
No Data