A CB2S BK7231N module gets a hardware SPI MOSI breakout by wiring P16 from the QFN chip pad to an exposed pad.
The mod removes the shield, cuts the CEN trace, solders a thin enamelled wire to the correct QFN pad, and secures it with UV-curable solder mask.
P16 is Pin 12 on the internal IC, while CEN is Pin 21 and the module uses a BK7231N chip.
The broken-out P16 can drive hardware SPI peripherals and individually addressable LEDs such as SM16703 and WS2812 in OpenBeken, though WS2812 still needs final fixes.
CBU already exposes P16 on pads, so this workaround mainly helps when CB2S or similar CB3S modules are more convenient.
Generated by the language model.
Here I will show you how to access the hardware MOSI pin, P16, on a common Tuya CB2S BK7231N module. The MOSI pin can be used for hardware SPI communication and also for driving individually addressable LEDs like WS2812 or SM16703, but it's not available on CB2S pads. We will have to solder a wire to one the QFN pads and then break it out.
Step 0: Considerations Let's consider the CB2S module:
Most commonly used GPIOs are routed to the pads, there are also some debug GPIO pads at the bottom of the module, but P16 is nowhere to be found. Still, we can check the pinout of the QFN BK7231 IC itself, to find that it should be available, at least on the QFN pad:
This means that the designer of CB2S module must have skipped this pin. We are going to fix that now.
Step 1: Removing CB2S shielding Shield can be easily removed with hot air, large nozzle, and some extra flux to loosen the solder connection:
On the pictures, I have also accidentally desoldered the 100nF power supply decoupling capacitor. This needs to be fixed before using module again:
Step 2: Choosing where to route The best option is to reuse one of the existing pads, for example CEN. I chosen to use CEN because I don't use it for flashing, I just do a power off/power on cycle and it works reliably. So, I had to cut the CEN trace:
That way CEN is now disconnected from the pad and pad can be reused for our purposes.
Step 3: Preparing the wire Get a thin wire, roughly of the size of the QFN pad. Strip the enamel from it. Tin the tip of the wire for easier soldering. You can use old broken transformer or a coil as a source of such wires.
Step 4: Soldering the wire Once the wire is prepared, it's time to solder it to the correct pad of QFN case. Make sure that you have identifier the first pad directly - it's marked with a dot. You can use the crystal pads for orientation, just to check if you've correctly determined the orientation.
I have used a thin soldering tip for the soldering process, first I added flux and some Pb solder and then I finally made the connection:
Remember to clean the PCB with IPA before going to next step.
Step 5: Adding UV-curable solder mask Now you can secure the connection with UV-curable solder mask. Otherwise the wire may get loose during module usage or storage. Apply solder mask and use UV to cure it:
Step 6: Second solder joint Finally it's time to solder the second end of the wire to the pad. Of course, it also have to be stripped from enamel. Then you can also solder futher wires to connect the module to the breadboard:
Summary That way you can break out the P16 (MOSI) on the common CB2S module. The same method can also work for similiar modules like CB3S, etc. Alternatively you can look for module that has P16 already available on pads like CBU module:
Spoiler:
Pin number
Symbol
I/O type
Function
1
P14
I/O
Common GPIO, which can be reused as SPI_SCK (Correspond to Pin 11 of the IC)
2
P16
I/O
Common GPIO, which can be reused as SPI_MOSI (Correspond to Pin 12 of the IC)
3
P20
I/O
Common GPIO (Correspond to Pin 20 of the IC)
4
P22
I/O
Common GPIO (Correspond to Pin 18 of the IC)
5
ADC
I/O
ADC, which corresponds to P23 on the internal IC (Correspond to Pin 17 of the IC)
6
RX2
I/O
UART_RX2, which corresponds to P1 on the internal IC. (Correspond to Pin 28 of the IC)
7
TX2
I/O
UART_TX2, which is used for outputting logs and corresponds to P0 of the internal IC (Correspond to Pin 29 of the IC)
8
P8
I/O
Support hardware PWM (Correspond to Pin 24 of the IC)
9
P7
I/O
Support hardware PWM (Correspond to Pin 23 of the IC)
10
P6
I/O
Support hardware PWM (Correspond to Pin 22 of the IC)
11
P26
I/O
Support hardware PWM (Correspond to Pin 15 of the IC)
12
P24
I/O
Support hardware PWM (Correspond to Pin 16 of the IC)
13
GND
P
Power supply reference ground
14
3V3
P
Power supply 3V3
15
TX1
I/O
UART_TX1, which is used for transmitting user data and corresponds to Pin 27 of the IC. For the MCU solution, please refer to CBx Module.
16
RX1
I/O
UART_RX1, which is used for receiving user data and corresponds to Pin 26 of the IC. For the MCU solution, please refer to CBx Module.
17
P28
I/O
Common GPIO (Correspond to Pin 10 of the IC)
18
CEN
I/O
Reset pin, low active (internally pulled high), compatible with other modules (Correspond to Pin 21 of the IC)
19
P9
I/O
Common GPIO (Correspond to Pin 25 of the IC)
20
P17
I/O
Common GPIO, which can be reused as SPI_MISO (Correspond to Pin 14 of the IC)
21
P15
I/O
Common GPIO, which can be reused as SPI_CS (Correspond to Pin 13 of the IC)
Test point
CSN
I/O
Mode selection pin. If it is connected to the ground before being powered on, enter the firmware test mode. If it is not connected or connected to VCC before being powered on, enter the firmware application mode. Correspond to Pin 19 on the internal IC.
But CBU module seems to be less popular and less accessible than the CB2S/CB3S so the presented method can be useful is some cases.
The routed out P16 can be used for example for individually adressable LEDs control via hardware SPI of BK7231, which is available in OpenBeken firmware. We are currently supporting SM16703 and WS2812 also works, but WS requires some final fixes before it's fully release-ready. Let us know if you want to driver some LEDs with OBK!
About Author
p.kaczmarek2 wrote 14589 posts with
rating 12611 , helped 654 times.
Been with us since 2014 year.
Here is how you can mode CB3S module. I've cut P14 pad from the via and connected P16 to that via so I can have easier access to P16 for testing. Everything is reversable if need be.
https://obrazki.elektroda.pl/3216382700_1698597352_thumb.jpg... [Read more]
FAQ
TL;DR: On this 21-pad module family, “the designer skipped this pin”: CB2S users who need hardware SPI MOSI can expose hidden P16 by soldering a fine wire to BK7231N QFN pin 12 and rerouting it to a freed pad such as CEN for OpenBeken SPI or LED output. [#20756965]
Why it matters: This mod turns a common Tuya CB2S into a practical SPI-capable board when the stock pads do not expose MOSI.
Module
P16 access
Main method in thread
Best use case
CB2S
Not on stock pads
Remove shield, solder to QFN pad, reroute to CEN pad
Key insight: The cleanest CB2S breakout is not adding a new external pad. It is reclaiming an existing one, then securing the enamel wire with UV-curable solder mask so the QFN joint survives handling. [#20756965]
Quick Facts
CB2S does not expose P16 on its module pads, even though BK7231N maps SPI_MOSI to P16 on IC pin 12. [#20756965]
The accidental failure shown during shield removal was a 100 nF power decoupling capacitor coming off; the module must be repaired before reuse. [#20756965]
The reused CB2S pad in the mod was CEN, the active-low reset pin, because the author flashes by power-cycling instead of using that pad directly. [#20756965]
On the related CBU padout, hardware SPI maps as P14 = SCK, P16 = MOSI, P17 = MISO, P15 = CS, and power is labeled 3V3 and GND. [#20756965]
How do I break out the hidden P16 (MOSI) hardware SPI pin on a Tuya CB2S BK7231N module?
You break it out by exposing the BK7231N, soldering a fine enamel wire to the P16 QFN pad, and routing that wire to a freed module pad. 1. Remove the CB2S shield with hot air and flux. 2. Cut the chosen pad trace, then solder one wire end to P16 on the QFN. 3. Secure it with UV mask and solder the other end to the reused pad, such as CEN. [#20756965]
Why is P16/MOSI available on the BK7231N QFN chip but not routed to the pads on the CB2S module?
P16 exists on the BK7231N package, but the CB2S module layout does not bring that signal out to any external pad. The post states that common GPIOs and some debug pads are exposed, yet P16 is “nowhere to be found,” so the omission comes from the module designer rather than the chip itself. [#20756965]
What is the safest way to remove the metal shielding from a CB2S module with hot air without damaging nearby components?
Use hot air with a large nozzle and extra flux, then lift the shield carefully once the solder loosens. This method worked in the thread, but it still desoldered one nearby 100 nF capacitor, so the safest approach is controlled heat, minimal force, and close inspection immediately after removal. [#20756965]
How should I repair a CB2S if the 100 nF decoupling capacitor gets accidentally desoldered while removing the shield?
Resolder the 100 nF power decoupling capacitor before using the module again. The thread shows that this capacitor came off during shield removal, and the author explicitly says that the issue must be fixed before the CB2S is powered or reused. [#20756965]
What's the best pad to repurpose for bringing out P16 on a CB2S, and why was CEN chosen in this mod?
CEN was the best pad in this mod because it was available and the author did not need it for normal flashing. The post author explains, “I chosen to use CEN because I don't use it for flashing,” relying instead on a power-off and power-on cycle that worked reliably. [#20756965]
How do I cut the CEN trace on a CB2S and reroute that pad to the P16 pin on the BK7231N?
Cut the CEN trace first so the pad is electrically isolated, then connect that pad to P16 with a thin insulated wire. After the trace cut, the thread states that CEN is disconnected from the pad, which lets you reuse the pad for the BK7231N P16 breakout and later solder an external lead there. [#20756965]
What is CEN on a CB2S module, and how does reusing it affect flashing or resetting the board?
CEN is the reset pin on this module family, and it is active low with an internal pull-up. Reusing it removes direct pad access to reset, so the author no longer uses that pad for flashing control and instead resets or boots the board by cycling power. [#20756965]
What is UV-curable solder mask, and why is it useful for securing a fine enamel wire on a QFN pad?
UV-curable solder mask is a PCB insulating resin that holds wires in place after light curing, creating a mechanically stronger and more stable joint. On this mod, it prevents the fine enamel wire from lifting off the tiny QFN pad during storage or handling, which protects the most fragile solder point. [#20756965]
How can I identify the correct BK7231N QFN pad for P16/MOSI and confirm the chip orientation before soldering?
Identify pin 1 from the dot on the package, then use the crystal pads as an orientation cross-check before counting to P16. The thread says to verify the first pad directly, because the P16 breakout depends on landing on the correct QFN pad and not a neighboring pin. [#20756965]
What kind of wire, flux, solder, and tip size work best for soldering to a tiny BK7231N QFN pad on CB2S or CB3S?
Use a very thin enamel wire about the width of the QFN pad, add flux, tin the wire tip, and solder with a thin iron tip. The author used stripped wire from an old transformer or coil, then added flux and some Pb solder before making the final connection to the BK7231N pad. [#20756965]
How does the CB3S P16 breakout mod using the P14 pad or via differ from the CB2S method?
The CB3S version reroutes P16 to the P14 via, while the CB2S version reuses CEN after a trace cut. In the CB3S post, the modifier cut the P14 pad from the via and connected P16 there, specifically to get easier access for testing and keep the change reversible. [#20790939]
CB2S vs CBU vs CB3S: which module is better if I need easy access to SPI pins like P16, P14, P15, and P17?
CBU is the best choice if you need easy SPI access without board surgery. The thread shows that CBU already exposes P14, P16, P15, and P17 on pads, while CB2S needs a QFN-wire mod and CB3S still needs a reroute, even if that reroute can be more reversible. [#20756965]
How can I use the routed P16 pin with OpenBeken hardware SPI to drive WS2812 or SM16703 addressable LEDs on BK7231?
Use the routed P16 as hardware SPI MOSI in OpenBeken, then connect it to supported addressable LED hardware. The thread says OpenBeken on BK7231 already supports SM16703, WS2812 also works, and the exposed P16 is useful specifically for individually addressable LED control through hardware SPI. [#20756965]
What troubleshooting steps help when a CB2S or CB3S P16 breakout stops working after soldering, cleaning, or curing the solder mask?
First inspect the QFN joint, then confirm the reused pad is actually isolated, and finally check that the enamel was stripped at both ends. The thread highlights three common failure points: wrong pad orientation, an unstripped or poorly tinned wire end, and a loose connection that was not secured properly before or after IPA cleaning and UV curing. [#20756965]
Which BK7231 module pins correspond to the hardware SPI signals SCK, MOSI, MISO, and CS, and how are they mapped on CB2S-family modules?
The thread maps hardware SPI as P14 for SCK, P16 for MOSI, P17 for MISO, and P15 for CS. On CBU, those signals are already on module pads; on CB2S, P16 is hidden and must be broken out manually, while the same general method may also work on similar modules such as CB3S. [#20756965]
Comments
Here is how you can mode CB3S module. I've cut P14 pad from the via and connected P16 to that via so I can have easier access to P16 for testing. Everything is reversable if need be. https://obrazki.elektroda.pl/3216382700_1698597352_thumb.jpg... [Read more]