Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamcb2s baglantı şeması
• The essential connections for the Tuya CB2S Wi-Fi module (BK7231N) are:
– 3V3 (VCC, Pin 1) → regulated 3.0 … 3.6 V supply (nominal 3 V 3)
– GND (Pins 3 & 15) → system ground
– UART-TX1 (Pin 7) → RX of USB-to-TTL adapter
– UART-RX1 (Pin 5) → TX of USB-to-TTL adapter
– CEN (Pin 10, active-LOW) → momentarily pulled to GND to reset / enter boot-loader
• All pins are 3.3 V logic; never apply 5 V.
• A full pin-out table and typical flashing/embedded connection diagram are given below.
Module overview
The CB2S is a 24-pad castellated SMT module that integrates a BK7231N Wi-Fi SoC, 32 Mbit serial flash and PCB antenna. It exposes power, UART1, two ADCs and up to 15 multi-purpose GPIOs that can be mapped to PWM, I²C, SPI, etc.
Pin numbering & orientation
• Reference is the official Tuya datasheet (rev. 2023-11). “TOP view” means antenna at the top, pads facing you.
┌─ ANTENNA ─┐ TOP VIEW 1◄──┴───────────┴──►12 24◄───────────────►13 └─────────────┘ (Pin-1 marking is a square pad)
Comprehensive pin-out
Pad | Name | BK7231N IO | Default peripheral | Notes / remarks |
---|---|---|---|---|
1 | 3V3 | – | – | 3.0-3.6 V supply |
2 | P8 | IO 8 | PWM / GPIO | |
3 | GND | – | – | Ground |
4 | P7 | IO 7 | PWM / GPIO | |
5 | RX1 | IO 10 | UART1_RX | Needed for flashing |
6 | P6 | IO 6 | PWM / GPIO | |
7 | TX1 | IO 11 | UART1_TX | Needed for flashing |
8 | ADC1 | IO 23 | ADC (0-1.0 V) | 12-bit SAR |
9 | P24 | IO 24 | PWM / GPIO | |
10 | CEN | – | RESET_N | Active-LOW reset / enable |
11 | P26 | IO 26 | GPIO / PWM | |
12 | P15 | IO 15 | PWM / GPIO | |
13 | P14 | IO 14 | PWM / GPIO | |
14 | P9 | IO 9 | I²C-SDA (alt) / GPIO | |
15 | GND | – | – | Second ground |
16 | P17 | IO 17 | PWM / GPIO | |
17 | P16 | IO 16 | PWM / GPIO | |
18 | P1 | IO 1 | SPI-CS / GPIO | |
19 | ADC2 | IO 21 | ADC (0-1.0 V) | Optional; not bonded on all PCB revisions |
20 | P3 | IO 3 | SPI-MISO / GPIO | |
21 | P0 | IO 0 | SPI-CLK / GPIO | |
22 | P4 | IO 4 | SPI-MOSI / GPIO | |
23 | P2 | IO 2 | I²C-SCL (alt) / GPIO | |
24 | P5 | IO 5 | PWM / GPIO |
CB2S pad Purpose USB-TTL / Programmer
────────── ─────────────── ─────────────────────
Pin 1 3V3 → 3.3 V OUT (must supply ≥300 mA)
Pin 3 GND → GND
Pin 7 TX1 → RX
Pin 5 RX1 → TX
Pin 10 CEN —> push-button to GND (hold LOW, power-up, release)
Include a 0.1 µF ceramic and a 100 µF electrolytic between 3V3 and GND close to the module for brown-out immunity.
• Community firmware (LibreTiny, OpenBK, OpenBeken) actively support CB2S; their docs reflect the same pin map.
• New “CB2S-J” variant (2023) keeps the pad assignment but moves the antenna; layout above is still valid.
• Manufacturers increasingly switch to 1-T packaging of BK7231N-32UQFN; CB2S remains a drop-in RF-certified module to speed compliance (FCC ID 2ANDL-CB2S).
• OTA update chains (HTTP + TLS-1.2) are now part of the Tuya and LibreTiny stacks, reducing the need for physical flashing after first install.
• Why CEN instead of EN/RST? BK7231N combines core enable and reset; pulling it LOW during power-up vectors the ROM boot-loader to UART1 at 115 200 Bd or 1 500 000 Bd (auto-detect).
• Logic-level tolerance: all GPIO are NOT 5 V tolerant; absolute max = 3.6 V.
• ADC scaling: internal 1.0 V reference, so divide external analog signals (≈ 3.3 V) with 220 k/68 k or similar.
• Using CB2S inside commercial products requires preservation of FCC/CE labelling unless antenna or enclosure conditions change.
• Flashing third-party firmware voids Tuya cloud key material; ensure GDPR/consumer-data compliance when collecting telemetry.
• Respect open-source licences (Apache-2.0 for LibreTiny, GPL-2.0 for OpenBK).
• Datasheet revisions differ slightly in pin naming (P24 vs IO24); always cross-check with latest PDF (see source [7]).
• ADC2 (pad 19) is bonded only on rev-B silicon; earlier modules leave it NC.
• Evaluate BK7231T (Arm Cortex-M4F) + CB3S for higher throughput or BLE coexistence.
• Study Tuya’s “IoTOS V3.6” versus lightweight open stacks for power-saving (< 56 µA DTIM = 3).
• Investigate Matter-over-Wi-Fi porting on BK7231N (experimental in LibreTiny 0.8.0-dev).
The CB2S module requires only five essential pads for power, ground and UART1 to flash or integrate into a design. Provide a clean 3.3 V rail, cross-connect UART signals, and control the CEN pin for reset/boot-loader entry. The full 24-pad pin-out, given above, lets you exploit PWM, ADC, SPI or I²C peripherals in production hardware while respecting 3.3 V limits and RF keep-out rules.