Hello,
In this post, I will share teardown of Tuya Smart switch for boiler water heater and flashing it with OpenBK7231N.
The switch was bought on Aliexpress, the major reason to buy this device is it’s advertised high power, 20A 4400W !! (I have very bad experience with cheap Sonoff 16A switches that nearly burned my entire house after few weeks of operation).
after discovering this forum... i had to give Tuya a try
I was really hoping to get an old device with either ESP chip or at least WB2S, however the switch came with CB3S and BK2731N, which made the process a bit more educational (aka complicated).
Teardown:
The front glass cover is easily removed, and the 1st PCB layer with the LED and CB3S module are exposed.
This PCB is connected with 4 pins socket to a 2nd PCB which contains the relay and power circuit. In between there is a thin film layer (like in other switches from Tuya).
For the firmware upgrade there is no need to disassemble the 2nd PCB. Just remove the 1st PCB from its housing.
CB3S:
for the firmware upgrade we need to work with the following pins, (complete table is here)
Prepare to flash on windows:
1. install python3 (i used 3.7)
2. get hidapi from https://github.com/libusb/hidapi/releases, extract it to somewhere in windows %PATH%
3. git clone hid_download_py repo
4. create virtual env, and activate it.
5. run install
6. test installation
7. Download the latest bin firmware file from https://github.com/openshwprojects/OpenBK7231T_App/releases, I used OpenBK7231N_QIO_1.12.44.bin
Prepare to flash hardware:
1. Breadboard with few cables
2. A 3.3v power supply
3. USB to serial adapter FT232RL FTDI
4. FIMO clay or soldering iron...
To avoid soldering, I’ve used some FIMO clay to hold breadboard cable pins right on the chip. This method requires some practice to make sure the pins actually touch the board at the correct position, and make sure that the cables don’t move while flashing.
Flashing:
so, after wiring everything, and double checking that all connections are correct, it's time to run the flashing!
when running the flashing command, you need to reset the chip by grounding pin 1 (that's the 'free' orange wire in the picture). if all goes well, you will get a successful msg!
OpenBK7231N config:
by now you should see a new wifi AP from the switch, something like OpenBK7231N_#######.
connect to this wifi, and setup access to your home wifi.
in the configuration menu, setup:

In this post, I will share teardown of Tuya Smart switch for boiler water heater and flashing it with OpenBK7231N.




The switch was bought on Aliexpress, the major reason to buy this device is it’s advertised high power, 20A 4400W !! (I have very bad experience with cheap Sonoff 16A switches that nearly burned my entire house after few weeks of operation).
after discovering this forum... i had to give Tuya a try

I was really hoping to get an old device with either ESP chip or at least WB2S, however the switch came with CB3S and BK2731N, which made the process a bit more educational (aka complicated).
Teardown:


The front glass cover is easily removed, and the 1st PCB layer with the LED and CB3S module are exposed.
This PCB is connected with 4 pins socket to a 2nd PCB which contains the relay and power circuit. In between there is a thin film layer (like in other switches from Tuya).
For the firmware upgrade there is no need to disassemble the 2nd PCB. Just remove the 1st PCB from its housing.
CB3S:
for the firmware upgrade we need to work with the following pins, (complete table is here)

PIN | Description | |
1 | RESET | need to short to ground for ~1sec. when flashing begins. |
8 | VCC-3.3V | DC 3.3v |
9 | GND | Ground (DC -) |
15 | RXD1 | UART1_RXD (user serial interface), which corresponds to P10 of the IC. |
16 | TXD1 | UART1_TXD (user serial interface), which corresponds to P11 of the IC. |
Prepare to flash on windows:
1. install python3 (i used 3.7)
2. get hidapi from https://github.com/libusb/hidapi/releases, extract it to somewhere in windows %PATH%
3. git clone hid_download_py repo
4. create virtual env, and activate it.
C:\repoo\hid_download_py>python -m venv c:\repoo\hid_download_py\py37-3nv
C:\repoo\hid_download_py>py37-env\Scripts\activate
5. run install
6. test installation

7. Download the latest bin firmware file from https://github.com/openshwprojects/OpenBK7231T_App/releases, I used OpenBK7231N_QIO_1.12.44.bin
Prepare to flash hardware:
1. Breadboard with few cables
2. A 3.3v power supply
3. USB to serial adapter FT232RL FTDI
4. FIMO clay or soldering iron...
To avoid soldering, I’ve used some FIMO clay to hold breadboard cable pins right on the chip. This method requires some practice to make sure the pins actually touch the board at the correct position, and make sure that the cables don’t move while flashing.

Flashing:
so, after wiring everything, and double checking that all connections are correct, it's time to run the flashing!
when running the flashing command, you need to reset the chip by grounding pin 1 (that's the 'free' orange wire in the picture). if all goes well, you will get a successful msg!

OpenBK7231N config:
by now you should see a new wifi AP from the switch, something like OpenBK7231N_#######.
connect to this wifi, and setup access to your home wifi.
in the configuration menu, setup:
pin | type | value |
p6 | Rel | 1 |
p7 | LED | 1 |
p24 | Btn | 1 |

Cool? Ranking DIY