How to control WS281x RGB LED strip?



  • Hi @Alexandr-Didenko, are you sure you have the latest omega2-ctrl? Your screendump looks like a version prior to April 2017, when @Lazar-Demin merged my patch fixing exactly those missing modes for the uart groups.

    Judging from the makefile in the Onion OpenWrt feed, any build of omega2-ctrl done since April 2017 would have pulled from the omega2-ctrl HEAD and thus included the patch.

    However, it seems that @onion might have forgotten to bump the package version back then, and if they never rebuilt the FW from scratch since, it might be that even recent FW builds still contain the pre-April 2017 version :-(

    Maybe just try to force-update it via opkg:

    opkg update
    opkg --force-reinstall omega2-ctrl
    

    The April 2017 version will show:

    root@Omega-WXYZ:~# omega2-ctrl gpiomux get
    Group i2c - [i2c] gpio 
    Group uart0 - [uart] gpio 
    Group uart1 - uart [gpio] pwm01 
    Group uart2 - uart [gpio] pwm23 
    Group pwm0 - pwm [gpio] 
    Group pwm1 - pwm [gpio] 
    Group refclk - refclk [gpio] 
    Group spi_s - spi_s [gpio] pwm01_uart2 
    Group spi_cs1 - [spi_cs1] gpio refclk 
    Group i2s - i2s [gpio] pcm 
    Group ephy - [ephy] gpio 
    Group wled - wled [gpio]

  • administrators

    @luz Good catch! We, in fact, did not up the version number of omega2-ctrl
    I've upped it now and a v0.2 will be available when we release the next fw build



  • Dear @luz
    I found the bug.

      1. If disconnect WS2813 from omega2 pin and connect again - then WS2813 behaves wrong.
        If remove the power and then power on - then work as it should.
      1. First pixel sometimes shifting. For strip consisting of 10 LEDs - in programm we must write 11 LEDs

    I thought it was a problem on my side. But no. It in Omega or yours side.

    However! Thanx for your job! You are the only one who did it! Low bow!

    Unfortunately, I do not know how to solve it so that it is stable and accurate.



  • @Alexandr-Didenko said in How to control WS281x RGB LED strip?:

      1. If disconnect WS2813 from omega2 pin and connect again - then WS2813 behaves wrong.

    Note that WS2813 DIN pins are quite delicate, and very easy to destroy or at least get a latch-up.

    • Never send a data signal to a WS2813 which is not powered with 5V properly.
    • if the cable is longer than a few inches, use a shielded cable for the data.
    • maybe use a serial resistor in the data line to dampen spikes a bit - you have quite heavy undershoots on your scope diagrams you posted earlier in this thread.
      1. First pixel sometimes shifting. For strip consisting of 10 LEDs - in programm we must write 11 LEDs

    Sounds like a damaged first LED to me.

    I thought it was a problem on my side. But no. It in Omega or yours side.

    I'd be surprised.

    Because in the meantime, I have used the exact same circuitry for a large installation with 20 Omega2 each driving 518 WS2813, and all of them ran 100% stable severals days uninterrupted. One of these panels still is in my office and I use it to test new stuff every day, and it runs practically 24/7.

    Only one caveat: if you have software installed that makes use of the other hardware PWM unit's interrupt, please make sure to use the latest p44-ledchain (OpenWrt 18.06 build here), because there was a bug in handling the PWM interrupts.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.