logo elektroda
logo elektroda
X
logo elektroda

Flashing yet another Mini Smart Switch with a T34, aka BK7231N chip

woessner 2850 12
ADVERTISEMENT
  • #1 21253441
    woessner
    Level 3  
    This is for another Mini Smart Switch,
    this time with a T34 AKA BK7231N

    I did not read this forum thus I did not know about Tuya-Cloudcutter and thus flashed it the difficult way.
    Please try Tuya-Cloudcutter first!!


    Open Mini Smart Switch showing internal electronics and cover with external markings. The image shows the interior of a Mini Smart Switch with a visible relay and electronic components on a circuit board. PCB with electronic components and connected USB chip on a wooden surface.

    The LED is on 6
    The Switch input is on 14
    The Relay is on 15
    The Button on 24

    Code: JSON
    Log in, to see the code
  • ADVERTISEMENT
  • #2 21262684
    p.kaczmarek2
    Moderator Smart Home
    Thanks for sharing! Your template is now live on our devices list:
    Web interface showing a list of devices with a mini Smart Switch.
    See: https://openbekeniot.github.io/webapp/devicesList.html

    Good job with flashing it. Nice way of repurposing unused button pads. I hope it won't be too hard for other our readers as well. I'm worried to see more and more T34 devices around, Hopefully they won't totally replace easily-flashable CB2S/CB3S/etc modules.

    Added after 25 [seconds]:

    PS: Consider enabling powersave on this board or you may need to do this fix later:
    https://www.elektroda.com/rtvforum/topic3898805.html
    Helpful post? Buy me a coffee.
  • #3 21513370
    djramu
    Level 17  
    Hello.
    I have a problem. ;)
    I tried Tuya CloudCutter but couldn't manage. I think I prefer flashing via uart. With the GUI Flash Tool, can I change the firmware of this device? I tried to find the RX and TX pins but no success. Are You able to tell how You managed to flash this chip via uart?
  • ADVERTISEMENT
  • #4 21513754
    p.kaczmarek2
    Moderator Smart Home
    Do you have the exactly the same version as in the first post?

    It is possible to flash it with GUI Flash Tool, but you need to access UART pins.
    Helpful post? Buy me a coffee.
  • #5 21514467
    djramu
    Level 17  
    It goes like this. I would like to use uart but after soldering in the theoretical uart pins i don't have communication.

    Printed circuit board with electronic components, including an XGN relay.
    I tried with the pins marked in red.
  • ADVERTISEMENT
  • Helpful post
    #6 21705064
    sp4rk1e
    Level 10  
    bought some of these so called 'Mini Smart Switches' from our favorite Chinese marketplace, For incredible 2.59€ per piece.

    Tuya Smart Switch 16A WiFi module with technical specs and customer ratings

    Mini Smart Switch housing showing technical specifications and connector labels

    again a new variant of this device. At least I've not seen such on this forum.

    Unfortunately with a T34 directly mounted on the board. Even with all of our beloved flash signals exposed somewhere on the board.

    Electronic module with relay, capacitors, and PCB antenna on wooden surface

    Green printed circuit board with visible traces and solder points

    Except TX. Holy crap no way to grab this pin except removing the whole chip :-(

    Relay module with electronic components on stone background

    for easier future use I handcrafted a small T34 flash adapter for my favorite USB ESP32 in circuit flash tool:

    Flashing yet another Mini Smart Switch with a T34, aka BK7231N chip

    Flashing yet another Mini Smart Switch with a T34, aka BK7231N chip

    my working OBK config is like this:

    
    {
      "vendor": "Tuya",
      "bDetailed": "0",
      "name": "Full Device Name Here",
      "model": "enter short model name here",
      "chip": "BK7231N",
      "board": "TODO",
      "flags": "64",
      "keywords": [
        "TODO",
        "TODO",
        "TODO"
      ],
      "pins": {
        "8": "WifiLED;0",
        "10": "TglChanOnTgl;1",
        "23": "Btn;1",
        "26": "Rel;1"
      },
      "command": "powersave 1",
      "image": "https://obrazki.elektroda.pl/1476559000_1759204894.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/viewtopic.php?p=21705064#21705064"
    }
    
  • #7 21705190
    p.kaczmarek2
    Moderator Smart Home
    This is the good approach. It's easy to tear off the QFN pad when using too large or not fixed in place wires.
    Helpful post? Buy me a coffee.
  • #8 21714162
    p.kaczmarek2
    Moderator Smart Home
    I got the same as @sp4rk1e
    Electronic relay module with capacitors, ICs and terminal block

    Code: JSON
    Log in, to see the code


    Added after 1 [minutes]:

    https://github.com/openshwprojects/FlashDumps/commit/e6cc71df46ccbea39cd0eeee83b349599e2dc65e
    Helpful post? Buy me a coffee.
  • #9 21714175
    sp4rk1e
    Level 10  
    if everything else fails this board is a nice 3.3V power supply for other ESP32 projects after removing unnecessary parts. Of course setup must be completely isolated. At least I haven't seen a DIY power supply for the mains at that size yet. :-)
  • ADVERTISEMENT
  • #10 21714179
    p.kaczmarek2
    Moderator Smart Home
    It wasn't that bad:
    Person holding a cardboard-mounted sensor connected to a breadboard and laptop
    but I probably should buy this:
    Green PCB adapter QFN32/QFN40 to DIP32/DIP40 with labeled pins and central chip pad.
    Helpful post? Buy me a coffee.
  • #11 21732349
    woessner
    Level 3  
    I bought six of them because it was quite easy to flash them last time but now I had the chips where the pins could not be accessed from the side :-(
    Hand-soldering tiny wires to the chip was a nightmare, though, but I did that on one of them and successfully flashed the firmware.
    Doing that on the five remaining ones --> no way!
    Thus I printed a jig to hold the chip.
    That worked amazingly!
    Thus I have to share the CAD files for that.
    Pink 3D-printed holder with a chip and thin soldered wires on sides
    Pink 3D-printed chip holder with connected wires and a separate chip module
    Set of Mini Smart Switch modules and circuit boards on a workbench
    PS: The LED is on 8
    Button on 10
    and Relay on 26
    Please find attached STL and Inventor files. If you need a different CAD file format, just send me a PM.
  • #12 21732366
    p.kaczmarek2
    Moderator Smart Home
    Interesting, I didn't think about such approach.
    CAD files could be useful, zip them and attach, or I can help if it's not working for you. Nice design.
    Helpful post? Buy me a coffee.
  • #13 21732443
    woessner
    Level 3  
    >>21732366
    Zip files worked!
    The print is accurate enough to give a good alignment, and on some of them I had to press down a bit on the 3D print to get a good contact with the needle tips, but other than that, no problem.
    I did add a bit of leaded solder on the chip pads before putting them in the jig; that might have helped a bit with the contact too, and I had to do that anyway to reflow them after programming.

Topic summary

The discussion focuses on flashing a Mini Smart Switch equipped with a T34 (BK7231N) chip. The original poster shared a custom device template including pin assignments: LED on pin 6, switch input on pin 14, relay on pin 15, and button on pin 24. They recommend using Tuya-Cloudcutter for easier flashing, as they initially used a more complex manual method. Responses confirm the template is now included in a public devices list and highlight concerns about the increasing prevalence of T34 devices replacing more easily flashable modules like CB2S/CB3S. Users report difficulties locating UART pins for flashing via the GUI Flash Tool, with one user unable to establish UART communication despite soldering on marked pins. It is confirmed that UART flashing is possible but requires correct identification of UART pins. A power-saving mode recommendation is also mentioned to avoid later fixes.
Summary generated by the language model.
ADVERTISEMENT