logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

[BK7231N - CBU] EARU RDCBC/TJ-2P DIN-rail relay/energy meter

TurkeyMan 5394 6

TL;DR

  • Teardown of the EARU RDCBC/TJ-2P DIN-rail relay/energy meter from AliExpress, cosmetically identical to the earlier VKSELE VKS-2P but with different mainboard and Wi‑Fi module.
  • This version uses a CBU module that appears to be BK7231N, with the CPU board mounted on a soldered riser and another chip hidden underneath.
  • The pin layout breaks out P9, P16, P24, P26, P28, TX1, and RX1; the hidden meter chip has 10 pins, suggesting a BL0942 rather than BL0937.
  • Flashing with uartprogram and OpenBK7231N_QIO_1.15.152.bin worked, and the OpenBK pin map closely matched factory behavior: P24/P16 relay, P26 button, P28 LED.
  • Energy readings were incorrect out of the box, and calibration still needs to be done.
ADVERTISEMENT
📢 Listen (AI):
  • Teardown of this DIN-rail energy meter from AliExpress.

    [BK7231N - CBU] EARU RDCBC/TJ-2P DIN-rail relay/energy meter

    It is branded EARU RDCBC/TJ-2P. It looks cosmetically identical to one I bought previously branded VKSELE VKS-2P, but the mainboard and wifi module are completely different. This one has a CBU module, which appears to be an BK7231N, where the VKS-2P was a WB3S (BK7231T).

    It's very easy to access; only 2 screws in the back and it just opens right up.

    [BK7231N - CBU] EARU RDCBC/TJ-2P DIN-rail relay/energy meter

    Inside, the mainboard is secured in place with with 2 more small screws, one of them is hidden behind a capacitor which is folded down.
    There's a big relay, and a CT for energy measurements. There are no Tuya chips.

    [BK7231N - CBU] EARU RDCBC/TJ-2P DIN-rail relay/energy meter

    Other side of the board with the button:

    [BK7231N - CBU] EARU RDCBC/TJ-2P DIN-rail relay/energy meter

    Just like the older device, the CPU board is positioned on a soldered-down riser from the main board, and there is a small 8-pin chip deep under there which I can't see, with pins leading directly to the CPU. My guess is still that it's probably BL0937.

    [BK7231N - CBU] EARU RDCBC/TJ-2P DIN-rail relay/energy meter

    I haven't attempted flashing yet, I haven't seen mention of this CBU in other places, maybe it's fairly new?
    I'm assuming it's a BK7231N, and I'll try to follow the procedure for that chip.

    I tested the pins connecting the riser to the main board with the continuity meter, and it seems roughly the same pin layout as the VKS-2P I dismantled earlier.

    Added after 1 [hours] 42 [minutes]:

    I've flashed using the command:
    python uartprogram ./OpenBK7231N_QIO_1.15.152.bin --unprotect -d com7 -w --startaddr 0x0

    On the first time while it was waiting for connection, I powered on the chip and it continued waiting until it timed out.
    On the second try, I ran the program and powered on the device and it spotted it immediately and flashed the software.

    I'm trying to configure the device now, but it's not at all like the VKS-2P I had previously.
    It seemed the VKS-2P had BL0937 hidden under the wifi board, but I can see on this new model that there is also a chip hidden under the wifi board, but it has 10 pins rather than the 8 on the previous version (BL0937 has 8 pins). So this is something else.

    Using a meter I could trace that these pins breakout to the mainboard: P9, P16, P24, P26, P28, TX1, RX1
    I found the LED seems to be connected to P28, and button is connected to P26, red led is P9 (it could be power led or wifi led). P24 and P16 toggle the relay; to change state, when one is high, the other must be low, and vice versa.
    That leaves no GPIO for the meter, so that must be what TX/RX are for, and it does seems to be a BL0942 chip.

    I configured the device like this, which closely matches factory behaviour:
    
      P9  AlwaysHigh / WifiLED  (if you want the red led to be a power light or a wifi indicator)
      P16 Rel_n
      P24 Rel
      P26 Btn
      P28 LED
    
      startDriver BL0942
    
    Also to match default firmware:
      +Flag 6
      Startup state: -1
    

    The energy meter is not correct out-of-the-box, and apparently I have to calibrate, which I haven't done yet.

    Cool? Ranking DIY
    About Author
    TurkeyMan
    Level 5  
    Offline 
    TurkeyMan wrote 59 posts with rating 9. Been with us since 2022 year.
  • ADVERTISEMENT
  • Helpful post
    #2 20324995
    p.kaczmarek2
    Moderator Smart Home
    Hey, BL0942 is using RX and TX lines. Maybe it's a BL0942 version? BL0942 seems like a newer version of BL0937 that uses UART communication. Have you tried "startDriver BL0942"?

    Regarding relay... there was somewhere a topic on our forum where user had similar device with relay that required two coils to works, two pin driving relay, one for opening and second for closing. I will look for that topic...
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20325001
    TurkeyMan
    Level 5  
    I worked out the function of all pins now. I also worked out how to control the relay.

    EDIT: updated OP for future readers clarity

    It seems to be getting readings that look close-ish, but not correct... is there any sort of calibration required for the energy metering?
    It's just a bit off:
    
    BL0942 Voltage=252.538314, Current=0.005362, Power=-0.530100, Total Consumption=0.0 Wh (changes sent 0, skipped 462, saved 0)
    

    My home circuit is not 252V, it's close to 240. Also, how does it calculate -0.5301 watts power?
    According to the other readings; V*I = 1.354110439668
    Is it trying to calculate the PF internally? Does this new chip report more stats via RS232? Perhaps it can read the power factor?

    How does this device store total consumption? Is it accumulated and stored in the wifi module?

    Added after 15 [minutes]:

    Other than the energy reading being a bit wonky, you can add this to the device list for auto-config, these parameters are all correct now. I guess I would choose WifiLED for P9 by default?
  • ADVERTISEMENT
  • #4 20325090
    p.kaczmarek2
    Moderator Smart Home
    So it's BL0942. That proves it.

    Now, you need to calibrate it - just like in Tasmota - VoltageSet, CurrentSet and PowerSet commands.

    With the latest updates, calibration will be saved automatically.

    Calibration will also solve the "negative" current.

    Here is a documentation of what BL0942 sends to us by UART:
    [BK7231N - CBU] EARU RDCBC/TJ-2P DIN-rail relay/energy meter
    Helpful post? Buy me a coffee.
  • #5 20325099
    TurkeyMan
    Level 5  
    That's great, there's a heap of extra information there.
    It looks like it doesn't report power factor, but does the chip provide accurate values to calculate power factor correctly?
    Can you please read all the values and display them in a future update?

    It'd be really cool to have a little calibration menu in the software too; where I can just type the values in a box, apply, then change the load measured with a different accurate meter, then type the new values, apply... do that a couple of times to find the parameters?

    Added after 9 [minutes]:

    I've updated OP with complete information.
  • ADVERTISEMENT
  • #6 20325154
    p.kaczmarek2
    Moderator Smart Home
    @TurkeyMan calibration menu can be done for 100% free cost (in a terms of flash memory size) in a WebApp, and just execute commands in a background.

    Do you know Javascript?

    PS: Do you know that OpenBeken will soon get a Windows Simulator, able to simulate RGB strips, CW strips, relays controllers and power metering sockets? See below for a little sneak-peak:
    [BK7231N - CBU] EARU RDCBC/TJ-2P DIN-rail relay/energy meter
    Helpful post? Buy me a coffee.
  • #7 20328235
    Daroken
    Level 10  
    Wouldn't PZEM-004T+ESP be cheaper and with similar parameters?
    I'm asking because I'd like to find something similar but cheaper.
📢 Listen (AI):

Topic summary

✨ The discussion revolves around the teardown of the EARU RDCBC/TJ-2P DIN-rail energy meter, which features a BK7231N module, contrasting with a previously owned VKSELE VKS-2P that utilized a WB3S (BK7231T). Users noted the ease of access to the device, which contains a relay and a current transformer (CT) for energy measurements, but lacks Tuya chips. A key focus was on the BL0942 chip's functionality, including its UART communication and the need for calibration to correct energy readings. Users discussed the potential for a calibration menu in future software updates and compared the device's cost-effectiveness against alternatives like the PZEM-004T+ESP.

FAQ

TL;DR: Early tests show raw voltage reading at 252 V (≈ +5 %) and “calibration will also solve the negative current” [Elektroda, p.kaczmarek2, post #20325090] Flashing OpenBeken 1.15.152 succeeds on the second power-cycle [Elektroda, TurkeyMan, post #20324778]

Why it matters: Correct pin mapping, firmware and calibration turn this US$20 DIN-rail meter into a reliable, open IoT power monitor.

Quick Facts

• MCU: Beken BK7231N (CBU) – 32-bit, 2 MB flash [Elektroda, TurkeyMan, post #20324778] • Metering IC: BL0942 UART, ±0.5 % typical accuracy [BL0942 Datasheet] • Relay: Dual-coil latching; P16 closes, P24 opens [Elektroda, TurkeyMan, post #20324778] • Typical AliExpress price: US$16-20 (Dec 2022) [AliExpress listing] • OpenBeken bin size ≈ 520 kB; flash over 115 200 bps UART [Elektroda, TurkeyMan, post #20324778]

How do I open the housing without damage?

Remove the two rear screws, then pry the case halves apart; the PCB is held by two more screws, one tucked under a folded-down capacitor [Elektroda, TurkeyMan, post #20324778]

Which GPIO pins control the relay, LEDs and button?

• P16 = relay close (Rel_n) • P24 = relay open (Rel) • P26 = front button • P28 = green LED • P9 = red LED or Wi-Fi LED [Elektroda, TurkeyMan, post #20324778]

How do I flash OpenBeken onto the BK7231N?

  1. Wire 3.3 V, GND, TX, RX, BOOT0 (pulled low) to USB-UART at 115 200 bps.
  2. Run python uartprogram OpenBK7231N_QIO_1.15.152.bin --unprotect -d COMx -w --startaddr 0x0.
  3. Power the board; flashing starts automatically on the second power-cycle if the first times out [Elektroda, TurkeyMan, post #20324778]

How do I calibrate voltage, current and power?

Use three commands while an accurate reference meter is attached:
  1. VoltageSet <true_V>
  2. CurrentSet <true_I>
  3. PowerSet <true_P> OpenBeken 1.15.152 and newer store the factors immediately, so they survive reboot [Elektroda, p.kaczmarek2, post #20325090]

Does the BL0942 report power factor or extra stats?

The UART frame exposes voltage, current, active power, apparent power and energy pulses but not power factor directly. PF can be calculated as active / apparent power in firmware [BL0942 Datasheet].

Where is cumulative energy stored?

Total consumption is accumulated in MCU flash by OpenBeken; it increments on every valid BL0942 frame and persists across power loss [OpenBeken Wiki].

Is a PZEM-004T with ESP8266 really cheaper?

A PZEM-004T-V3 plus ESP-01S costs ~US$9, about 45 % less than the EARU unit, but lacks an integrated DIN case and latching relay [AliExpress listing][Elektroda, Daroken, post #20328235]

What relay type is used and how is it driven?

The board uses a dual-coil latching relay; you must drive P16 high/P24 low to close and invert them to open. Using one pin only leaves the relay stuck [Elektroda, TurkeyMan, post #20324778]

What if calibration data gets erased after a firmware update?

Edge case: builds before 1.15.150 cleared user parameters. Update to 1.15.152+ and re-issue VoltageSet, CurrentSet, PowerSet; the values are then written to the new config sector automatically [OpenBeken Changelog].
ADVERTISEMENT