logo elektroda
logo elektroda
X
logo elektroda

OpenBeken - configuration of RGB+W LED driver, 28 segments, separate control

xury 432 3
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21729777
    xury
    Automation specialist
    How to correctly configure a mixed RGB addressable LED lamp driver 28 segments of 3-4 LEDs plus one white colour. This is a LED strip vertical corner lamp 1.4m high
    The driver generally already works on Openbeken, but I can't deal with two issues: I don't know how to control white and RGB colour separately.
    I've traversed, ripped the firmware and configuration. And what I have already come to:
    PWM of white colour - P8
    RGB LED voltage control - P26
    RGB driver D - P16
    IRRecv - P20
    Microphone - P23
    And three buttons: P7, P24 , P22 as C, ON, M.
    I mainly care about being able to switch between white tape and RGB and possibly switch them on at the same time. And to control the brightness separately for white and RGB. The rest I think I can grasp.
    Here are the pictures of the controller:
    LED controller with CBU module and PCB labeled CYIT-465-ARGB
    LED controller board with CBU module and pin labels visible on PCB
    LED controller with CBU module on CYTT-465/ARGB circuit board
    JSON extracted from the original batch:
    Code: JSON
    Log in, to see the code

    Description:
    Device configuration, as extracted from Tuya:
    - Microphone (TODO) on P23
    - LED Cool (Channel 4) on P8
    - IR Receiver is on P20
    - PWM Frequency 1000
    - SPI MISO 17
    - SPI MOSI 16
    - Control Pin (TODO) on P26
    - Button (channel 2) on P24
    - Button (channel 3) on P7
    Device seems to be using CBU module, which is using BK7231N.
    And the Tuya section starts, as usual, at 2023424
    Attached is the ripped original batch.
    I am trying to set the PWM on P8 and REL on P26 and configure the driver:
    Code: Text
    Log in, to see the code

    But I don't understand why sometimes the buttons work to switch RGB to white and sometimes not. Sometimes the brightness slider works and sometimes it doesn't etc.
    I would also add that when I play around in status. PWM works fine there for white. I completely don't know why it doesn't work on Home
  • ADVERTISEMENT
  • #2 21731225
    xury
    Automation specialist
    Dobra. Już prawie opanowałem. Jedyne co nie działa to kolor czerwony swieci razem z pinem PWM osobnej barwy ciepłej i nie wiem dlaczego. Dzieje się tak zarówno w HA i w Tools
    [edited]
    Zmiana kanału z 4 na 5 rozwiązała problem z czerwonym.
    Pozostał tylko problem z przypisaniem PWM jako Warm.
  • ADVERTISEMENT
  • #3 21731625
    p.kaczmarek2
    Moderator Smart Home
    Can you show your current config (full GPIO and script), so I can run it in simulator and check how it behaves?

    I don't think I had such a strip, maybe it's an error that I can easily cover with self-tests in Simulator.
    Helpful post? Buy me a coffee.
  • #4 21731664
    xury
    Automation specialist
    Thanks for you answer @p.kaczmarek2
    My current configuration:
    {
      "vendor": "Tuya",
      "bDetailed": "0",
      "name": "Full Device Name Here",
      "model": "enter short model name here",
      "chip": "BK7231N",
      "board": "TODO",
      "flags": "25170952",
      "keywords": [
        "TODO",
        "TODO",
        "TODO"
      ],
      "pins": {
        "7": "Btn_SmartLED;0",
        "8": "PWM;5",
        "16": "SM16703P_DIN;0",
        "20": "IRRecv;0",
        "22": "Btn_Tgl_All;0",
        "24": "Btn_NextColor;0",
        "26": "Rel;0"
      },
      "command": "",
      "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"
    }

    There's an addressable RGB controller. And an additional PWM line on P8 that handles the white strip. If I set P8's PWM to channels 1-4, warm white also activates along with red. If I set PWM to 0, the red color is correct. If I assign the PWM to a channel higher than 4, I can control the RGB and W brightness separately. RGB control for each segment seems to work correctly. If I set flag 24, the cool white of the three LEDs also works. Setting flag 3 allows me to control the brightness of the RGB and W channels separately. The only problem is with the W channel, or maybe I'm misunderstanding something.

    I think P26 powers all the LEDs, and P8 is the PWM for the warm white color. The strip doesn't have a separate CW. The pin and flag configuration is as in the JSON above. In the autoexec bat, I have:
    startDriver SM16703P
    SM16703P_Init 28
    SM16703P_SetPixel all 0 0 0
    SM16703P_Start


    PCB board has also microphone at P23 and IR receiver at P20, but is not important for me now. I can easily set whatever I want via mqtt. Thanks so much for your work with OBK. For allowing us to get rid of the Chinese cloud. I've tried playing around with the OBK simulator, but is so hard to understand for me at this time.
ADVERTISEMENT