logo elektroda
logo elektroda
X
logo elektroda

Disassembly, interior, firmware change and life extension of the E14 RGB+CCT Tuya LED light on LN882

p.kaczmarek2 132 0
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Red-glowing LED bulb next to a smartphone showing the OpenBK firmware control interface. .
    Here I will show how to change the software of a WiFi controlled LED light. The topic will cover its full disassembly, connecting the UART programmer, configuration and restoring the whole thing without glue. By the way, I will also reduce the LED current programmatically to extend its life a bit.

    Let's start with the purchase itself. You can import such a lamp from China for as little as around £10. In our country, it is slightly more expensive. The whole thing can often be found under the name 'LED bulb', although this is just a colloquial name and is not correct. The unit shown here normally works with Tuya. Its designation is TY-E14-220VB*AT, WiFi LED Bulb RGB CW WW 5W AC. The RGB CW designation indicates the availability of colours and white temperatures. The second model name of the product is C3009.
    Box of Tuya WiFi LED bulb TY-E14-220VB*AT with product image and technical icons Black cardboard box with a label identifying Tuya WiFi LED bulb model TY-E14-220VB*AT. Smart LED bulb WiFi packaging, model C3009, showing functions and manufacturer details. .
    I first remove the dome, often just pulling harder, and then the LED board.
    Disassembled LED smart bulb: casing, LED board, and dome cover placed on a light surface. .
    In this case there are five types - red, green, blue, warm and cold white. They are controlled by the BP5758.
    Close-up of an LED circuit board with BP5758 controller and multicolored SMD LEDs. .
    The BP5758 is a constant-current LED controller. It is distinguished by its control via an I2C-like protocol (without addressing), which reduces the number of lines needed from the MCU - just a data line and a clock, no five PWMs are needed.
    Application schematic of BP5758D IC showing AC input, power supply, microcontroller, and five LED channels (RGB, warm white, cool white). .
    Our Polish firmware which I will upload already BP5758 supports.
    Below we have the board with the power supply and WiFi module:
    Close-up of the LN882HK WiFi module inside an LED light bulb housing. .
    The WiFi module is based on the LN882H, which our firmware also supports:
    LN882H datasheet, leads, WiFi modules (LN882HK, LN882HKx, LN882), firmware .
    Now this board needs to be removed. First we remove the thread:
    Disassembled LED bulb housing with exposed red wire and stripped neutral wire. .
    Then we free the second wire:
    Close-up of an LED bulb base with exposed wires after contact plate removal. .
    Done, now just don't lose the parts:
    Disassembled Tuya LED smart bulb with dome, wires, socket, and taped circuit component laid out. .
    I don't recommend throwing away the tape either, unless you give it your own - it protects against shorting to the housing.
    SY-E14-WIFI-BL-5L PCB with labeled pins and attached wires.
    PCB designation: SY-E14-WIFI-BL-5L. The paths from the power supply and the two-wire bus are also marked.
    Close-up of an LED lamp power supply board with visible electrolytic capacitors, bridge rectifier, and a connected wire. .
    The rectifier bridge can be seen:
    Close-up of the LED bulb control board with WiFi module, antenna, and power components. .
    The antenna and power supply circuit - BP2525 - are visible next to it.
    Close-up of a PCB with a WiFi module, antenna, and BP2525 power IC. .
    And here are the programming pads....
    Close-up of a PCB with visible programming pads and module connector for WiFi. .
    You have to solder out the WiFi module. Otherwise you can't get to the pads. My method for desoldering is flux and braid - once the binder is removed, the module falls out by itself.
    Close-up of the SY-E14-WIFI-BL-5L PCB with marked SDA, SCL, V+, and V- signal labels. .
    I then apply the binder to the pads - easier to solder:
    Close-up of a PCB from WiFi module of a Tuya LED bulb with programming pads exposed. .
    Marked leads:
    Photo of LN882H WiFi module with labeled programming pins: BOOT, RX, TX, GND, and 3.3V. .
    You will need a USB to UART converter for programming. Boot is connected to ground.
    The cables are also taken before soldering.
    Close-up of a PCB with connected wires, prepared for programming a WiFi module. .
    The whole circuit - an external 3.3V LDO is better than the power supply from the USB to UART converter, the WiFi module may not boot if the current capacity is missing.
    USB-UART adapter connected to a breadboard with wires leading to a Wi-Fi module removed from an LED lamp. .
    We used to flash the LN882H like this:


    .
    Now our flasher supports it:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    So, first batch backup:
    Screenshot of the BK7231 GUI Flash Tool after completing the firmware read from an LN882H module. .
    Then uploading the OBK - the flasher itself can download the binary file from Github:
    BK7231 Easy UART Flasher window showing firmware being written to a WiFi module LN882H. .
    Then we disconnect the boot from ground and cut the power for a while. Then the AP should appear:
    WiFi network list showing “OpenLN882H_C25E1088” as an available network. .
    You can configure our WiFi and device pins:
    Screenshot of OpenLN882H control panel showing device status and configuration buttons. .
    You can set the pins manually:
    Screenshot of pin configuration in the OpenLN882H_C25E1088 interface showing BP5758D control setup .
    The easiest way is to upload the OBK template:
    Code: JSON
    Log in, to see the code
    .
    Instructions for uploading the template:


    .
    Now it remains to explain the commands from the template. Normally they are edited in the "Short startup command" in the options:
    - BP5758D_Current 3 3 sets the current of the LEDs, separately RGB and separately CW. This reduces the heating of the whole and extends the life of the electronics
    - LED_Map sets the colour order - this can be any colour order, and the firmware expects RGBCW
    - PowerSave 1 enables power saving
    E14 LED bulb next to a smartphone showing the OpenBK firmware interface and the product box. .
    Selecting the current via BP5758D_Current allows us to decide between the lifetime and the level of brightness we want.
    The final result (when put together):
    A red-glowing LED bulb next to a smartphone showing a lighting control web interface. Smartphone displaying control interface for OpenLN882H WiFi LED lamp next to a lit LED bulb and its box. Smartphone showing a web interface for controlling a modified LED bulb with LN882H module, next to a glowing bulb and its packaging. .
    WiFi-controlled LED bulb with custom firmware and smartphone displaying configuration interface. A green-glowing Tuya LED bulb next to a smartphone showing the OpenLN882H web interface for LED brightness and color control. Smartphone screen showing LED bulb control interface with custom firmware, next to a glowing blue LED lamp. .
    It remains to connect with HA, this is described in our tutorial:https://www.youtube.com/watch?v=pkcspey25V4

    In summary, this is how to free the Tuya LED light from the cloud and pair it with the Home Assistant. The biggest difficulty this time was disassembling the whole thing, but it managed to do so without destroying it and after assembling the whole thing still works. There is also a potential problem with the product overheating, but this is already occurring from the factory, and we can only improve it - by reducing the LED current through a suitable command. Without this we will quickly reach and 100°C:
    Web interface of OpenBK firmware for LN882H WiFi module, showing LED settings and chip temperature at 94.3°C. .
    So much so that we now have control over this and can reduce the segment current if necessary. We decide for ourselves how much the LEDs will heat up. This is a much greater level of control than what the manufacturer's application offered us, so it was probably worth it....
    In the next part I'll try to run animations on a few of these LEDs - I'll use the DDP protocol for this .
    PS: Repository of the firmware used:
    https://github.com/openshwprojects/OpenBK7231T_App

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 12670 posts with rating 10470, helped 593 times. Been with us since 2014 year.
  • ADVERTISEMENT
📢 Listen (AI):
ADVERTISEMENT