logo elektroda
logo elektroda
X
logo elektroda

Exploring Tuya WT-SPI LED Controller With TuyaMCU: 1-4 Data Lines, 1000 LEDs, 8A, 5-24V Input, CBU

divadiow 5154 13
Best answers LABEL_AI_GENERATED

Can the WT-SPI LED controller’s external MCU be fully controlled from OpenBeken, or does that MCU contain the LED-type and animation logic itself?

It looks like the separate BAT32G137GH32FP MCU contains most of the LED-type and animation logic, while the Tuya/OpenBeken side mainly exposes datapoints such as the chip-type selection [#21147912][#21149178][#21155942] The Cloudcutter profile only listed the dpIDs at first, and the app’s chip selection appears to map to one of those datapoints rather than replacing the MCU’s own behavior [#21147912][#21345704] Test pads on the PCB were traced to the BAT32G137GH32FP pins, and a J-Link/SWD setup was able to read the whole chip, but the dump looked like gibberish or possibly encrypted [#21155942][#21156008] Because of that, mirroring every function in OBK, including strip-length calculation, freestyle color picking, and the predefined animations, would be a large job and may not be practical [#21149178]
AI summary based on the discussion. May contain errors.
ADVERTISEMENT
  • Tuya SPI LED controller with 4 data lines and 12V output

    #1 21147889
    divadiow
    Level 38  
    Posts: 5213
    Help: 446
    Rate: 914
    I have another device to play with!

    This is Tuya SPI LED controller with up to 4 data lines (LED strip controller depending) supporting up to 1000 LEDs @ 8 amps. Its model is WT-SPI and a quick Google shows a few vendors for it.

    https://www.aliexpress.com/item/1005005335498067.html

    Tuya SPI LED controller WT-SPI with technical description and price on AliExpress.

    The product manual is quite good and is also available as a PDF, which I attach. The number of supported LED controller types seems quite extensive

    Table of LED chip types and compatible chips for SPI LED controller.

    I didn't know some LED types come with separate data and clock lines, which is why there is C01/D01 & C02/D02

    Connection diagram of the Tuya SPI LED controller to various types of LED strips.

    Despite having a CBU/BK7231N module the device also comes with an MCU. The accepted input voltage is 5-24v with barrel or bare-wire connector options. With my 12V DC barrel adaptor the output is 12v, so natively good for LED strips that require 12v, like WS2811.

    White Tuya SPI LED controller on a light background. Tuya WT-SPI LED controller with visible ports and labels. WT-SPI RGB/RGBW controller with manual and box.
    Close-up of a circuit board with CBU module, buttons, and capacitors. Close-up of a printed circuit board with electronic components of a Tuya SPI LED controller. Close-up of a circuit board with electronic components Close-up of a printed circuit board with visible integrated circuits and wire connections. Close-up of a circuit board with integrated circuits and a Topazcon 16V capacitor. Close-up view of the underside of a circuit board with a removed copper trace. Bottom view of a green printed circuit board with solder marks. Tuya SPI LED controller WT-SPI with visible components and connectors

    I think I have identified these components correctly

    Image of Tuya SPI LED controller with marked components on the board.

    Along with their respective product pages:
    https://www.xlsemi.com/datasheet/XL1509-EN.pdf
    http://www.microne.com.cn/en/product/246.html
    https://www.mcu.com.cn/en/Products/112
    https://www.nexperia.com/products/analog-logi...ers/transceivers/series/74HC245-74HCT245.html

    Because the MCU is connected to the CBU using RX and TX communication at 115200 baud, I was not able to take a dump of the CBU firmware without severing the TX trace to the MCU. Unfortunately I severed the RX too, I think I've usually only needed to do one before. No matter, it can be repaired.

    Damaged traces on a printed circuit board.

    And with the MCU out of the way I can take a backup, attached. Also, boot log:

    Code: Text
    Log in, to see the code


    Being v2.1.6 it is not patched and so Cloudcutter can be used to flash to Openbeken. My next steps are to repair the RX/TX and begin MCU communication capture using TuyaMCU Analyser. I have not been able to get a full API response from Tuya for this device so I'll have to use tuyaMcu_sendQueryState as explained here https://www.elektroda.com/rtvforum/topic4049908.html

    I am curious to find out if the MOSI pin on the CBU is doing anything. Is the MCU doing everything and does it contain the full program of supported LED controller types and animation seen in the Tuya app? If so, can all these things be set by MCU command alone from within Openbeken? If so, it could mean a long autoexec and many GUI options to set in OBK. Sadly that would mean no OBK PixelAnim opportunities I fear.

    Tuya app interface for the WT-SPI LED controller with a red color setting for the LED strip. Tuya LED controller app screen displaying various light effects. LED controller settings menu in the app. Chip type selection screen in the app. Device update screen in the app showing no updates available for modules V2.1.6 and V1.0.0.
    Attachments:
    • readResult_BK7231N_QIO_2024-07-7-22-45-28.bin (2 MB) You must be logged in to download this attachment.
    • WT-SPI.pdf (13.59 MB) You must be logged in to download this attachment.
  • ADVERTISEMENT
  • Cloudcutter profile reveals Tuya dpID list

    #2 21147912
    divadiow
    Level 38  
    Posts: 5213
    Help: 446
    Rate: 914
    ha. I guess I didn't look at the Cloudcutter profile hard enough. The dpIDs are listed, but not named.

    Code: Text
    Log in, to see the code
  • ADVERTISEMENT
  • Chip type selection and animation mirroring concerns

    #3 21149178
    divadiow
    Level 38  
    Posts: 5213
    Help: 446
    Rate: 914
    hmm. and this is just the chip type selection
    Table showing chip types, their compatible chips, and WiFi module commands.

    Added after 10 [hours] 3 [minutes]:

    not sure I have the energy for getting every function mirrored in OBK, if that's even possible. The LED strip length calculation and free-style colour picker could be interesting to work out. :/

    half the predefined animations:

    Screenshot of a list of predefined LED animations with codes and names.
  • Test pads map to BAT32G137GH32FP pins

    #4 21155942
    divadiow
    Level 38  
    Posts: 5213
    Help: 446
    Rate: 914
    The test pads on the PCB trace to these legs of the Cmsemicon 32-pin package BAT32G137GH32FP. I hoped they would include SWDIO and SWCLK so there's potential to dump the MCU flash using Jlink.

    Printed circuit board with labeled test points for SWDIO, SWCLK, VSS/GND, RESETB, and a pinout diagram for the 32-pin BAT32G137GH32FP package.

    and I probably didn't need to cut the RX/TX on the underside as the reset pad pulled to ground could disable the MCU, freeing access to the CBU.
    Attachments:
    • BAT32G137_Datasheet_V2.5.5.pdf (1.72 MB) You must be logged in to download this attachment.
  • J-Link setup reads BAT32G137GH flash successfully

    #5 21156008
    divadiow
    Level 38  
    Posts: 5213
    Help: 446
    Rate: 914
    divadiow wrote:
    and I probably didn't need to cut the RX/TX on the underside as the reset pad pulled to ground could disable the MCU, freeing access to the CBU.


    maybe not. disabling the MCU with RESETB grounded means no CBU powering/booting

    Added after 53 [minutes]:

    with SWDIO and SWCLK connected to a J-Link SWD USB device and this custom device added to C:\Program Files\SEGGER\JLink_V796t\JLinkDevices.xml we can choose the correct MCU from the target device list. The FLM file for BAT32G137GH can be downloaded from https://www.mcu.com.cn/en/Products/112/pids/8

    Screenshot showing the CMS.BAT32G137.pack file, version 3.0.8, labeled as BAT32G137 Pack.

    unzipped. file placed in C:\Program Files\SEGGER\JLink_V796t\JLinkDevices\Cmsemicon\BAT32G137GH.FLM

    SEGGER J-Flash software interface with selected configuration for MCU Cmsemicon BAT32G137GH.

    Code: Text
    Log in, to see the code


    connected OK and entire chip read, seemingly successfully. 0x00000000 - 0x0001FFF. Attached.

    Not sure what use this is, looks like gibberish. encrypted?

    J-Flash message indicating successful memory read.

    Screenshot of SEGGER J-Flash program with a memory view of the chip.
    Attachments:
    • BAT32G137_mcu_fw.zip (57.83 KB) You must be logged in to download this attachment.
  • ADVERTISEMENT
  • Full dpID list for Tuya WT-SPI controller

    #6 21345704
    divadiow
    Level 38  
    Posts: 5213
    Help: 446
    Rate: 914
    >>21147912

    full dpID

    Code: JSON
    Log in, to see the code
  • #7 21855682
    Bejziczek
    Level 13  
    Posts: 249
    Rate: 43
    I have this controller hooked up to a 24v power supply, and from the controller to a 24v rgb cob ic tape and it doesn't work. I'm struggling for the third month now, I've bought more digital cob tapes and nothing, still the same
    I bought another such controller yesterday and will see how it arrives.
    What could I possibly check?
  • Dead controller after remote pairing attempt

    #8 21870896
    Bejziczek
    Level 13  
    Posts: 249
    Rate: 43
    Another controller worked on dams with chipstem sk6812, and as I could not get the colours correct I was told that sk6812 would only set correctly via remote control, not an app so I bought a remote control and since then another controller seems dead, i.e. the tape works in the last selected program as it was still controllable, and now the flesh diode lights up constantly, does not blink, even after connecting voltage and the match key even held down for a few minutes does not respond.
    Please help.
  • #9 21870944
    divadiow
    Level 38  
    Posts: 5213
    Help: 446
    Rate: 914
    do you have pictures of your power supply and how you've connected it, and the LED strips, to the controller?
  • ADVERTISEMENT
  • Voltage readings suggest one controller has failed output stages

    #10 21871072
    Bejziczek
    Level 13  
    Posts: 249
    Rate: 43
    A 200w power supply, and connected to the controller with a wire with a round end (forgot the name), and the led strip is on 3pin, spi, red V+, white GND, and green is data or clock
    Now I have 2 wz-spi controllers, the first one that responds to match key presses, pairs with the app and remote control, and the voltages are such that between V+ and GND or CO1 or DO1 is as input ie 24v, and between V+ and CO2 or DO2 about 13v. The controller can be controlled normally from the app or the remote, but the tape does not light up at all, and on the second controller the tape lights up, but there is no control over it, the led does not blink when power is applied, it cannot be reset or put into pairing mode and the voltage between V+ and the other contacts is that of the input approx 24v
  • #11 21871624
    divadiow
    Level 38  
    Posts: 5213
    Help: 446
    Rate: 914
    I can't really think what the issue is. So your LED strip is a SK6812? for sure? Have you tried cycling through the chip types in the app to see if any make the LED strip work?
  • Suggesting chip-type switching and warranty return

    #12 21871716
    Bejziczek
    Level 13  
    Posts: 249
    Rate: 43
    divadiow wrote:
    I don't really know what this is about. Your LED strip is definitely an SK6812? Have you tried switching between chip types in the application to see if any of them make the LED strip work?

    Obviously I've tried all sorts of combinations, but since even you can't help me there's nothing left for me to do but buy another driver because these two are definitely broken and I'm currently trying to return them under warranty.
  • #13 21871742
    divadiow
    Level 38  
    Posts: 5213
    Help: 446
    Rate: 914
    also, aren't SK6812 strips typically 5v? Youre feeding it 24v?

    What is your LED strip exactly? Make/model/pictures/purchase link?
  • Remote pairing stopped controller response

    #14 21871759
    Bejziczek
    Level 13  
    Posts: 249
    Rate: 43
    divadiow wrote:
    also, aren't SK6812 strips normally powered by 5 volts? Are you supplying them with 24 volts?

    What exactly is your LED strip? Make/model/photos/link to purchase?

    The strips are 24v, it is clearly written on them and I know what I am buying.
    I bought my first set in December with 2x5m RGBIC tapes with the WSS8211 chipset and I don't want to describe everything one by one, but I ended up buying colloquial tapes these:
    https://pl.aliexpress.com/item/10050072998586...in.93.410a1c24B8xPVm&gatewayAdapt=glo2pol
    and they also did not want to work and only when I bought another such controller WZ-SPI it worked, but I could not get the correct colours and also here on the forum someone told me that to get the mode on WS8214 I need to buy a remote control which I did and when I tried to connect the remote to the controller it stopped responding. The flash LED on it doesn't blink and it doesn't respond to the match key

Topic summary

LABEL_AI_GENERATED
Discussion of a Tuya WT-SPI LED strip controller based on a CBU/BK7231N module with an additional MCU, supporting 1–4 data lines, up to 1000 LEDs, 8 A output, and 5–24 V input. The thread covers the device’s TuyaMCU datapoints, LED chip-type selection, predefined animations, and the possibility of mirroring functions in OpenBK/OBK. Later posts focus on hardware reverse engineering: identifying PCB test pads, tracing them to a Cmsemicon BAT32G137GH32FP MCU, and using SWD/J-Link with a custom device definition and FLM file to access the flash. The discussion also includes troubleshooting of real-world LED strip compatibility and control issues with 24 V RGBIC/SPI strips such as SK6812 and WS8211/WS8214, including cases where strips do not light, colors are incorrect, pairing fails, or the controller appears dead.
AI summary based on the discussion. May contain errors.
ADVERTISEMENT