Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamcb3s ик пульт
‐ CB3S does not contain an on-board infrared (IR) LED or IR receiver, therefore it is not a self-contained IR remote.
‐ Nevertheless, any CB3S module (BK7231N MCU, 3.3 V logic) can drive an external IR LED or read an external IR demodulator via its GPIOs, turning the module into a Wi-Fi/Bluetooth IR blaster or IR learner/receiver once the firmware is prepared (Tuya SDK or open-source projects such as OpenBeken, LibreTiny-Tasmota).
‐ Ready-made Tuya IR blasters (e.g. S06, S06 Pro, AUBESS, Moes) already integrate CB3S plus the needed IR hardware; for custom hardware you must add:
• 940 nm IR LED + NPN/MOSFET driver + current-limit resistor (transmit)
• 38 kHz demodulating receiver (TSOP4838, VS1838B) + 100 nF decoupling (receive)
CB3S hardware capabilities
• MCU: Beken BK7231N, 32-bit @ 120 MHz
• Supply: 3.0–3.6 V, typical 3.3 V, ~80 mA peak with Wi-Fi TX
• 24 GPIOs (shared with UART/SPI/I²C/PWM); any free interrupt-capable pin can generate 38 kHz PWM or capture edges.
• 2 MB flash / 256 kB SRAM.
IR transmitter interface
Diagram (common values for 3.3 V supply):
3.3 V ──┬────────┐
│ │
47 Ω 100 nF
│ │ (close to LED)
│ │
│ IR LED (anode)
│ │
NPN/MOSFET ↓ (collector/drain)
│
└─── GND
GPIOx ──1 kΩ──► Base/Gate (NPN 2N2222 or N-MOS 2N7002)
• Calculate resistor: I_LED ≈ 50 mA → R ≈ (3.3 V – 1.2 V)/0.05 A ≈ 42 Ω.
• PWM 38/56 kHz with ~33 % duty set in firmware.
IR receiver interface
3.3 V ── TSOP4838 Vcc
GND ── TSOP4838 GND
GPIOy ── TSOP4838 OUT (active-low pulses)
||
100 nF
(Vcc-GND)
• No pull-up needed; internal pull-up can be enabled if receiver has open-collector.
• Keep leads short, add shielding if strong 802.11 noise is present.
Firmware options
a) Tuya official MCU-SDK: requires NDA, cloud binding; IR libraries are part of Tuya’s “General Remote” reference.
b) Open-source:
‑ OpenBeken ≥ 1.17 (2023) — “IRSend” / “IRRecv” roles, MQTT/HTTP commands IRSend <proto> <addr> <cmd>
; AC protocols supported via IRremoteESP8266 port.
‑ LibreTiny + Tasmota-BK / BK-Tasmota — similar syntax to classic Tasmota.
‑ Arduino-BK (Beken SDK wrapper) for fully custom code.
Typical workflow (DIY IR blaster)
P26 → IRSend
, P24 → IRRecv
(example). Range optimisation
• Use high-power IR LED (5 mm, 1 W packages available).
• Transistor/MOSFET must sink ≥ 100 mA; respect continuous vs. peak current rating.
• Collimator lens or multiple LEDs for > 10 m line-of-sight.
Complex protocols (air-conditioners)
• Single command may be 100–200 ms, 150–350 bytes.
• OpenBeken implements brands: Midea, Gree, Daikin, Mitsubishi, etc. Use JSON blobs:
IRSend HVAC {"vendor":"Midea","power":1,"temp":24,"mode":"cool"}
• 2023–2024: community firmware for BK7231N reached feature parity with ESP8266 (IRremote, TLS MQTT, BLE gateway).
• Tuya started migrating to CB2S (RTL8710) and CB4/BK7231T; IR support remains identical.
• Matter-over-Wi-Fi roadmap: CB3S can run Tuya-Matter stack but IR abstraction not yet in CSA spec.
• Commercial CB3S-based IR hubs retail under USD 10; many expose test-pads for re-flashing.
• The IR carrier (38 kHz) is simply a square wave gated by the data stream; on BK7231 this can be done with PWM1 and a logic OR in software, or bit-bang in timer IRQs (OpenBeken uses hardware PWM).
• A demodulating receiver outputs demodulated bursts (mark/space) already free of carrier, simplifying decoding.
• IR (below 1 mW) is unlicensed worldwide, but:
– Capturing and reproducing proprietary codes may violate warranties; reverse-engineering © is usually legal for interoperability in many jurisdictions, but check local laws.
– Wi-Fi transmission must comply with ETSI/FCC limits; maintain RF shielding when embedding CB3S.
• GPIOs P0/P1 are boot-mode strapping lines—avoid pulling them at reset.
• Some Tuya IR hubs use 5 V LED drive with boost converter; CB3S alone cannot source > 120 mA; follow absolute ratings.
• AC protocols are frequently updated by vendors; future models may need firmware updates.
• OpenBeken wiki “IR” section: pin mapping, JSON HVAC syntax.
• BK7231N datasheet v1.5 for PWM register description.
• IRremoteESP8266 GitHub for exhaustive protocol list and timing tables.
• Tuya Developer portal → General IR Remote Reference Design.
CB3S is a Wi-Fi/BLE SoC without native IR hardware. Add an external 38 kHz demodulator (receive) or an IR LED with transistor (transmit), flash CB3S with firmware that supports IR (OpenBeken, Tuya SDK, LibreTiny-Tasmota), and map the chosen GPIOs. This turns the module into a fully-featured IR blaster/learner that can be integrated with MQTT, Home Assistant, Yandex Alice and other smart-home ecosystems.