logo elektroda
logo elektroda
X
logo elektroda

[BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color

lionboy 3120 27
ADVERTISEMENT
  • #1 20369865
    lionboy
    Level 10  
    Hello ,

    I am trying to configure PIN on a Led Controller Single Color with CB3S chip, anyone cand help me with this?

    https://github.com/tuya-cloudcutter/tuya-clou...eneric-ih001-led-controller-single-color.json

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color

    What i find is with PIN 7 as PWM brightness increase or decrease but i dont know what pin is for on or OFF only this i need.

    This is what i find until now with pin 7 and 9 when i press on Button and TuyaMCu driver start.

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color





    Thanks
  • ADVERTISEMENT
  • #2 20370133
    p.kaczmarek2
    Moderator Smart Home
    Hello, what is the marking on this chip:
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color

    Why do you think it's a TuyaMCU?

    Do you have a multimeter?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #4 20370488
    p.kaczmarek2
    Moderator Smart Home
    XL1509 is not a Tuya MCU. It's a step down converter. It only powers your device. It converts 5V or 12V (depending on your device) to 3.3V for BK7231.

    Please:
    1. take your multimeter
    2. set the continuity test mode so it beeps when probes are shorted
    3. put one probe here:
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
    4. with other probe, check each CB3S pin:
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
    5. check all of those pins from CB3S, at which one do you get a "beep" ? Which is connected to button?
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
    Pin numberSymbolI/O typeFunction
    1RSTILow-level reset, high level active (the pin has been pulled high internally), correspond to CEN of the IC
    2ADC3AIADC pin, which corresponds to P23 of the IC
    3CENIEnabling pin, which is pulled high internally to be compatible with other modules
    4P14I/OA common GPIO interface, which corresponds to P14 of the IC
    5P26I/OGPIOP_26, which corresponds to P26 of the IC, PWM 5
    6P24I/OGPIOP_24, which corresponds to P24 of the IC, PWM 4
    7P6I/OGPIOP_6, which corresponds to P6 of the IC, PWM 0
    8VCCPPower supply pin (3.3V)
    9GNDPPower supply reference ground
    10P9I/OGPIOP_9, which corresponds to P9 of the IC, PWM 3
    11TXD2I/OUART2_TXD (used to display the module internal information), which corresponds to P0 of the IC
    12CSNI/OProduction test control pin. If it is used as a common I/O pin, it must be connected to the VCC externally. Do not connect it to the ground before the module is powered on.
    13P8I/OGPIOP_8, which corresponds to P8 of the IC, PWM 2
    14P7I/OGPIOP_7, which corresponds to P7 of the IC, PWM 1
    15RXD1I/OUART1_RXD (user serial interface), which corresponds to P10 of the IC. Do not connect it to the VCC. By default, the MCU serial port should be in low-level or high-impedance state.
    16TXD1I/OUART1_TXD (user serial interface), which corresponds to P11 of the IC. Do not connect it to the VCC. By default, the MCU serial port should be in low-level or high-impedance state.
    17ADC3AI(Not recommended. If needed, please use Pin 2) ADC port, which corresponds to P23 of the IC. Programmed SPI
    18P22I/O(Not recommended ) GPIOP_22, which corresponds to P22 of the IC. Programmed SPI
    19CSNI/OThe pull-up resistor is needed during usage of customers. Do not connect it to the ground before the module is powered on. Correspond to P21 of the IC.
    20P20I/O(Not recommended. ) GPIOP_20, which corresponds to P20 of the IC. Programmed SPI



    Also please post a screenshot from OpenBeken WWW panel so I can make sure that everything else is ok.
    Helpful post? Buy me a coffee.
  • #5 20370498
    lionboy
    Level 10  
    Hello

    This i find with multimeter:

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color


    Pictutes from www here:

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color

    Thanks
  • #6 20370512
    p.kaczmarek2
    Moderator Smart Home
    Thank you, please see my image:
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
    Why do you have a "Btn" role on P9, while according to your test, Btn is on P23?
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
    Helpful post? Buy me a coffee.
  • #7 20370541
    lionboy
    Level 10  
    It was for testing that btn there, i will change like you say to see what happen
  • #8 20370546
    p.kaczmarek2
    Moderator Smart Home
    Futhermore, is PWM pin a correct pin?

    Can you change LED brightness here, see screenshot from my LED strip device:
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #9 20370717
    lionboy
    Level 10  
    I dont know if pwm is correct, can you help me how to verify this?
    Thanks
  • #10 20370760
    p.kaczmarek2
    Moderator Smart Home
    Do you have a LED strip connected to check if dimming works?

    This is "single color" strip - right? - so it has 1 PWM.

    BK7231 has only 6 PWMs, so basically... you have 6 options to try.
    Helpful post? Buy me a coffee.
  • #11 20370859
    lionboy
    Level 10  
    p.kaczmarek2 wrote:
    Do you have a LED strip connected to check if dimming works?

    This is "single color" strip - right? - so it has 1 PWM.

    BK7231 has only 6 PWMs, so basically... you have 6 options to try.


    Yes is single color but i saw at PIN 7 is some change on light but only when i toggle not on dimmer.

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
  • #12 20370891
    p.kaczmarek2
    Moderator Smart Home
    lionboy wrote:

    Yes is single color but i saw at PIN 7 is some change on light but only when i toggle not on dimmer.

    This is very strange. Can you show a photo of your LED strip?

    Have you connected a normal LED strip to the controller or something else?

    How strip behaves with PWM state here, with dimmer?
    Helpful post? Buy me a coffee.
  • #13 20370892
    lionboy
    Level 10  
    p.kaczmarek2 wrote:
    Thank you, please see my image:
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
    Why do you have a "Btn" role on P9, while according to your test, Btn is on P23?
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color


    On 23 don't work like Btn, is very hard with this :D

    Added after 7 [minutes]:

    now ADC Pin don't work with Btn and i don't know why, is not connected to AC , i need to connect and press Btn ?

    Added after 31 [minutes]:

    Is the same schema like this one only difference is WB3S and my CB3S but there are same PIN.

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color

    I check all PIN now and all is like in this image

    Added after 6 [minutes]:

    I saw this is posted by you: https://www.elektroda.pl/rtvforum/topic3798114.html

    can you show me your configuration for PIN? Because is same like my only chip is CB3S

    Thanks

    Added after 9 [minutes]:

    Same PIN but don't work like yours:

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color

    Added after 5 [minutes]:

    Check this video with Btn on PIN 1 and PWM on Pin 7 in video you will see the brightness change but Toggle on/off don't work, i don't what to control from button only from HA on/off.





    Added after 3 [hours] 45 [minutes]:

    p.kaczmarek2 wrote:
    lionboy wrote:

    Yes is single color but i saw at PIN 7 is some change on light but only when i toggle not on dimmer.

    This is very strange. Can you show a photo of your LED strip?

    Have you connected a normal LED strip to the controller or something else?

    How strip behaves with PWM state here, with dimmer?


    Is the same strip who i controlled from Tuya App i didn't change, i will try with another to see if work, i have one more but is RGB :D

    I don't understand why can't use on/off because on Tuya work normal

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color

    Thanks

    Added after 43 [minutes]:

    Last image with PIN, from BTN i don't find any of them

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color

    One more image:

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
  • #14 20378304
    lionboy
    Level 10  
    Hello,

    Did you see something wrong on what i use?

    Thanks
  • #15 20378316
    p.kaczmarek2
    Moderator Smart Home
    Hello @lionboy, can you clarify - do I understand correct:
    The clickable button on web page works OK:
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
    but physical button on device doesn't work:
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
    Do I understand correctly?
    Helpful post? Buy me a coffee.
  • #16 20378775
    lionboy
    Level 10  
    Click on web only change a little bit brightness but btn from device don't work. What i want only to on or off from home assistant i don't want btn to work.

    Thanks
  • #17 20378780
    p.kaczmarek2
    Moderator Smart Home
    lionboy wrote:
    Click on web only change a little bit brightness but btn from device don't work. What i want only to on or off from home assistant i don't want btn to work.

    With green button and brightness to the right, it should be 100% brightness:
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
    With red button, it should be off:
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
    With red button, you should have zeroes here:
    
    Channel 0 = 0, Channel 1 = 0, Channel 2 = 0
    

    Can you show how it looks like for you?

    I need two screenshots - 1. with red button (off state), 2. with green button (on state)
    Helpful post? Buy me a coffee.
  • #18 20378800
    lionboy
    Level 10  
    I am not at home now, on weekend i will arrive and i will give you but i told you at me pwm is at 7 and btn i think on adc
  • #19 20378813
    p.kaczmarek2
    Moderator Smart Home
    @lionboy you said:
    Quote:

    Click on web only change a little bit brightness

    Click on web page should turn off and on the device. It should be possible to set 100% brightness and 0 % brightness.

    If for you, click on web page only changes a little bit brightness, then issue is somewhere else - maybe wrong PWM or wrong wiring or something else strange.

    Even without physical button on the device, you should have 0% to 100% brightness control. From no light to full light.
    Helpful post? Buy me a coffee.
  • #20 20378848
    lionboy
    Level 10  
    You can see in this video what do when press and change brightness:



  • #21 20378858
    p.kaczmarek2
    Moderator Smart Home
    If that's a single color strip, then why do you have two channels?
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
    Helpful post? Buy me a coffee.
  • #22 20378879
    lionboy
    Level 10  
    Btn was on channel 1 and Pin 7 PWM is on same channel 1. Is wrong with this?. Tomorrow i will tell someone to plug this controller and then i can acces via VPN to send image with configuration
  • #23 20380166
    p.kaczmarek2
    Moderator Smart Home
    So at the moment it seems that your description of the problem was not entirely correct.
    You have a PWM issue. A very strange one, i must admit.

    If you change PWM role to relay, does setting that channel OFF turns off the light and ON turns on the lights?
    Helpful post? Buy me a coffee.
  • #24 20380382
    lionboy
    Level 10  
    I am not at home now to test but Saturday i will test and see what happen but from tuya can control brightness is very strange after flash
  • #25 20386266
    lionboy
    Level 10  
    p.kaczmarek2 wrote:
    lionboy wrote:
    Click on web only change a little bit brightness but btn from device don't work. What i want only to on or off from home assistant i don't want btn to work.

    With green button and brightness to the right, it should be 100% brightness:
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
    With red button, it should be off:
    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color
    With red button, you should have zeroes here:
    
    Channel 0 = 0, Channel 1 = 0, Channel 2 = 0
    

    Can you show how it looks like for you?

    I need two screenshots - 1. with red button (off state), 2. with green button (on state)


    I saw at you have 2 driver start, at me i don't have any driver start.

    I will give you the imeage or a video with this settings today.

    This is as Relay on PIN7:





    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color

    Thanks
  • #26 20386294
    p.kaczmarek2
    Moderator Smart Home
    Hello, SSDP and DGR drivers should not affect your issue.

    Maybe your LED strip is custom and uses two PWMs at once to control the strip, somehow?
    Helpful post? Buy me a coffee.
  • #27 20386318
    lionboy
    Level 10  
    p.kaczmarek2 wrote:
    Hello, SSDP and DGR drivers should not affect your issue.

    Maybe your LED strip is custom and uses two PWMs at once to control the strip, somehow?


    I will go to buy a white strip today at 12v to see if work with that

    What i don't understand why with Tuya App work normal on brightness and On/off and on Beken don't want

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color

    Added after 51 [minutes]:

    Can you tell me why with PIN 7 on PWM and chn 0 i have 2 channel? maybe there are a problem with channel at me ?

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color

    [BK7231N / CB3S] Tuya Generic ih001 Led Controller Single Color

    Added after 3 [hours] 6 [minutes]:

    p.kaczmarek2 wrote:
    Hello, SSDP and DGR drivers should not affect your issue.

    Maybe your LED strip is custom and uses two PWMs at once to control the strip, somehow?


    I was to buy a white normal led strip and is same problem, i think the CB3S is problem, i will try to solder a ESP32 because this don't want to work
  • #28 20386980
    lionboy
    Level 10  
    Thanks for help me but i put a ESP-32 on this controller.

    OpenBeken Pins:

    
    Device configuration, as extracted from Tuya: 
    - LED Cool (Channel 4) on P7
    - PWM Frequency1000
    Device seems to be using CB3S module, which is using BK7231N.
    And the Tuya section starts, as usual, at 2023424


    Esphome yaml:

    
    esphome:
      name: upk2esphome-bk7231n
    
    bk72xx:
      board: generic-bk7231n-qfn32-tuya
    
    logger:
    
    web_server:
    
    captive_portal:
    
    mdns:
    
    api:
      password: ""
    
    ota:
      password: ""
    
    wifi:
      ssid: !secret wifi_ssid
      password: !secret wifi_password
      ap:
    
    output:
      - platform: libretiny_pwm
        id: output_cold
        pin: P7
    
    light:
      - platform: monochromatic
        id: light_monochromatic
        name: Light
        output: output_cold
    


    Thanks

Topic summary

The discussion revolves around configuring a single color LED controller utilizing the CB3S chip, specifically focusing on identifying the correct pin assignments for controlling brightness and power states. The user initially finds that pin 7 adjusts PWM brightness but struggles to determine the pin for turning the LED on and off. Various responses suggest using a multimeter to test continuity between the button and CB3S pins, clarifying that the XL1509 chip is a step-down converter and not a Tuya MCU. The conversation includes troubleshooting steps, such as verifying PWM functionality and testing with different LED strips. Ultimately, the user decides to switch to an ESP32 for better compatibility and shares their configuration for the new setup.
Summary generated by the language model.
ADVERTISEMENT