logo elektroda
logo elektroda
X
logo elektroda

Solderless conversion board for CB2S/WB2S Tuya modules compatible with ESP12 boards

p.kaczmarek2  21 4365 Cool? (+5)
📢 Listen (AI):

TL;DR

  • A solderless conversion board lets CB2S/WB2S Tuya modules plug into ESP12/TYWE3S-style flashers.
  • The design uses a KYOCERA AVX 009159012651906 connector in KiCad; the first pin is NC, so board orientation matters.
  • It targets Tuya BK7231N modules with 3.3 V VBAT, UART1_RXD/TXD, and common GPIO pins, and the 4p version also fits.
  • CB2S fits well, the adapter fits TYWE3S flasher hardware, and BK7231GUIFlashTool detects and flashes the modules without soldering.
  • ESP module support is planned, but it will need a few extra resistors, and the board may also get a test LED.
Generated by the language model.
CB2S module mounted on a PCB held in a hand
Solderless adapters for boards like ESP12/TYWE3S seem to be widely available, but we haven't seen any for devices in TYWE2S/ESP-02S form. That's why we've designed our own WB2S/CB2S to CB3S/WB3S form converter that can be used alongside the commercial modules. Our converter has been tested with new Tuya BK7231N "standing" modules and can be used to flash them effectively before soldering.

So, let us consider the WB2S module:
Diagram and dimensions of WB2S module and converter board
Pin No.SymbolI/O typeFunction
1VBATPPower supply pin (3.3 V), which is connected to the VBAT pin on the internal IC
2PWM2I/OCommon GPIO, which is connected to the P8 pin on the internal IC
3GNDPPower supply reference ground pin
4PWM1I/OCommon GPIO, which is connected to the P7 pin on the internal IC
51RXI/OUART1_RXD, which is used as a user-side serial interface pin and is connected to the P10 pin on the internal IC
6PWM0I/OCommon GPIO, which is connected to the P6 pin on the internal IC
71TXI/OUART1_TXD, which is used as a user-side serial interface pin and is connected to the P11 pin on the internal IC
8ADAIADC pin, which is connected to the P23 pin on the internal IC
9PWM4I/OCommon GPIO, which is connected to the P24 pin on the internal IC
10CENILow-level reset, high-level active (internally pulled high) Docking IC-CEN
11PWM5I/OCommon GPIO, which is connected to the P26 pin on the internal IC

For more information on this module itself (or BK7231), see:
https://www.elektroda.com/rtvforum/topic3951016.html
This module has the same chip as WB3S, but there are no solderless boards for that form. For WB3S, we could have used that board:
https://www.elektroda.com/rtvforum/topic4010939.html
The same board linked above can handle TYWE3S/ESP12 as well, but CB2S/WB2S form doesn't fit...

That's why we've searched for suitable connector to make a conversion/daughter board ourselves. Here's what we found:
Screenshot of an online store page displaying the KYOCERA AVX connector with part number 009159012651906.
009159012651906 by KYOCERA AVX seems to have a matching pitch and contacts number. The current ratings are also of course well enough for our application:
AVX 9159-650 dual row top entry card edge connector.
Here are dimensions of 4p version (6p is similiar):
Technical drawing of a KYOCERA AVX 4p connector
So, after a moment in Kicad:
Diagram and layout of the adapter board for CB2S/WB2S module.
Note that first pin is NC (not connected) and that the board orientation matters.
And the board:
PCB with red and blue traces in a 3D visualization.
PCB design with pins on the edges
We've ordered the boards and now's the time for testing:
Green printed circuit boards with a module mounted on one of them.
CB2S fits well, and the daughter board fits TYWE3S/etc flasher good as well:
Converter board on a main board without soldering
The CB2S/WB2S is now easily flashable without soldering:
CB2S module mounted on a PCB held in a hand
Our flasher detects and flashes it well:
https://github.com/openshwprojects/BK7231GUIFlashTool
We may use it to flash our batch of WB2S/CB2S shown here:
https://www.elektroda.com/rtvforum/topic4059644.html#21117913

The following board could be easily used for a small scale production, because no soldering is needed to flash CB2S/WB2S with it.

We're also planning to add ESP module support, but that will require adding few more resistors on the board itself - we have to consider the requirements first. Maybe we'll also find some space for a test LED...

Ok, that's all for now. I'm attaching Kicad sources of our board. Stay tuned for more updates!

PS: This project was realized with @dedamraz . Thank you for our fruitful cooperation!
Attachments:
  • CB2S_WB2S_adapter.zip (16.99 KB) You must be logged in to download this attachment.

About Author
p.kaczmarek2
p.kaczmarek2 wrote 14409 posts with rating 12351 , helped 650 times. Been with us since 2014 year.

Comments

ferbulous 06 Sep 2024 15:28

Hi, any plans for cbu? [Read more]

p.kaczmarek2 06 Sep 2024 22:28

That's an interesting idea. Do you think that CBU is popular enough to justify it? Isn't it BK7231N-only module? Or is there also a... WBU, with BK7231T? [Read more]

insmod 07 Sep 2024 00:14

CBU will only have 5 pins available, if connected vertically through a similar 7p adapter. But, it won't be possible to flash the board, since the uart pins are on the side. And it won't be possible to... [Read more]

ferbulous 07 Sep 2024 05:05

It’s more common to find CBU than CB2S/wb2s at least from the devices I’ve bought. Haven’t seen WBU yet [Read more]

p.kaczmarek2 07 Sep 2024 07:43

@insmod have you tried swapping it to WiFi module? What kind of devices do you buy @ferbulous ? For me, CBU is still very rare. I got CB2S/CB3S almost all the time. [Read more]

madamsz1 07 Sep 2024 09:23

I recently bought such a relay with measurement on the CBU: https://obrazki.elektroda.pl/1636680500_1725693664_thumb.jpg https://obrazki.elektroda.pl/1510563000_1725693664_thumb.jpg https://obrazki.elektroda.pl/3301714600_1725693664_thumb.jpg... [Read more]

p.kaczmarek2 07 Sep 2024 09:46

I see a TO-Q-SY2-163JWT relay. What kind of circuit is there? BL0942? Probably in SPI mode? OpenBeken supports it. As for the swap: https://obrazki.elektroda.pl/4695395300_1725694971_thumb.jpg ... [Read more]

divadiow 07 Sep 2024 10:10

:o I think I have more CBUs than anything else. Probably because the door/window/flood devices seem to come with them and I bought too many looking for specific modules. Then of course in the LED SPI devices. ... [Read more]

p.kaczmarek2 07 Sep 2024 11:03

Well. most of the CB3S/CB2S form modules I see are in switch devices. "DIY smart switch", etc. I don't buy neither convert door/window/flood devices that often, as they are pain to handle. Futhermore,... [Read more]

madamsz1 07 Sep 2024 11:55

. Yes exactly BL0942 I have some ESP8684-WROOM-06C-H4 I used to order different ones for a few pieces each :) and this is what I ended up with. [Read more]

p.kaczmarek2 07 Sep 2024 11:59

In that case, is that BL0942 there in SPI or UART mode? Check the SEL pin: https://obrazki.elektroda.pl/1393778200_1725703193_thumb.jpg . [Read more]

madamsz1 07 Sep 2024 12:07

Hym... it looks like pin 7 is not connected to anything . So it kind of works in the UART [Read more]

p.kaczmarek2 07 Sep 2024 12:18

The question now is whether the Supla supports the BL0942 in UART mode? https://github.com/search?q=org%3ASUPLA%20bl0942&type=code I haven't found anything so far, but maybe I don't know how to look.... [Read more]

madamsz1 07 Sep 2024 12:27

The GUI is taken care of by Krycha and he is often open to suggestions, and sometimes if he has time I think people have made softys with support for something that is not in GG. I won't do it myself,... [Read more]

insmod 07 Sep 2024 13:54

Swapped it for an ESP8684-WROOM-06C-H2. Bulb looked like it worked all right, but as soon as i set the light to 100%, it rebooted. Had to reduce the cw max_power to 0.95. [Read more]

p.kaczmarek2 07 Sep 2024 18:00

@madamsz1 BL0942 is simple to use over the UART. The following topic describes in detail how I implemented its protocol in OBK: Electrical socket with LSPA9 energy measurement - we program our own firmware... [Read more]

ferbulous 08 Sep 2024 06:17

Do take note some of the pins are NC so you might have to bridge to other unused pins if the required pins are on those pads https://obrazki.elektroda.pl/1151884800_1725769054_thumb.jpg [Read more]

DeDaMrAz 12 Sep 2024 00:05

Thanks @ferbulous for the picture, this actually gives me hope that we can find CBU like adapter board as well so the hunt begins ;) [Read more]

ferbulous 25 Sep 2024 12:15

You can still make your own diy CBU adapter with some prototype pcb and pogo pins soldered on the surface. Then just use clips to the uart Don't have it with me now but it looks like this https... [Read more]

FAQ

TL;DR: This adapter bridges 11 WB2S pins into an ESP12/TYWE3S-style flasher, and “CB2S fits well,” making solderless flashing practical for people reworking Tuya BK7231N modules before final assembly. It targets repairers, firmware modders, and small-batch makers who need repeatable flashing without desoldering or hand-soldering every module. [#21216558]

Why it matters: It removes the slowest part of CB2S/WB2S rework—temporary soldering—while keeping compatibility with existing ESP12/TYWE3S flashing fixtures.

Option Module form Solderless flashing status Main limitation
Commercial ESP12/TYWE3S flasher ESP12 / TYWE3S / WB3S-like Yes CB2S/WB2S does not fit
New daughter board CB2S / WB2S to CB3S/WB3S form Yes Orientation matters; pin 1 is NC
Similar CBU adapter CBU No practical direct equivalent shown UART pins are on the side

Key insight: The thread’s core breakthrough is mechanical, not electrical: a correctly oriented daughter board plus the right board-to-board connector turns CB2S/WB2S into a format existing ESP12-style flashers can already handle. [#21216558]

Quick Facts

  • The WB2S module shown has 11 pins and uses 3.3 V on VBAT pin 1 with GND on pin 3, which defines the power baseline for safe bench flashing. [#21216558]
  • KYOCERA AVX part 009159012651906 was selected because its pitch and contact count matched the CB2S/WB2S socket requirement, making it suitable for a no-solder adapter. [#21216558]
  • The adapter was tested with Tuya BK7231N “standing” modules and worked with an existing TYWE3S/etc. flasher, so users can reuse known tooling instead of building a new programmer. [#21216558]
  • For module swaps, ESP8685-WROOM-06-H4 with 4 MB flash was recommended, while ESP8685-WROOM-06-H2 with 2 MB flash was explicitly not recommended because the flash size is insufficient. [#21218005]
  • A real-world failure case appeared in a bulb swap: an ESP8684-WROOM-06C-H2 rebooted at 100% brightness, but stayed stable after reducing cw max_power to 0.95. [#21218251]

How do I use a solderless conversion board to flash Tuya CB2S or WB2S modules in an ESP12 or TYWE3S flasher without soldering?

You plug the CB2S or WB2S into the daughter board, then insert that board into an ESP12/TYWE3S-style flasher. 1. Align the module so the adapter orientation matches the PCB marking. 2. Seat the daughter board into the existing flasher. 3. Power and flash the module with the BK7231 flashing tool before final soldering. This works because the adapter converts the CB2S/WB2S form into a CB3S/WB3S-like layout that the commercial flasher already accepts. [#21216558]

What is the pinout of the Tuya WB2S module, and which pins are needed for UART flashing?

The WB2S shown has 11 pins: 1 VBAT, 2 PWM2, 3 GND, 4 PWM1, 5 1RX, 6 PWM0, 7 1TX, 8 AD, 9 PWM4, 10 CEN, and 11 PWM5. For UART flashing, the key pins are 1RX on pin 5, 1TX on pin 7, 3.3 V on VBAT pin 1, ground on pin 3, and reset control on CEN pin 10. The thread also states WB2S uses the same chip family as WB3S in this context. [#21216558]

Why does the orientation of the CB2S/WB2S daughter board matter, and what does it mean that the first pin is NC?

Orientation matters because the adapter is not symmetrical, so reversing it misaligns the electrical mapping. “NC” means “not connected”: pin 1 on the adapter is intentionally left without an electrical connection, so treating it like an active signal would offset the remaining pins and break flashing. The board was designed around that exact pin arrangement, and the author explicitly warned that board orientation matters. [#21216558]

Which connector part number fits the CB2S/WB2S board-to-board socket, and why was KYOCERA AVX 009159012651906 chosen for this adapter?

The chosen connector was KYOCERA AVX part 009159012651906. It was selected because its pitch and number of contacts matched the CB2S/WB2S mechanical interface, and its current rating was more than adequate for a low-power 3.3 V flashing setup. The thread also notes the designer compared dimensions, including a similar 4-pin version, before committing the KiCad layout. [#21216558]

What is BK7231GUIFlashTool, and how is it used to detect and flash BK7231N-based Tuya modules like CB2S and WB2S?

“BK7231GUIFlashTool is a flashing utility that detects and programs BK7231-family Tuya Wi‑Fi modules, using a GUI workflow for serial flashing.” In the thread, it is the tool used with the adapter to detect and flash BK7231N-based CB2S/WB2S modules after they are seated in the solderless daughter board. The practical use is simple: connect the adapted module to the flasher, run the tool, let it detect the module, then write firmware before soldering the module into the target device. [#21216558]

What is the BL0942 energy metering chip, and how do SPI mode and UART mode differ for firmware support?

“BL0942 is an energy-metering IC that measures electrical parameters for smart relays and sockets, and it can expose data through either SPI-mode wiring or UART-mode wiring.” In this thread, firmware support differs by interface: the relay discussed appeared to have BL0942 in UART mode, while OpenBeken support was already stated for BL0942 and the user asked whether another firmware stack supported the UART variant. The interface choice matters because drivers must match the chip’s wired mode. [#21218005]

ESP8685-WROOM-06-H4 vs ESP8685-WROOM-06-H2 — which one is better as a replacement for CBU, AXYU, BPU, ZSU, ZTU, or WBRU modules and why?

ESP8685-WROOM-06-H4 is the better replacement because it has 4 MB flash and was explicitly recommended. The H2 version has 2 MB flash and was explicitly not recommended because that capacity was described as not enough. The thread also states that ESP8685-WROOM-06 fits in place of AXYU, BPU, CBU, ZSU, ZTU, and WBRU, so the deciding factor here is flash size, not basic footprint compatibility. [#21218005]

Why would an ESP8684-WROOM-06C-H2 bulb reboot at 100% brightness, and how does lowering cw max_power to 0.95 help?

It rebooted because the bulb became unstable at full output. A user reported that the bulb looked normal until brightness reached 100%, then it reset; reducing cw max_power to 0.95 prevented the issue. That cap lowers peak drive demand, which reduces the stress that triggered the reboot. The thread does not quantify current or temperature, but it gives a concrete operational fix: limit the cool-white channel below full scale. [#21218251]

How can I tell whether a BL0942 in a Tuya relay is wired for SPI or UART mode by checking the SEL pin?

Check whether SEL pin 7 is connected. In the thread, the relay’s SEL pin appeared unconnected, and that was taken to mean the BL0942 was working in UART mode rather than SPI mode. So the practical test is visual continuity or trace inspection around pin 7: if SEL is not tied as required for SPI, treat the board as a UART-wired BL0942 design when choosing firmware support. [#21218147]

What pin-compatible ESP8266, ESP8285, or ESP32-family modules can replace a CBU module in a relay with energy measurement?

The thread directly recommends an ESP32-family module: ESP8685-WROOM-06. It was stated to fit in place of AXYU, BPU, CBU, ZSU, ZTU, and WBRU, with the H4 4 MB version preferred over the H2 2 MB version. No pin-compatible ESP8266, ESP8285, ESP32-C3, ESP32-S2, or ESP32-S3 module was confirmed in the discussion for that specific relay footprint, so the only explicit swap choice given was ESP8685-WROOM-06. [#21218005]

Why is making a solderless CBU adapter harder than CB2S/WB2S, especially when the UART pins are on the side and the module width matches ESP-12 boards?

It is harder because a similar vertical CBU adapter would expose only 5 usable pins, and that still would not solve flashing. The thread explains that CBU UART pins sit on the side, so a vertical board cannot reach them, while a horizontal adapter is impractical because the CBU width matches an ESP-12-style module. That combination blocks a clean daughter-board approach that worked for the 11-pin CB2S/WB2S design. [#21217829]

What devices most commonly use CBU compared with CB2S, CB3S, and WB2S modules, based on user reports from switches, bulbs, sensors, and LED SPI devices?

User reports in the thread split by device type. CBU was reported as common in door sensors, window sensors, flood sensors, and LED SPI devices, while CB2S, CB3S, and WB2S were reported as common in smart switches and “DIY smart switch” products. Another user also showed a relay with energy measurement built around CBU. So the pattern is sensors and some LED products for CBU, and switch hardware for CB2S/CB3S/WB2S. [#21218078]

How would I build a DIY CBU flashing adapter with prototype PCB, pogo pins, and UART clips if no ready-made adapter board is available?

You can make one from a prototype PCB, surface-soldered pogo pins, and separate UART clips. 1. Place pogo pins on the proto board so they press onto the CBU pads. 2. Hold the module mechanically in place during flashing. 3. Clip external UART leads onto the required serial points, since the side-mounted UART pins are the hard part. The thread presents this as a DIY workaround when no ready-made solderless CBU adapter exists. [#21238828]

Where can I get a couple of these CB2S/WB2S adapter boards pre-soldered or as connector-plus-PCB kits instead of ordering all parts separately?

The thread does not provide a seller, kit source, or order page. One user explicitly asked whether a couple could be ordered pre-soldered or as connector-plus-PCB sets, but no reply in the provided posts offered a buying option or distribution plan. So the only confirmed availability in this thread is DIY: the board files were attached by the project authors, and the hardware was built as a self-made solution. [#21276911]

What suitable connector options are available for the bottom 7-pin CBU module when designing a solderless adapter?

No suitable bottom 7-pin CBU connector was identified in the provided discussion. The last post asks that exact question, which shows the search was still open at that point. Earlier replies suggested a DIY alternative using pogo pins on a prototype PCB plus UART clips instead of a dedicated board-to-board connector. So, within this thread, the confirmed answer is “none found yet,” with pogo-pin tooling as the practical fallback. [#21279515]
Generated by the language model.
%}