logo elektroda
logo elektroda
X
logo elektroda

PC321-W-TY 3 Phase Power Meter: OpenBeken Compatibility with BK7231N MCU?

hojnikb 4272 23
Best answers

Can this BK7231N-based PC321-W-TY 3-phase power meter be made compatible with OpenBeken?

Yes — it can be used with OpenBeken as a TuyaMCU device once the dpIDs are mapped [#21264823] The thread mapped the main readings as voltage 101/111/121, current 102/112/122, power 103/113/123, power factor 104/114/124, combined power 133, frequency 135, and total energy 131 [#21269556][#21273326] A working OBK setup was posted using `startDriver TuyaMCU`, `tuyaMcu_setBaudRate 115200`, `tuyaMcu_defWiFiState 4`, and `linkTuyaMCUOutputToChannel` entries for those values [#21273326] If you are flashing the WiFi module itself, you need to disconnect the UART link between the WiFi module and the MCU first [#21305803]
Generated by the language model.
ADVERTISEMENT
  • #1 21264396
    hojnikb
    Level 12  
    Posts: 45
    Rate: 2
    So I got this 3 phase energy meter.

    It appears to be based around CBU-IPEX, so BK7231N MCU. Energy monitoring chip is ATT7022EU and GD32E230, some sort of STM32 clone (doing what exactly??) and 25VQ32BSIG 4MB SPI memory chip (for BK7231N maybe?).

    Strange little device. Any ideas if this could be made compatible with OpenBeken?

    Interior view of a 3-phase energy meter showing electronic components. Interior view of a 3-phase energy meter with visible electronic components. View of the interior of a 3-phase energy meter with visible electronic components. Close-up of the internal circuit board of a 3-phase energy meter with visible electronic components. Back of a 3-phase energy meter with manufacturer label.
  • ADVERTISEMENT
  • #2 21264823
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14439
    Help: 650
    Rate: 12407
    Well, isn't it a TuyaMCU device? TuyaMCU is more or less compatible with OBK, once you know the meaning of dpIDs...
    https://www.elektroda.com/rtvforum/topic4038151.html
    Helpful post? Buy me a coffee.
  • #3 21265112
    hojnikb
    Level 12  
    Posts: 45
    Rate: 2
    p.kaczmarek2 wrote:
    Well, isn't it a TuyaMCU device? TuyaMCU is more or less compatible with OBK, once you know the meaning of dpIDs...
    https://www.elektroda.com/rtvforum/topic4038151.html


    I figured that mcu itself should be compatible, but I'm not too sure about the actual functionality of power measurement. as I haven't seen any profiles for this specific device.

    I will check this thread, if I can figure it out.
  • #4 21265128
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14439
    Help: 650
    Rate: 12407
    Can you share 2MB flash backup?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 21265237
    hojnikb
    Level 12  
    Posts: 45
    Rate: 2
    p.kaczmarek2 wrote:
    Can you share 2MB flash backup?

    Absolutely, I will hook up the device to serial and try to backup.
  • #6 21266852
    hojnikb
    Level 12  
    Posts: 45
    Rate: 2
    p.kaczmarek2 wrote:
    Can you share 2MB flash backup?


    I'm trying to backup the device using easy uart flasher, but with no success. I've directly soldered TX1 and RX1 to my usb-serial and did CEN pin short to ground, but unfortunately, it does not get detected by utility.

    Am I missing something?

    Added after 44 [minutes]:

    Perhaps there is something connected to the TX1/RX1 pins? I will attempt to desolder the module.

    Interestingly, there are two sets of rx/tx pin headers on the motherboard.

    Added after 20 [minutes]:

    Yep, this was exactly the culprit. After desoldering the module, reading was easy.

    Attached is dump of the flash. PC321-W-TY... DUMP .bin (2 MB)You must be logged in to download this attachment.
  • Helpful post
    #7 21267501
    divadiow
    Level 38  
    Posts: 4874
    Help: 425
    Rate: 865
    some extra info.
    boot log (from dev board flash of dump - ie MCU of original device missing)

    Code: Text
    Log in, to see the code


    and the extracted info from storage area in binary

    Code: JSON
    Log in, to see the code
  • #8 21269556
    hojnikb
    Level 12  
    Posts: 45
    Rate: 2
    I played around with the device a bit more.

    JSON @divadiow provided was very helpful for mapping at least some of the IDs

    This is what I was able to map:

    //Voltage L1
    setChannelType 1 Voltage_div10
    linkTuyaMCUOutputToChannel 101 val 1
    
    //Voltage L2
    setChannelType 2 Voltage_div10
    linkTuyaMCUOutputToChannel 111 val 2
    
    //Voltage L3
    setChannelType 3 Voltage_div10
    linkTuyaMCUOutputToChannel 121 val 3
    
    //Current L1
    setChannelType 7 Current_div1000
    linkTuyaMCUOutputToChannel 102 val 7
    
    //Current L2
    setChannelType 8 Current_div1000
    linkTuyaMCUOutputToChannel 112 val 8
    
    //Current L3
    setChannelType 9 Current_div1000
    linkTuyaMCUOutputToChannel 122 val 9
    
    //Power L1
    setChannelType 10 Power
    linkTuyaMCUOutputToChannel 103 val 10
    
    //Power L2
    setChannelType 11 Power
    linkTuyaMCUOutputToChannel 113 val 11
    
    //Power L3
    setChannelType 12 Power
    linkTuyaMCUOutputToChannel 123 val 12
    
    //Power factor L1
    setChannelType 4 PowerFactor_div100
    linkTuyaMCUOutputToChannel 104 val 4
    
    //Power factor L2
    setChannelType 5 PowerFactor_div100
    linkTuyaMCUOutputToChannel 114 val 5
    
    //Power factor L3
    setChannelType 6 PowerFactor_div100
    linkTuyaMCUOutputToChannel 124 val 6
    
    //Combined power
    setChannelType 13 Power
    linkTuyaMCUOutputToChannel 133 val 13


    The values that get spit out make some sort of sense (if my kill-o-watt was to be believed). Not too sure what values represent active or reactive power (would need a power meter capable of displaying these). I was also not able to find frequency value either for each phase or at least all of them.


    And to my understanding IDs 101-107 (and 111-117, 121-127) represent each phase and everything 131 and after must either be combined values or single values for the whole system, but I was not quite able to map all of them as of yet.

    Display of OpenBK7231N data showing voltages, power factors, currents, and powers for different phases.

    Added after 24 [minutes]:

    dpID 135 might represent frequency, but channelTypes doesn't seem to have a frequency without a divider (just divider 10 or 100).

    Added after 1 [hours] 37 [minutes]:

    Played around a bit more;

    dpID 132 could be combined reactive power. dpID 136 seems to be a value around 400 (jumping up and down a few points) and is not affected by removing current clamp. Not to sure about this one.

    All other values i exposed are sitting at zero currently. Might be my testing methodology, as i'm using a single phase and combining the voltages and putting current clamp on only one phase (so all phases should have equal power/current etc).
  • #9 21273326
    hojnikb
    Level 12  
    Posts: 45
    Rate: 2
    Here's my final config i was able to come up with;

    There's still some missing data like reactive power, but for now it should do as a basic power meter.

    // Start TuyaMCu driver
    startDriver TuyaMCU
    // set TuyaMCU baud rate
    tuyaMcu_setBaudRate 115200
    // set TuyaMCU default wifi state 0x04, which means "paired",
    // because some TuyaMCU MCUs will not report all data
    // unless they think they are connected to cloud
    tuyaMcu_defWiFiState 4
    
    //Voltage L1
    setChannelType 1 Voltage_div10
    linkTuyaMCUOutputToChannel 101 val 1
    
    //Voltage L2
    setChannelType 2 Voltage_div10
    linkTuyaMCUOutputToChannel 111 val 2
    
    //Voltage L3
    setChannelType 3 Voltage_div10
    linkTuyaMCUOutputToChannel 121 val 3
    
    //Current L1
    setChannelType 7 Current_div1000
    linkTuyaMCUOutputToChannel 102 val 7
    
    //Current L2
    setChannelType 8 Current_div1000
    linkTuyaMCUOutputToChannel 112 val 8
    
    //Current L3
    setChannelType 9 Current_div1000
    linkTuyaMCUOutputToChannel 122 val 9
    
    //Power L1
    setChannelType 10 Power
    linkTuyaMCUOutputToChannel 103 val 10
    
    //Power L2
    setChannelType 11 Power
    linkTuyaMCUOutputToChannel 113 val 11
    
    //Power L3
    setChannelType 12 Power
    linkTuyaMCUOutputToChannel 123 val 12
    
    //Power factor L1
    setChannelType 4 PowerFactor_div100
    linkTuyaMCUOutputToChannel 104 val 4
    
    //Power factor L2
    setChannelType 5 PowerFactor_div100
    linkTuyaMCUOutputToChannel 114 val 5
    
    //Power factor L3
    setChannelType 6 PowerFactor_div100
    linkTuyaMCUOutputToChannel 124 val 6
    
    //Combined power
    setChannelType 13 Power
    linkTuyaMCUOutputToChannel 133 val 13
    
    //Frequency
    setChannelType 14 ReadOnly
    linkTuyaMCUOutputToChannel 135 val 14
    
    
    //kWh Total
    setChannelType 18 EnergyTotal_kWh_div100	
    linkTuyaMCUOutputToChannel 131 val 18
    
    
  • #10 21305696
    ipasitt
    Level 3  
    Posts: 13
    >>21269556
    Hi, I also have this similar unit. Would you please advise how I can flash the CBU-IPEX chip? I tried BK7321flasher but failed, and tuya-cloudcutter was unsuccessful too.
  • #11 21305803
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14439
    Help: 650
    Rate: 12407
    You need to disconnect UART connection between WiFi module and the MCU in order to flash TuyaMCU device. It's been mentioned in our TuyaMCU guide here:
    TuyaMCU flashing, setup and configuration guide - configure dpIDs for Home Assistant
    Helpful post? Buy me a coffee.
  • #12 21308059
    hojnikb
    Level 12  
    Posts: 45
    Rate: 2
    p.kaczmarek2 wrote:
    You need to disconnect UART connection between WiFi module and the MCU in order to flash TuyaMCU device. It's been mentioned in our TuyaMCU guide here:
    TuyaMCU flashing, setup and configuration guide - configure dpIDs for Home Assistant


    Hi!

    Would you know why the device is rebooting itself a few times a day? That itself wouldn't be a problem, but the totalKWh goes to zero for that time and messes up daily calculation.
  • ADVERTISEMENT
  • #13 21312184
    hojnikb
    Level 12  
    Posts: 45
    Rate: 2
    it appears that the reason is watchdog reset --- why would a device like this be freezing multiple times a day?
  • ADVERTISEMENT
  • #14 21312204
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14439
    Help: 650
    Rate: 12407
    Wait, do you mean OBK or TuyaMCU totalKWh ? It's not kept between restarts?
    Helpful post? Buy me a coffee.
  • #15 21312214
    hojnikb
    Level 12  
    Posts: 45
    Rate: 2
    p.kaczmarek2 wrote:
    Wait, do you mean OBK or TuyaMCU totalKWh ? It's not kept between restarts?


    I'm assuming tuyaMCU, as this is a tuya based device. The value from the channel, that monitors totalKWh goes to zero after a reboot and comes back to real value after 5-10 seconds after boot.
  • #16 21416764
    crg1darkspr1te
    Level 9  
    Posts: 22
    Help: 2
    Rate: 12
    I recently got one of these units for testing and I was able to dump the GD32E230 chip, I have provided that dump along with data sheets and SVD file for the same.
    Anyone wishing to restore one of these units to full factory or replacing the GD32E230 chip can use the files enclosed.
    I will start reverse engineering over the weekend I think. Already started
    Some info:
    Bootloader 0x08000000 - 0x08003fff
    App program 0x08004000 - 0x0800dfff

    command checking 0x08008390
    app strings 0x0800d774


    darkspr1te
    Attachments:
    • power_meter.7z (8.46 MB) You must be logged in to download this attachment.
  • #17 21417409
    crg1darkspr1te
    Level 9  
    Posts: 22
    Help: 2
    Rate: 12
    So I have identified a lot of the routines so far, bootloader for app start, updating app area, controlling boot order/failure modes.
    The SPI flash is used by the App program to store the updates for the benken chip as well as a copy of the App program and crc checks
    MCU updates can be done in two ways, storing on SPI flash and reboot checks flash for update (crc checks involved) or via direct wifi connection (data is saved in sram and flash, MCU is rebooted and benken sends the update to bootloader which stores it in flash, checks crc and then flashes APP section.

    in app mode the spi flash is used to store logs etc, updates for mcu and benken can be sent via the update command 0x10 (spi then update via mcu bootloader ) & 0xb (mcu bootloader ) either mode 0x1 (spi mcu app area benken) - 0x2 (direct - mcu app area only )
    full command list support for v2.0.2
    
    00 heartbeat
    01 query product info 
    02 query working mode 
    03 wifi status 
    04 reset config
    05 reset config wifi 
    06 send command list
    08 query DP status 
    10 (0xa) set OTA type ( APP mcu to spi, reboot and flash, APP mcu to spi and flash BENKEN, APP mcu to spi for app benken then reboot and bootloader flash both ) 
    0xb update transfer data 
    0xe wifi scan parameters
    0x34 get/set  system time/date/weather
    



    also find attached the manual for the ADC
    sample arduino code for adc

    Transformer monitor arduino

    attached files,
    1 x ghidra v11 reversed file
    1 x manual on power adc

    darkspr1te
    Attachments:
    • 2304140030_HiTrend-Tech--Shanghai-ATT7022EU-N_C81610.pdf (1.32 MB) You must be logged in to download this attachment.
    • pc321-w-ty_power_meter.bin.gzf.7z (447.95 KB) You must be logged in to download this attachment.
  • #18 21420340
    divadiow
    Level 38  
    Posts: 4874
    Help: 425
    Rate: 865
    >>21416764

    thanks, I have assimilated your full GD32E230 dump into my collection here, I hope that's OK

    https://github.com/divadiow/TuyaMCUBins/tree/main

    Tuya_PC321-W-TY_GD32E230_2.0.2.bin

    this compliments the OTA v2.0.1 update binary here https://github.com/divadiow/TuyaMCUBins/tree/main/OTA

    Added after 24 [minutes]:

    also interesting that the BK7231N firmware now gets an update to v3.1.28 which uses the latest SDK version I've seen

    Code: Text
    Log in, to see the code


    Device software update screen indicating new versions for the main module and MCU module.

    Added after 2 [minutes]:

    only in November was it offering an update to v2.1.17


    Device update screen showing information about a new software version.
  • #19 21420879
    crg1darkspr1te
    Level 9  
    Posts: 22
    Help: 2
    Rate: 12
    That's a neat collection you have there, I own an AT4P (dozen actually) and was wondering if you knew what the MCU instruction set was? Does not look like ARM so

    Having an update file to compare to the actual written bin is handy as it allows me to confirm the update mech in my own code.

    Keep up the good work, if I come across any more I shall share as it's a very handy resource for repair and learning.

    darkspr1te
  • #20 21420915
    divadiow
    Level 38  
    Posts: 4874
    Help: 425
    Rate: 865
    crg1darkspr1te wrote:
    was wondering if you knew what the MCU instruction set was? Does not look like ARM so

    hmm, unsure, but isn't the GD32E23x Series:

    Quote:
    Based on the Arm® Cortex® -M23 core with main frequency of up to 72MHz.


    so must be ARM?

    Added after 1 [minutes]:

    crg1darkspr1te wrote:
    if I come across any more I shall share as it's a very handy resource for repair and learning.

    yes, please do. I do like collecting things :D
  • #21 21420917
    crg1darkspr1te
    Level 9  
    Posts: 22
    Help: 2
    Rate: 12
    Never mind, I noticed it used the same code style as the atorch gr2p and after checking photos I see it's a ch573 on riscv core, more specifically RV32IMAC which is supported in ghidra
    so if you see a lot of 0x6f and 3 bytes after that seems to be risc-V
    after dragging the AT4P file into ghidra and setting the right cpu it is decompiling nicely.


    darkspr1te
  • #22 21529481
    pheyi36hayo
    Level 1  
    Posts: 1
    I have one of this gadget. Recently, the device is not powering on completely.

    The green or blue light isn't coming on at all. And, when I press down the reset button, the red light just blinks 3 times.

    I have traced the fault to some capacitor and diode.
    CD3, C1, C4 and Diode (D3). They are all short. (Although, I still don't understand what could I have caused the issue. The problem probably started from CD3.

    What I need now is, can anyone help identify the rating of this component so I can replace with the appropriate parts.
    Printed circuit board (PCB) with electronic components inside a casing.
    Close-up view of a circuit board inside an electronic device with visible relays, components, and wires.
  • #23 21530121
    crg1darkspr1te
    Level 9  
    Posts: 22
    Help: 2
    Rate: 12
    The marking on that component CD3 are F45Z 680 10,
    I am guessing that's 680uF at 10V and it's a polymer type capacitor, as those parts are on the SMPS side I would say a surge may have caused it or a failed cap from heat could have also taken out D1 but that's just a guess.
    The fine folks on EEVBLOG would know,

    darkspr1te

Topic summary

✨ The PC321-W-TY 3-phase power meter is based on the CBU-IPEX module featuring a BK7231N MCU, with an ATT7022EU energy monitoring chip, a GD32E230 MCU (likely an STM32 clone), and a 25VQ32BSIG 4MB SPI flash memory. The device is identified as a TuyaMCU-based product, which generally shows compatibility with OpenBeken (OBK) firmware, provided the correct dpID mappings are known. Users successfully extracted the 2MB flash by desoldering the module to bypass UART interference and shared boot logs and firmware dumps. A partial OpenBeken configuration was developed, mapping voltage, current, power, and power factor channels for all three phases, though some parameters like reactive power remain unmapped. Flashing the BK7231N requires disconnecting UART between WiFi and MCU modules. The device experiences watchdog resets causing reboots and temporary zeroing of total kWh readings, attributed to TuyaMCU behavior. The GD32E230 MCU firmware and bootloader have been dumped and reverse-engineered, revealing update mechanisms via SPI flash or direct WiFi connection, with command sets documented. The GD32E230 MCU uses an ARM core, while related devices like AT4P use a RISC-V core. Hardware faults such as capacitor and diode failures (e.g., CD3 capacitor marked F45Z 680 10, likely 680µF 10V polymer) have been reported, with repair advice sought. Tuya has released GD32E230 MCU firmware update version 2.1.0 for this model, available on GitHub. The community maintains firmware and update collections to aid repair, reverse engineering, and custom firmware development.
Generated by the language model.

FAQ

TL;DR: With 115200 baud and the right dpIDs, the PC321-W-TY can work with OpenBeken as a TuyaMCU meter. As one expert put it, "once you know the meaning of dpIDs" it becomes usable for 3-phase voltage, current, power, power factor, frequency, and total kWh. This FAQ helps owners flash, map, and stabilize the device. [#21264823]

Why it matters: This thread turns an undocumented Tuya 3-phase meter into a practical OpenBeken setup with a working script and known flashing pitfalls.

Method What the thread shows Main limitation
Easy UART Flasher Works after isolating the WiFi module UART Fails if the main MCU still loads TX/RX
BK7231 flasher tools One user reports failure on this unit Same UART isolation issue can block flashing
Tuya Cloudcutter Tried and failed on this unit No success reported for this model

Key insight: Treat the PC321-W-TY as a TuyaMCU device, not as a native OpenBeken power-meter profile. The successful path was: isolate UART, flash BK7231N, then map the Tuya dpIDs manually.

Quick Facts

  • The meter uses a CBU-IPEX WiFi module with BK7231N, an ATT7022EU metering IC, a GD32E230 MCU, and a 25VQ32BSIG 4 MB SPI flash chip. [#21264396]
  • The extracted Tuya data shows baud 115200, device software version 2.0.2, and a dpID block covering 101-139, which matches per-phase and combined measurements. [#21267501]
  • The confirmed OpenBeken mapping includes L1/L2/L3 voltage on dpIDs 101/111/121, current on 102/112/122, power on 103/113/123, and power factor on 104/114/124. [#21273326]
  • The working script maps combined power to dpID 133, frequency to 135, and total energy to 131 using EnergyTotal_kWh_div100. [#21273326]
  • Reverse-engineering notes place the GD32E230 bootloader at 0x08000000-0x08003fff and the app at 0x08004000-0x0800dfff, with MCU updates staged through external SPI flash. [#21416764]

How can I make the PC321-W-TY 3-phase power meter work with OpenBeken when it uses a CBU-IPEX module with a BK7231N MCU?

Make it work by treating it as a TuyaMCU device and mapping its dpIDs in OpenBeken. The successful setup used startDriver TuyaMCU, tuyaMcu_setBaudRate 115200, and tuyaMcu_defWiFiState 4, then linked phase and total measurements to channels. That gave working 3-phase voltage, current, power, power factor, frequency, and total kWh on this meter. [#21273326]

What is a TuyaMCU device, and how does it affect OpenBeken compatibility on the PC321-W-TY power meter?

A TuyaMCU device uses a separate main MCU to handle functions while the WiFi chip passes commands and telemetry. "TuyaMCU" is a device architecture that splits control between a host MCU and a WiFi module, using dpIDs as structured data points. On the PC321-W-TY, that means OpenBeken compatibility depends less on a ready-made profile and more on identifying the correct dpIDs for each measurement. [#21264823]

How do I back up the flash on a BK7231N-based CBU-IPEX module if Easy UART Flasher does not detect the device at first?

Back up the flash by isolating the WiFi module UART before retrying. 1. Solder to TX1 and RX1 and use the CEN-to-ground boot method. 2. If Easy UART Flasher still detects nothing, remove the module or disconnect the board-side UART load. 3. Retry the read; in this case, the dump succeeded immediately after desoldering the module. [#21266852]

Why do I need to disconnect or desolder the UART connection between the WiFi module and the main MCU before flashing a TuyaMCU device?

You need to disconnect it because the main MCU can hold or interfere with TX1 and RX1. One user could not detect the BK7231N until the CBU-IPEX module was desoldered, and flashing guidance later confirmed that TuyaMCU devices require the UART link to the main MCU to be broken first. Without that isolation, flash tools may fail even when wiring is correct. [#21305803]

Which Tuya dpIDs on the PC321-W-TY correspond to voltage, current, power, power factor, combined power, frequency, and total kWh in OpenBeken?

The confirmed mapping is: voltage L1/L2/L3 = 101/111/121, current L1/L2/L3 = 102/112/122, power L1/L2/L3 = 103/113/123, power factor L1/L2/L3 = 104/114/124, combined power = 133, frequency = 135, and total kWh = 131. Those values came from a working OpenBeken configuration, not a guess. Combined reactive power was still unresolved there. [#21273326]

What is the correct OpenBeken TuyaMCU configuration script for the PC321-W-TY 3-phase meter with BK7231N?

The working script starts TuyaMCU at 115200 baud, sets WiFi state 4, then maps dpIDs 101-124, 131, 133, and 135 to OpenBeken channels. It uses Voltage_div10, Current_div1000, Power, PowerFactor_div100, ReadOnly, and EnergyTotal_kWh_div100. That script was reported as the final usable configuration for basic metering on October 22, 2024. [#21273326]

Why does the total kWh reading on this TuyaMCU-based energy meter drop to zero for a few seconds after reboot and then recover?

It drops because the meter republishes the total after boot instead of keeping that value visible continuously. The reported behavior was a reset to zero, then recovery to the real total after 5-10 seconds. The user explicitly identified the affected value as the channel tied to TuyaMCU total kWh, not a permanent energy loss. [#21312214]

What could cause watchdog resets and repeated daily reboots on a PC321-W-TY running OpenBeken?

The immediate cause reported was a watchdog reset, which means the firmware stopped servicing its watchdog timer. The thread does not confirm a root cause, but the practical symptom was multiple reboots per day and a temporary 0 kWh reading during each restart window. That points to a stability issue in the running firmware or device interaction, not a normal energy-meter feature. [#21312184]

How should I interpret the unknown Tuya dpIDs on this 3-phase meter, such as 132, 135, 136, and 137-139?

Interpret them as partly identified system-wide values, with only some confirmed. dpID 135 behaved like frequency, dpID 132 looked like combined reactive power, and dpID 136 hovered around 400 with small fluctuations and did not change when the current clamp was removed. dpIDs 137-139 remained unmapped in the practical OpenBeken testing shared in the thread. [#21269556]

What's the difference between BK7231 flasher tools, Easy UART Flasher, and Tuya Cloudcutter for flashing a CBU-IPEX/BK7231N device?

The thread shows a difference in outcome, not a full feature comparison. Easy UART Flasher worked only after UART isolation, BK7231 flasher tools failed for another user, and Tuya Cloudcutter also failed on this unit. For this specific PC321-W-TY, wired UART flashing with the module isolated is the only successful method reported. [#21305696]

How can I verify whether dpID 135 is frequency and choose the right OpenBeken channel type when there is no obvious non-divided frequency type?

Verify it by observing whether dpID 135 stays near mains frequency while load changes minimally affect it. The tester first suspected dpID 135 was frequency, then used setChannelType 14 ReadOnly and linkTuyaMCUOutputToChannel 135 val 14 in the final script because no suitable non-divided frequency type was available. That is a workable fallback when display correctness matters more than unit labeling. [#21273326]

What is the role of the GD32E230 MCU in the PC321-W-TY, and how does it interact with the ATT7022EU metering chip and the BK7231N WiFi module?

The GD32E230 acts as the main controller between metering hardware and the Tuya WiFi side. The board inspection showed ATT7022EU for energy measurement, GD32E230 as the local MCU, and BK7231N in the CBU-IPEX as the network module. Reverse-engineering later showed the GD32E230 also handles boot, updates, and command processing, which explains why this meter behaves like a TuyaMCU design. [#21417409]

How does the PC321-W-TY firmware update process work between the GD32E230, the BK7231N, and the external SPI flash?

The update flow uses the GD32E230 app, the BK7231N link, and external SPI flash as a staging area. Reverse-engineering found two paths: one stores update data in SPI flash and applies it after reboot with CRC checks, and another sends data directly over WiFi, buffers it in SRAM and flash, then reboots and lets the bootloader program the app area. Command 0x10 selects OTA type, and 0x0B transfers update data. [#21417409]

What is ATT7022EU, and what kind of active, reactive, and multi-phase energy measurements is it likely handling in this meter?

ATT7022EU is the meter’s dedicated energy-measurement IC, and it is the most likely source of the per-phase and combined electrical data exposed through Tuya dpIDs. "ATT7022EU" is a metering chip that measures electrical quantities, exposing multi-phase values such as voltage, current, power, and energy for a host MCU to process. The thread’s mapped outputs include three-phase voltage, current, power factor, combined power, and total kWh, which fits that role. [#21264396]

How do I identify replacement values for failed parts like CD3, C1, C4, and D3 on a dead PC321-W-TY power meter power supply board?

Start with the visible package marking and replace only with the same function and rating class. In the thread, the failed part marked CD3 was read as “F45Z 680 10”, and the proposed interpretation was a 680 µF, 10 V polymer capacitor on the SMPS side. The same reply warned that surge damage or heat-related capacitor failure could also have damaged the nearby diode. [#21530121]
Generated by the language model.
ADVERTISEMENT