logo elektroda
logo elektroda
X
logo elektroda

OpenTR6260 PWM Support for Status RGB Strip with Tuya Compatibility

gandi69 570 29
ADVERTISEMENT
  • #1 21725521
    gandi69
    Level 3  
    OpenTR6260 - does this support PWM?

    Have purchased a cheap RGB strip - Status is the manufacturer but it appeared to work with Tuya.
    I flashed it with OpenTR6260 however LED control only appears to work using relays/LED at full brightness.

    Here are some images of the controller itself whilst flashing it earlier today.

    Close-up of TR6200S1 chip on green PCB with SMD components and visible solder pointsPCB with surface-mounted components and connected colored wiresPrinted circuit board with attached multicolored wiresClose-up of damaged PCB with burn marks and electronic components including transistors

    Added after 48 [minutes]:

    I have also found this module does not let me save any configs down now it appears to return to an earlier one I created a few hours ago each time. Very odd, probably looking at a reflash unless there is an ota update?
  • ADVERTISEMENT
  • #2 21725563
    insmod
    Level 31  
    >>21725521
    I tried PWM on GPIO22, and it works. While "Toggle light" isn't working, changing brightness works ok.

    Regarding config save, what partition file are you using? The most recent one is https://github.com/NonPIayerCharacter/OpenTR6260/blob/master/new_partition_0x6000.bin

    No OTA, since we have no tool to generate one. Updates can only be flashed via UART.

    Added after 1 [hours]:

    A quick fix: https://github.com/openshwprojects/OpenBK7231T_App/pull/1838
    With that fix, "Toggle light" works, but leds will still glow a little.
    Plus expanded available PWM pins to include GPIO0-4 and GPIO14-15

    Do you have a backup and/or ali link?
  • #3 21725854
    gandi69
    Level 3  
    The partition file I was using was the one that came with the flashing software. I'll fully UART reflash and try again I think

    Thanks
  • #4 21726568
    gandi69
    Level 3  
    >>21725563


    I think the config now saves fortunately (so far!)

    however PWM on GPIO 22 it doesn't dim the brightness at all, in fact it doesn't do anything really - no backup but I have a spare unit to take backup from which I will do
  • #5 21726881
    insmod
    Level 31  
    >>21726568
    Last OBK (1.18.204) GPIO22 PWM works fine for me, both dimming and toggle.
  • #6 21727022
    gandi69
    Level 3  
    Are you using this device? I'm literally just flashing a new unit and include the backup of the firmware, however, I am not sure how to interpret this.
    Attachments:
    • backup.zip (384.39 KB) You must be logged in to download this attachment.
  • #7 21727031
    insmod
    Level 31  
    >>21727022
    No, i'm doing everything on HLK-M20.
    What are your pins for each color?
  • ADVERTISEMENT
  • #8 21727066
    gandi69
    Level 3  
    GPIO1, red
    GPIO2, green
    GPIO3, blue
  • #9 21727079
    insmod
    Level 31  
    >>21727066
    Then you don't need GPIO22.
    Change those pins to PWM and set channels accordingly (from 0 to 2, RGB)
  • #10 21727108
    gandi69
    Level 3  
    I've tried that, I'm afraid inc the correct channels - doesn't do anything. When they are set to PWM it won't fire the LEDs.
  • #11 21727114
    insmod
    Level 31  
    >>21727108
    With older versions - yes, but fix is already released.
  • #12 21727136
    gandi69
    Level 3  
    Ok so I've just tried that on this latest unit i've just flashed - it works perfectly with this config:

    {
    "vendor": "Tuya",
    "bDetailed": "0",
    "name": "Full Device Name Here",
    "model": "enter short model name here",
    "chip": "TR6260",
    "board": "TODO",
    "flags": "1024",
    "keywords": [
    "TODO",
    "TODO",
    "TODO"
    ],
    "pins": {
    "0": "PWM;1",
    "1": "PWM;2",
    "2": "PWM;3"
    },
    "command": "",
    "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",
    "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"
    }

    that is exactly the same as the other one I did a day or two ago. Very weird I need to check this out and see why this one works and the other doesn't.
  • #13 21727141
    divadiow
    Level 38  
    boot log from backup

    Code: Text
    Log in, to see the code


    Added after 25 [minutes]:

    @gandi69 Not sure I can justify buying one of these at retail price from Home Bargains, if there are any left, but maybe packaging and device case pics would satisfy. Would you mind uploading some please for the record? :D
  • ADVERTISEMENT
  • #14 21727555
    gandi69
    Level 3  
    Latest firmware fixed the issue. However, one unit has failed — board fried somehow! Not the best quality, these I fear...

    Added after 36 minutes:

    Wi-Fi RGB LED strip packaging with 150 LEDs, app control, and voice assistant support Packaging for these
    Attachments:
    • OpenTR6260 PWM Support for Status RGB Strip with Tuya Compatibility IMG_4581.jpeg (1.53 MB) You must be logged in to download this attachment.
  • #15 21731424
    divadiow
    Level 38  
    hmm. £3.99 and I might have been tempted.
    Status Wi-Fi RGB LED tape, 5 meters, 150 LEDs, color changing Status 5m RGB LED tape for £9.99 with app control, on store shelf. Wi-Fi LED controller with three connectors and QR code lying on a box
  • #17 21810015
    gandi69
    Level 3  
    Is this in the “normal” build of bk7231n/t? Or do I have to do something special?
  • #19 21810068
    gandi69
    Level 3  
    My mistake got confused with the thread I opened earlier!
  • #20 21810069
    divadiow
    Level 38  
    gandi69 wrote:
    My mistake got confused with the thread I opened earlier!


    😀
  • #21 21823443
    smatthome
    Level 3  
    Hey, I just got the same 5 m version from Home Bargains without doing any research and just went down the rabbit hole flashing it with OpenTR6260. Quite glad I found this post!

    The config works for me, except the 'glow' when toggled off — is there anything I can do about this? They are currently in my kids' room and it's very noticeable.
  • ADVERTISEMENT
  • #22 21823564
    gandi69
    Level 3  
    I think that may be something to do with the led strip itself, I’ve fitted the LEDs from this kit to another controller and it still does it there. Not as big an issue for me as they are outside though. perhaps someone else here has an idea about it?
  • #23 21823589
    smatthome
    Level 3  
    I noticed if you set the pin to LED, you can turn them on/off fully.

    So, the software engineer in me tells me there is a software solution, but as I’ve known about this project for about 2 hours, I’ve no clue how difficult it would be to change pin to/from PWM based on the toggle setting.

    I guess it could be done as a ‘flag’ to avoid complication with other devices
  • #25 21824098
    smatthome
    Level 3  
    I noticed your suggestion will fail because of the divide by zero at https://github.com/NonPIayerCharacter/OpenTR6...53ce0f91499ba56a5964e9/drivers/hal_pwm.c#L248

    I am going to try (more as a test than anything): when value == 0 in the HAL, do something similar to HAL_PIN_PWM_Stop, calling pwm_stop and the relevant PIN_FUNC_SET. And naturally the opposite when >0.

    If that works, I am still not sure if that's a good idea or not.
  • #26 21824144
    insmod
    Level 31  
    Why would there be division by zero?
    Operations are done from left to right, * and / are of the same priority.
    If duty is 0, then tick_h would be 0
  • #27 21824314
    smatthome
    Level 3  
    Right you are, sorry about that, lack of brackets (and not writing C for about 10 years) threw me.

    Well, I was about to try it out but now I cannot flash it anymore; when in UART flashing mode it gets through the first step (0-100%) but then fails on the next step: "Response;None;RAM Download boot file then fail to sync;"

    As far as I can tell it's nothing to do with my setup, checked the connections on the board, rebooted the PC, tried another serial adapter, same result.

    I have never been able to get clear logs out at 57600 baud, I could see the relevant words (like 'boot' and 'UART' but they were mixed between random characters). 115200 baud was fine (later in boot). Not really sure if that means anything.

    Well, it was fun while it lasted.

Topic summary

The OpenTR6260 controller supports PWM for RGB LED strips, with confirmed functionality on GPIO pins 0-4 and 14-15, including GPIO22. Initial issues with brightness control and config saving were resolved by using the latest partition file (new_partition_0x6000.bin) and firmware updates flashed via UART, as no OTA update tool is available. Proper PWM configuration requires assigning RGB channels to GPIO1, GPIO2, and GPIO3 with corresponding PWM channels 0 to 2. Earlier firmware versions had bugs affecting toggle and dimming functions, but recent fixes have restored full PWM control. Some units showed hardware reliability concerns, with at least one board failure reported. The RGB strip manufacturer "Status" is compatible with Tuya firmware, and flashing OpenTR6260 firmware enables PWM control when correctly configured.
Summary generated by the language model.
ADVERTISEMENT