logo elektroda
logo elektroda
X
logo elektroda

[BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement

p.kaczmarek2 3321 5
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    Today I will present another Moes Smart Switch single relay module, this time distinguished by the fact that it additionally offers energy measurement. I will analyze its interior (main PCB and modules: WiFi and energy measurement) and show how to change its firmware so that it can be released from the manufacturer's cloud. Finally, I will provide a full product template, this time fully automatically exported from the Tuya configuration in JSON format.

    Purchase, packaging, kit content
    MS-101 was purchased from the Polish shipping service:
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    Initially, the name was SW SWT89, now it's just SW.
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    parameters:
    Quote:

    Power supply: 90-250V AC (50/60Hz)
    Maximum current: 16A
    Maximum load: 3520W
    Dimensions: 88x38x22mm
    White color
    Operating humidity: 5-95%
    WiFi frequency: 2.4 GHz (does not work with 5 GHz)
    Working temperature: -20 -75 degrees

    This is how it looks in the manufacturer's application, which I have not tested:
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    Actual Packing:
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    Kit Contents:
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    QR code for the manual:
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement

    Interior of the MS-101
    As with other products of this type in this case, all you have to do is pry:
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    Immediately inside a positive surprise. Varistor? Or even the X2 capacitor? Many manufacturers do not care a bit about such things, I met such relays only with a fuse resistor ... it is better than usual.
    Then as standard, behind the bridge there are two electrolytic capacitors and a choke between them, then there is probably a converter without galvanic separation, on the PCB you can also see a separate WiFi module and an energy measurement module:
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    This energy measurement module is marked WMetBLi1 V1.0. You can also see the current/voltage shunt resistor, R13, coded R002, which is probably 0.02 ohms.
    The WiFi module is WB2S, BK7231T, it is known:
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    View from above:
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    What does this 5V (and then 3.3V for AMS1117-3.3V) provide for this chip?
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    There is BP2525.
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    Another bottom of the PCB:
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    I desoldered it to take better pictures both modules (to change the firmware, you only need to desolder the WiFi module, and sometimes you can do without it). First we apply the flux, then we collect the tin with a braid:
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    Released modules:
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    So WMetBL11 V1.0 is a module for measuring energy ...
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    This is the module from BL0937, along with the basic "hardware", but not complete, the current measuring resistor (shunt) is on the main PCB:
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement

    Firmware change...
    By default, we use BK7231 Easy GUI Flasher:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    You can rely on our videos:
    https://www.youtube.com/playlist?list=PLzbXEc2ebpH0CZDbczAXT94BuSGrd_GoM
    The module is WB2S (BK7231T):
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    Solder the power supply, RX, TX:
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    Whole layout:
    [BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement
    Verbal description of the pins:
    
    Device seems to be using WB2S module, which is BK7231T chip.
    - Relay (channel 1) on P26
    - WiFi LED on P6
    - Button (channel 1) on P10
    - BL0937 ELE on P7
    - BL0937 VI on P8
    - BL0937 SEL on P24
    

    OBK template:
    Code: JSON
    Log in, to see the code


    Summary
    I have already seen this type of "smart" modules in the version without energy measurement and I was wondering what the second, free slot in the PCB could be for ... I thought it was for another WiFi module, but nothing more wrong - it was always for the module energy measurement, such as presented here in the topic. Anyway, you would rather not have two slots for the WiFI module in the PCB of the relay, because from what I've seen, all these "standing" modules have a very similar, compatible footprint. There is a whole family of them: CB2S, FL_M99_V1, TYWE2S, TYZS6, TW-02, WR2, WB2, WBR2, WR2E, WB2S, WA2, XT-BL02 - all compatible with ESP-02S. Only that here you do not need to change WB2S, just upload:
    https://github.com/openshwprojects/OpenBK7231T_App
    As for the rest - the construction of this gadget is good, the manufacturer did not even omit the varistor, this is something. The price, in turn, is slightly higher than some sonoffs, but here we have the energy measurement ...

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 11844 posts with rating 9941, helped 566 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 20652735
    nomek
    Level 18  
    Well, the "energy meter" - does it work correctly?
  • ADVERTISEMENT
  • #3 20660965
    p.kaczmarek2
    Moderator Smart Home
    Energy measurement is carried out on the standard BL0937 chip, very popular in this type of products, right next to its brother BL0942. I did not perform precise measurements precision tests, but it is worth adding that after changing the firmware, we still manually calibrate BL0937 (or BL0942) using a reference to measurements made with a device of a better (I hope) class, as in Tasmot:
    https://tasmota.github.io/docs/Power-Monitoring-Calibration/
    So the quality of the measurements depends to some extent on us.

    It is possible that in the future I will be able to answer your question better, like you could try to do a comparative experiment, take some Tuya device, a better meter, test it and then change the firmware and calibrate it, then we will also check if we can beat the manufacturer's accuracy ... I will think about it.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #5 20661018
    p.kaczmarek2
    Moderator Smart Home
    @nomek unfortunately you are quite confusing two separate issues here, but no problem, I can clarify.

    OpenBeken is my alternative batch for IoT devices using WiFi modules other than ESP8266. It now includes BK7231T, BK7231N, BL602, XR809, W600 and W800. We upload OpenBeken ourselves, if we do not upload it, it is the manufacturer's batch and everything "works" there, but people do not like the risk of surveillance and limits and the risk that if the manufacturer's server fails, their devices will fail ... they want to be able to pair the device with HA and fully control it.

    My batch is cross-platform, but on the platform from the linked topic (BL602 by Bouffallo lab), there is no BL0937 support yet. It's just that when I tried to do it by feel, it didn't work, and I don't have BL602 + BL0937 in the device to test efficiently, in addition, the lack of BL602 documentation also makes it a bit difficult (it's kind of modest).

    On the other hand, on the BK7231T and BK7231N platforms, the discussed BL0937 and BL0942 fully work and have been working for a very long time. We have support for these two systems along with Tasmota-style calibration (via VoltageSet commands etc, although recently I also added it to the Web App gui in the Tools tab).

    So I assure you, on the Beken platforms (ie BK7231T and BK7231N) these energy measuring chips work and I have already scrolled through 20 or more IoT gadgets with and with Beken and everything worked. The simply linked BL602 is much less popular and I, for example, have never had a live BL602+BL0937 connection to start implementation work on it at all.

    If you have any other questions, feel free to ask, I'll try to help.

    Added after 4 [minutes]:

    EDIT: I will explain this - bl602 does not have BL0937 support at the moment because you need to run an interrupt/pulse counter on the GPIO, and this type of thing is per-platform and not portable. The whole firmware works so that there is a common "core" that runs on all platforms and there are separate layers of support (say, HAL, abstraction) for different platforms. It's just that in BL602 this part of HAL is not yet activated.

    And the fact that the BL602+BL0937 pair is so rare in products also does not have a good effect on the implementation of this. As I do the project in my free time, I have to choose what to do earlier and what to do later, so I focus on what is more popular first.
    Helpful post? Buy me a coffee.
  • #6 20661038
    nomek
    Level 18  
    See, I messed up...
    There is still the issue of the same MAC after flashing..
    Maybe you'd like a single socket for a "breakdown" then?
ADVERTISEMENT