logo elektroda
logo elektroda
X
logo elektroda

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

p.kaczmarek2 
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!

About Author
p.kaczmarek2
p.kaczmarek2 wrote 11985 posts with rating 10015 , helped 573 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]

%}