logo elektroda
logo elektroda
X
logo elektroda

[BK7231N/CBU] How to configure LED's of Battletron Multicolor Light Ball

bjoerns 4068 9
ADVERTISEMENT
  • #1 20929827
    bjoerns
    Level 2  
    Hi there,
    I have recently bought a cheap Battletron Multicolor Lightball from Action, and what a surprise, it is based on a Tuya CBU:
    https://www.action.com/de-at/p/3202652/battletron-gaming-lichtkugel-razer-chroma/

    So I gave it a go, flashing it with OpenBK which went fine. The soldering before was the bigger challenge. Unfortunately, the flasher was not able to decrypt the backup because it found no key. I don't know if I did something wrong there, but I'll post the Firmware Backup here as reference.
    Battletron lighting PCB with soldered wires.
    The problem I now have is that I don't know how to address the LEDs.

    The two ICs on the board seem to be WS2811c controllers: https://cdn-shop.adafruit.com/datasheets/WS2811.pdf

    The data in of the upper controller is connected to Pin 2 (Symbol P16) of the CBU. The data out of the first WS2811c is connected to the data in of the second one, kind of daisy-chained together.

    The IR Receiver is connected to Pin 9 (Symbol P7).

    Any hints on how I can get that to work?
  • ADVERTISEMENT
  • #2 20937201
    p.kaczmarek2
    Moderator Smart Home
    This is a driver for a per-LED control. P16 is not used here at accident, P16 is always used for such LEDs because it's a SPI DMA output. We have a driver for that but there is some strange instability in the SPI DMA itself that makes display unreliable:
    https://www.elektroda.com/rtvforum/topic4011232.html#20937193
    I haven't managed to find the root cause of the issue yet, any help is wanted. If you want to try the current driver, as it is, you can find the sample OBK script with the search below:
    https://www.elektroda.com/rtvforum/find.php?q=sm16703P_Start
    This should give you basic control over your LEDs, but at the time of the writing, the instability is still there. Of course, that's assuming the timings are matching, but they seem to be pretty close to WS2812.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20937741
    bjoerns
    Level 2  

    Thanks for the help.

    Okay, I played around a bit with the code I have found here:
    https://www.elektroda.com/rtvforum/topic3968310.html#20709852

    I can get the LEDs to work with:
    startDriver SM16703P
    SM16703P_Init 2
    SM16703P_SetPixel 0 255 0 0
    SM16703P_SetPixel 1 0 255 0
    SM16703P_Start

    Device with LEDs glowing red and green.

    It seems that the first driver feeds the nine outer LEDs, while the second one feeds the six LEDs on top.
    It seems that they cannot be addressed individually, which makes sense regarding the fact that there is a cable with five lines going to the top.

    Nevertheless, they light up but setting the color is rather unreliable, not giving the color entered or not updating the color.
  • #4 20948532
    dingsundbums
    Level 5  

    Hi,
    I also have one of those and didn't manage to flash it yet with cloudcutter.

    But couldn't flash it by TTL yet since I didn't manage to get it open without breaking it.

    Can you give some hints?
  • #5 20948982
    bjoerns
    Level 2  

    Opening this thing is really a pain.

    The base and the glass bulb are glued together with some silicone-based glue which is so heat resistant that warming it up with a hotgun may melt the plastic but does not weaken the glue.
    I've gone around the gap between the base and the glass bulb with a cutter and then used a spudger and a wide screwdriver to pry between the two parts. So I could weaken the glue to a point where both parts are separated.
    But you must be careful not to damage the glass.

    A tool wedged between the base and the glass bulb of a lamp. Close-up of an LED lamp interior with electronic components on a white background.
  • #6 20948993
    dingsundbums
    Level 5  

    Oh my.
    That's indeed a pain.
    And breaking the glass was exactly my concern :)
  • ADVERTISEMENT
  • #7 20949043
    p.kaczmarek2
    Moderator Smart Home
    bjoerns wrote:

    Nevertheless, they light up but setting the color is rather unreliable, not giving the color entered or not updating the color.

    Someone on Github had idea how to improve stability:
    Screenshot from a discussion thread on a code repository platform, featuring a comment by user zurkschwerdt about SPI issues.
    I've asked him to make PR with his changes but there was no reply since then, so maybe I will try to make this change myself and let you guys try. Any testing and help is welcome.
    Helpful post? Buy me a coffee.
  • #8 20949999
    bjoerns
    Level 2  

    No problem. Simply leave a message when it's ready.
  • #9 20967060
    bjoerns
    Level 2  

    p.kaczmarek2 wrote:
    bjoerns wrote:

    Nevertheless, they light up but setting the color is rather unreliable, not giving the color entered or not updating the color.

    Someone on Github had idea how to improve stability:
    Screenshot from a discussion thread on a code repository platform, featuring a comment by user zurkschwerdt about SPI issues.
    I've asked him to make PR with his changes but there was no reply since then, so maybe I will try to make this change myself and let you guys try. Any testing and help is welcome.


    Any update on this?
  • ADVERTISEMENT
  • Helpful post
    #10 20967153
    p.kaczmarek2
    Moderator Smart Home
    @bjoerns The SPI DMA driver bug has been fixed. The SM16703P/WS2812B/etc LEDs should work good now. Please update your devices. For scripting configuration, please see:
    OpenBeken WS2812B driver (compatible with SM16703P, etc) - short scripting presentation
    We can continue discussion there. The more advanced animation will be added soon, stay tuned!
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around configuring the LEDs of the Battletron Multicolor Light Ball, which is based on a Tuya CBU and utilizes WS2811c controllers. After flashing the device with OpenBK, users encountered issues with LED control, particularly with addressing individual LEDs and achieving reliable color settings. A driver for per-LED control was mentioned, but it exhibited instability due to issues with the SPI DMA output. Users shared code snippets for initializing and controlling the LEDs, noting that the first driver controls the outer LEDs while the second one manages the top LEDs. Additionally, challenges in opening the device without damage were discussed, along with a recent fix for the SPI DMA driver bug that should improve LED functionality.
Summary generated by the language model.
ADVERTISEMENT