Elektroda.com
Elektroda.com
X
  • This is a short teardown of the Aubess Mini Smart Switch 16A which is based on BK7231N and it uses a custom PCB ,so no Tuya module in there.

    Basic Informations:

    Brand: Aubess
    Model: Aubess Mini Smart Switch 16A
    Chip: BK7231N
    Vendor (that's exactly where i bought it): https://www.aliexpress.com/item/1005003631131323.html? <- it's the kind of seller that ask for extra shipping fees,so not really recommend it

    Teardown Photos


    The switch is very easy to open so i wont go into details,but remember,this device it's using high voltage,so make sure it's not connected to the mains.Also ,i took pictures only of the relevant parts.
    [BK7231N] Aubess Mini Switch 16A [BK7231N] Aubess Mini Switch 16A [BK7231N] Aubess Mini Switch 16A [BK7231N] Aubess Mini Switch 16A [BK7231N] Aubess Mini Switch 16A

    Flashing OpenBeken firmware


    Requirements:

    USB to TTL adapter
    Soldering Iron
    Soldering skils (not pro level,but still...)
    Magnifying glass or microscope are a plus
    Steady hands :)

    Wiring: -> Check the attached picture to locate the pins on the PCB

    ( PCB ) GND - > GND ( TTL )
    ( PCB ) TX - > RX ( TTL )
    ( PCB ) RX - > TX ( TTL )
    ( PCB ) CEN/EN -> GND ( PCB ) <- CEN must be short to GND only for a second,in order to boot the chip in flash mode

    Flashing: -> In my case the 3.3v pin was not required at all.

    1) Connect GND,RX and TX to the USB TTL then attach the TTL adapter to the PC.
    2) Open BKwriter 1.60 and set the baudrate (see attached picture)
    3) Try to read the flash (if it fails ,then short CEN to GND for a second then try again) <- this will create a backup of the original firmware
    4) After BKwriter has finished the backup,you can proceed with the OpenBeken firmware flashing ,just follow the guide from https://github.com/openshwprojects/OpenBK7231T_App/blob/main/README.md#flashing-for-bk7231n
    5) After flashing Openbeken you should be able to find the quick configuration (i've sent a PR for that) for this device in ; http://[Device_IP] > Config < Quick Config

    Cool? Ranking DIY
    About Author
    Pretoriano
    Level 2  
    Offline 
    Pretoriano wrote 2 posts with rating 13. Been with us since 2022 year.
  • #2
    p.kaczmarek2
    Moderator Smart Home
    That's a very informative and helpful teardown. Futhermore, from what I see at the moment:
    [BK7231N] Aubess Mini Switch 16A
    The shipping to Poland is free and device is seemingly for only 25PLN (it's about 5$), so it's not that expensive. Of course, we also might need to take that new VAT tax into account...
  • #3
    Pretoriano
    Level 2  
    It was "free shipping " when i bought it too,but the seller asked for €0.50 more as extra shipping fee.
    However ,i had an Aliexpress coupon so it was still convenient ,that's why i agreed to pay that extra fee (i usually refuse to pay extra fees )
  • #4
    zopieux
    Level 2  
    I bought a bunch of these devices from Aliexpress. They're branded as Aubess but use a different pin configuration than the ones already documented in this thread.

    [BK7231N] Aubess Mini Switch 16A

    The small BK7231N-supporting board seems to be this TCB2S thing from Trolink.

    I managed to flash it using the UART (serial) method (therefore, QIO firmeware variant), following the usual BK7231N UART flashing guides from this forum (uartprogram) on the RX1/TX1 un-soldered pins. Happy to report OpenBK7231T_App QIO firmwares work just fine!

    Pin configuration: P6 is the internal button, P7 is the blue LED, P24 is the internal relay, P26 is the switch/toggle sensing on screw terminals S1 & S2. I'm sending a PR to add this variant.
  • #7
    ciclopeblu
    Level 4  
    Hello,

    Thanks for the reply, I have done the program using the command line tool, all went fine but...nothing is working. I have solded the module back and the blue led just stay still, no wifi network, no activity. My question is, how can I check what is happening, is there any terminal output I could check to see what the issue is?


    [BK7231N] Aubess Mini Switch 16A

    Thanks,

    Ciclope
  • #8
    p.kaczmarek2
    Moderator Smart Home
    You may have flashed the incorrect binary file. Log output is available at TX2 pin. It should tell you what is happening.
  • #9
    vladimir5
    Level 1  
    Thanks for this overview!
    I have exactly the same module from aliexpress. Everything is working fine except s1-s2 contacts. There is no effect if I short/open them. (no matter what mode is chosen in the app)

    Probably there is some problem on the board?
    Mine has 65 Ohm resistance between S1 and S2 contacts.
    And S1 is short to Nin/Nout.

    Could you please check yours?
  • #10
    ciclopeblu
    Level 4  
    Hi,

    Not sure I understand your message but I think I have the same issue.

    I was able to flash it correctly, however, I can only control the led with the interface, the swicth do not work:

    [BK7231N] Aubess Mini Switch 16A

    Let me know if you have the same issue and if you have found a solution.

    Thanks,

    Cilcope

    .....

    vladimir5 wrote:
    Thanks for this overview!
    I have exactly the same module from aliexpress. Everything is working fine except s1-s2 contacts. There is no effect if I short/open them. (no matter what mode is chosen in the app)

    Probably there is some problem on the board?
    Mine has 65 Ohm resistance between S1 and S2 contacts.
    And S1 is short to Nin/Nout.

    Could you please check yours?
  • #11
    p.kaczmarek2
    Moderator Smart Home
    Why is the Relay not set for pin 26? Is there some issue with the template?
    [BK7231N] Aubess Mini Switch 16A

    Please try manually entering Relay for pin 26.
  • #12
    ciclopeblu
    Level 4  
    I did but still nothing, the led go off and on when I click on/off in the web interface, but not the relay.

    [BK7231N] Aubess Mini Switch 16A

    I was wondering, if the LED is going on and off according to the commands I give using the web interface, is that telling me that all physical pin connections are good or is the led controlled using a different physical pin than the relay? just asking also because I have concerns about the pin marked as p6 be able to connect properly to the board..



    p.kaczmarek2 wrote:
    Why is the Relay not set for pin 26? Is there some issue with the template?
    [BK7231N] Aubess Mini Switch 16A

    Please try manually entering Relay for pin 26.
  • #13
    p.kaczmarek2
    Moderator Smart Home
    If LED is going on and off then it means that you don't have configured relay correctly. Maybe relay is on some other pin. Maybe take some HD photos and show us the board, or check where the base of transistor switching on the relay goes? Remember that there will be also a resistor on the way.

    In the device template you shown above, LED is using different pin than relay. LED is on pin 8. So the question is... on which pin is the relay?

    In worst case, you can try setting them one by one and checking if it clicks....

    ALSO.... please remember, if you are powering the device from 3.3V from your own 3.3V supply, then relay might NOT click because relay is powered usually from 5V on the board!!!
  • #14
    ciclopeblu
    Level 4  
    This is the board:

    [BK7231N] Aubess Mini Switch 16A

    It looks pretty similar to the one on the app template.

    I have solded the module back so the volts powering the relay should be ok, I assume?

    Which one is the base of transistor switching?
  • #15
    p.kaczmarek2
    Moderator Smart Home
    U2 is the 3.3V LDO, so Q1 is most likely the transistor.

    Please check where it pins goes, one should go to Relay, and second one should go to WiFi module pin - check which pin.
  • #16
    ciclopeblu
    Level 4  
    From Q1 :

    - middle pin is going to the switch (it can be seen also from the picture)
    - Left pin is going to GND
    - Right PIN doesn't go straing to any pin in the module, it goes to rp2 and then P26
  • #17
    p.kaczmarek2
    Moderator Smart Home
    Can you go to Options, Configure Module and show what do you have here:
    [BK7231N] Aubess Mini Switch 16A
    ?
    Post a screenshot
  • #18
    ciclopeblu
    Level 4  
    Mate,

    Apologies, just replaced the board with another one and everything isa working fine! it was a defective board, the wifi module is perfect.

    The template needs to ne updated though adding the pin26.

    Other question, is any way to make the Power meter reading to work?


    p.kaczmarek2 wrote:
    Can you go to Options, Configure Module and show what do you have here:
    [BK7231N] Aubess Mini Switch 16A
    ?
    Post a screenshot
  • #19
    p.kaczmarek2
    Moderator Smart Home
    Board was defective? How? That's good if it works now.

    What kind of power meter? We are currently supporting BL0937, BL0942 and CSE*.
  • #20
    jorgemsp
    Level 2  
    Hi everyone,

    I've been exploring the flashing of those devices and the its operation with OpenBK7231N.
    I'm noob on this field so I apolagize in advance for any basic question I can place.
    I've used tuya-cloudcutter and OpenBK7231N to flash my AUBESS mini with success and I'm currently able to switch the relay though local network.
    What I've noticed is that the relay works fine but the LED is allways ON in what it seems an intermediate state (slightly dimmed). I've configured exactly like in the picture shared in one of the posts of this thread.
    Any idea how could I solve this problem? (not really important, but it would help me to better understand the device)
    Additionally, this device has two versions: w/power metering or w/o power metering.
    Any idea on how to configure/enable the power metering?

    Thanks in advance for any assistance!
  • #21
    p.kaczmarek2
    Moderator Smart Home
    What kind of the device?
    LED could be on another pin, manufacturers tends to change it from time to time.
    Maybe you should try looking at PCB tracks or just guessing each pin one by one - if that's a WB2S/CB2S device, there is no many options. Just set each pin role to LED and mark as channel 2 and try toggling and see which pin makes the LED toggle.

    What kind of power metering device is inside? BL0937? BL0942?
  • #22
    jorgemsp
    Level 2  
    p.kaczmarek2 wrote:
    Maybe you should try looking at PCB tracks or just guessing each pin one by one - if that's a WB2S/CB2S device, there is no many options. Just set each pin role to LED and mark as channel 2 and try toggling and see which pin makes the LED toggle.

    I was going to start changing pins and noticed that actually it was my mistake... I've assigned to P9 instead of P8...

    p.kaczmarek2 wrote:
    What kind of power metering device is inside? BL0937? BL0942?

    It is the BL0942:
    [BK7231N] Aubess Mini Switch 16A
    The BL0942 datasheet confirms that the IC incorporates two ADC's for current measurement (pins 2,3 of the IC - differential, coming from the sensing resistor) and votage (pin 4 of the IC from the resistor divider on the right part of the picture).
    Any tips on how should I iterate to find those measurements, if possible? (Energy and/or power should also be available though estimation)
  • #23
    p.kaczmarek2
    Moderator Smart Home
    For BL0942, you just do a "startDriver BL0942" in short startup command, reboot, and then use VoltageSet/CurrentSet/PowerSet commands to calibrate..
  • #24
    jorgemsp
    Level 2  
    Following your advice and after reading your previous post: https://www.elektroda.com/rtvforum/topic3887748.html
    I'm finally reading accurate measurements of Voltage, Current and Power!
    I'll now keep digging and try to connect it with HA.
    Thank you very much for the hints and congrats for all your work,
  • #25
    p.kaczmarek2
    Moderator Smart Home
    @jorgemsp thanks, as far as I know, the Home Assistant Discovery is already working for Current, Power and Voltage. So it can be paired with one click. @iprak may know more about it, as he's the author of HASS Discovery support for OpenBK.
  • #26
    bernardstef
    Level 1  
    Hi !!

    Just to add to Pretoriano post. I have the exact same board, model is AVATTO , WSM02 (5€ on Aliexpress)

    Thanks you for the TX/RX Pins !!

    "Easy config" is depreciated. Pins are:


    p6 led

    p15 relay

    p14 pin s1-s2

    p8 btn on pcb

    Cheers and thanks !
  • #27
    khafif
    Level 3  
    Hi, you said that the 3.3v pin was not required at all, did you use the AC (Lin-Nin) connection to power the PCB? or you just connected it to TTL using TX,RX and GND?
  • #28
    p.kaczmarek2
    Moderator Smart Home
    @khafif do not power device from mains while flashing! It's very dangerous!

    Please always power it from a 5V (if you solder wire to 5V rail, before the LDO regulator that gives 3.3V for WiFi module) or from 3.3V directly.

    The only case where you do not solder VDD is when you have a 9V/12V/etc LED strip and in that case you might power it from an isolated 9V /12V etc DC supply...

    But WiFi module must have 3.3V for flashing to work!
  • #29
    khafif
    Level 3  
    Thank you my friend for the advice not powering it while flashing and that is why i asked you about the power supply.

    I will use the USB/TTL VCC 5V/3.3V provided to power the WiFi module during the flashing.

    Please can you mark on the above screenshots where do I have to connect the 3.3v on the WiFi board. I am not familiar with the terminology of LDO and where it is location.

    Thank you again.
  • #30
    p.kaczmarek2
    Moderator Smart Home
    khafif wrote:
    Thank you my friend for the advice not powering it while flashing and that is why i asked you about the power supply.

    Sorry but where is the post with "do not power the device" advice? It must have been a mistake or typing error. I will edit that.

    khafif wrote:

    Please can you mark on the above screenshots where do I have to connect the 3.3v on the WiFi board.

    Which device and which module?

    khafif wrote:

    I am not familiar with the terminology of LDO and where it is location.

    5V goes in, 3.3V goes out.
    [BK7231N] Aubess Mini Switch 16A

    Maybe try our video guide?
    https://www.youtube.com/watch?v=PKkiqDNFIx8