logo elektroda
logo elektroda
X
logo elektroda

Tuya Smart Plug with BK7231N Chip: Configuration and Setup Guide

vitya123 1548 4
ADVERTISEMENT
  • #1 21294132
    vitya123
    Level 6  
    Code: JSON
    Log in, to see the code
    I recently purchased a Tuya Smart Plug with Power Meter in hopes I can reprogram it with my own firmware. I have done it several times in the past, but all those were ESP based. This time I got one that has a BK7231N chip in it. This is how I found this forum. I looked through and tried to find an existing template that I could use, but it turns out, that other people's smart plugs all came with a module, rather than a simple chip soldered on the board. Furthermore, the GPIOs used on my board are different from the ones already on the example list. After some board tracing and some help from the community, I finally have the correct config for this device.

    Let's start with some product pictures:

    My plug is advertised on a favorite Chinese online marketplace as a "Tuya European Graffiti Wifi Smart Socket Mobile Phone Timing Remote Control 16A with Electricity" -whatever that means. It comes with this ad:
    Tuya smart plug with power monitor and feature description.

    A couple of more pics I took:
    Top view of a Tuya smart plug showing its electrical pins.Tuya smart plug with a power button on the side.

    On the insides you can see that contrary to other similar plugs, this one does not have a module, just a simple chip:
    Interior of a smart plug with BK7231N chip and electronic components. Close-up of a circuit board with a BL0937 chip.

    Finally, here is the config that works for me:
    Code: JSON
    Log in, to see the code

    If you are interested in further details on how I got to all of this above, I invite you to my blog where I have a detailed walkthrough to help you with the conversion.
  • ADVERTISEMENT
  • #2 21297491
    123456nullnet
    Level 2  
    >>21294132 Hi, I am looking for two pieces of information.
    I have 3 pieces AUBESS Tuya WIFI Smart Socket 20A, 16A. I use them for more than 1 year, for testing.
    Can I use it for an electric water heater/boiler 230V 1200W?
    I suppose it has a relay because it clicks when I press the button.

    Other question: Two of them are broken because when I plug them in, it keeps clicking and I can't see the wifi.
    Can I fix it?
    Thank you for your answer.
  • ADVERTISEMENT
  • #3 21297938
    vitya123
    Level 6  
    1200W/230V=5-6A (roughly), which means that a 20A relay should be able to handle it. However, you need to make sure that the relay used is indeed rated for 20A as in these cheap switches this is not always the case. Also, the PCB must handle that current.
    I have had mixed experience in the past - some sockets withstood the high current tests, some didn't. You have to check it.

    The other question: It's difficult for me to diagnose them from this much information. Of course, everything can be fixed. The question is: Is it worth the effort/money/etc? I would take them apart and see if there is anything obvious broken, e.g. a blown capacitor. Is there any info coming out of the debug port?

    Remember to NOT use mains when experimenting with it...
  • ADVERTISEMENT
  • #4 21302274
    123456nullnet
    Level 2  
    Thank you for your answer.
    How can I check the debug port, if no WiFi sign?
  • #5 21303239
    vitya123
    Level 6  
    WiFi or no WiFi, the debug port is usually UART 1, sometimes UART 2. They are usually marked on the PCB. See the photos in my article.
ADVERTISEMENT