logo elektroda
logo elektroda
X
logo elektroda

Tuya CB3S Temperature Meter with OBK 1.18.177: Pin Mapping for LDR, Temp Sensor, and LCD Display Access

User question

i have flashed tuya temperature meter with obkversion 1.18.177 it has a display the board is cb3s theree is also display and ldr how can i findout the port for temp,for ldr and how acces the display

Artificial Intelligence Response

Direct answer to the question

  • First determine whether your thermometer is a TuyaMCU design (a small local MCU drives the LCD and reports temp/ldr over UART) or a direct‑wired design (sensors and LCD wired to CB3S).
  • If it is TuyaMCU (very common for LCD thermometers), you do not “find ports” for temp or LDR on CB3S; you map Tuya datapoints (dpIDs) to OpenBeken channels, and the LCD remains under the local MCU’s control.
  • If it is direct‑wired, find the pins by:
    • LDR: probe ADC‑capable pins (BK7231N/CB3S typically P23–P26) and look for value changes while covering/uncovering the LDR.
    • Temperature: identify whether it’s an ADC NTC (same ADC pins), an I2C sensor (scan I2C after assigning SDA/SCL), or a 1‑wire/GPIO sensor.
    • Display: identify the display IC/interface (HT1621 3‑wire LCD, TM1637 7‑segment, I2C LCD, etc.) and assign the matching driver/pins in OpenBeken.

Detailed problem analysis

  • Two hardware architectures exist in Tuya LCD thermometers: 1) TuyaMCU architecture:
    • A small 8/32‑bit MCU on the main board reads the temp/ldr, drives the LCD, and talks to the Wi‑Fi module (CB3S) over UART with Tuya protocol.
    • CB3S pins are only RX/TX (plus power), not connected to sensors or the LCD.
    • In OpenBeken (OBK), you run the TuyaMCU driver and map dpIDs to channels: temperature, humidity, light/brightness, battery, etc.
    • Result: You will see values in OBK but cannot directly control or “access” the LCD; it is owned by the local MCU. 2) Direct‑wired architecture:
    • Sensors and display are wired to CB3S pins. OBK drivers (ADC/I2C/TM1637/HT1621/etc.) talk to hardware directly.
    • You must identify which CB3S pins go where and assign “Pin Roles” and drivers in OBK.

How to identify which you have

  • Visual: open the case. If you see a second microcontroller aside from the CB3S and an LCD driver bonded to glass or a chip marked HT1621, it is very likely TuyaMCU. If all routes run to the CB3S and there is no other MCU, it is likely direct‑wired.
  • Software hints:
    • After flashing and booting OBK 1.18.177, open the Web UI → Logs/Console. If you see periodic binary/ASCII packets on a UART pin or “TuyaMCU” messages once you set RX/TX, that’s TuyaMCU.
    • If nothing shows and no Tuya traffic, try scanning I2C and trying ADC pins (see below).

Pin capabilities to keep in mind (BK7231N / CB3S, typical)

  • ADC inputs: commonly P23, P24, P25, P26. Use only these for analog sources (NTC, LDR).
  • I2C: any two GPIOs can be used by OBK as software I2C, but many boards route I2C‑friendly pins (e.g., mid‑range port numbers).
  • UART for TuyaMCU: two GPIOs wired as RX/TX to the local MCU (the board often labels them or routes them as a pair).

Discovery procedures in OBK (no soldering first)

  • LDR (analog): 1) Web UI → Pins/Roles. Assign one candidate pin at a time to role “ADC.” 2) Watch the live value shown next to the pin or on the Channels page; cover/uncover the LDR with your finger/flashlight. 3) The correct pin shows a moving reading with light changes. Keep that pin as ADC and link it to a channel of type “illuminance” (or “analog” if you will post‑process).
  • Temperature:
    • If it is an NTC: same method as LDR (ADC). You’ll see a slow drift with touch/heat. Later convert using an NTC equation or calibration offset/scale in OBK/script.
    • If it is I2C (e.g., AHT20/SHT3x/CHT8305): 1) Pick two unused GPIOs, set roles to I2C_SCL and I2C_SDA. 2) Run an I2C scan from the Web Console. If a device appears (e.g., 0x38, 0x44, 0x70…), start the matching sensor driver and assign those two pins permanently.
    • If it is 1‑wire/GPIO (rare on these Tuya thermometers): experiment by assigning a “DHTxx” role on candidate GPIOs and watch for valid readings in logs.
  • Display:
    • Identify the display type first. Common cases:
    • HT1621 (glass LCD segments): 3‑wire interface (CS/WR/DATA). Many Tuya units use a local MCU to talk to HT1621; CB3S is not connected. If directly wired to CB3S, OBK’s HT1621 driver can drive it once you find the three lines.
    • TM1637 (4‑digit 7‑seg): two pins (CLK/DIO). If your front looks like 4 big digits with a colon/dots, try TM1637.
    • I2C text LCD (2×16) is uncommon in small battery thermometers.
    • If TuyaMCU: you cannot talk to the display from CB3S; you leave it to the local MCU.
    • If direct‑wired: assign the appropriate driver (HT1621 or TM1637), set its pins, and test by printing a value.

TuyaMCU mapping (if your unit is TuyaMCU)

  • Assign two pins to Tuya RX/TX roles that match the board’s UART wiring. Try common pairs until logs show clean Tuya frames (usually 9600 baud; sometimes 115200).
  • Start the TuyaMCU driver and set baud. In the TuyaMCU page/map:
    • Map temperature dpID to channel type “temperature_div10” (many Tuya temps are reported in 0.1 °C units).
    • Map humidity to “humidity”, light/ldr/brightness (if present) to an “illuminance” or “raw” channel, battery to “battery.”
  • Watch the Logs to see which dpIDs change when you heat/cool or cover the sensor; assign those dpIDs accordingly.
  • LCD access: not available from CB3S in TuyaMCU mode; the local MCU updates it.

Direct‑wired calibration

  • LDR: Once the ADC pin is found, create a channel and decide scaling. Optional: convert to lux with a two‑point calibration; otherwise publish as a 0–1 or 0–1023/4095 normalized value.
  • NTC: Determine the resistor divider values. Then convert ADC to temperature using Steinhart–Hart or β‑model in script. A quick two‑point (ice water ~0 °C and room ~25 °C) gives a decent β estimate.

Current information and trends

  • Many recent Tuya LCD thermometers with CB3S are TuyaMCU‑based: CB3S only provides Wi‑Fi/MQTT, while a low‑power MCU handles sensors and the LCD. Expect to map dpIDs rather than wiring pins.
  • OBK 1.18.x has solid TuyaMCU channel mapping, flexible software I2C, and display drivers (e.g., HT1621/TM1637) when hardware is direct‑wired.
  • The “Charts/Script” facilities in current OBK builds allow on‑device scaling/formatting so you can calibrate ADC sensors and periodically update supported displays.

Supporting explanations and details

  • Why ADC pins matter: only ADC‑capable GPIOs can read analog voltages from an LDR/NTC divider. Non‑ADC pins will always read digital 0/1.
  • Why you often cannot access the LCD: in TuyaMCU designs the LCD signals never reach CB3S; they are connected to the local MCU or LCD driver. CB3S only exchanges Tuya protocol frames over UART.
  • Identifying I2C: SCL/SDA lines typically run in parallel with pull‑ups to VCC; an I2C scan detects devices if the lines reach CB3S.

Ethical and legal aspects

  • Safety first: if your unit has or once had mains inside (wall plug, power supply), disconnect from mains and respect creepage/clearance. For battery devices, avoid shorting coin‑cells during probing.
  • Radio compliance: modifying firmware does not change RF HW, but ensure output power/regulatory settings remain default for your region.
  • Privacy: after MQTT integration, secure your broker and disable open AP mode once configured.

Practical guidelines

  • Minimal, systematic workflow: 1) Decide: TuyaMCU or direct‑wired (inspect PCB; check logs). 2) If TuyaMCU:
    • Find RX/TX pins, set baud (try 9600 first), enable TuyaMCU driver.
    • Heat sensor / cover LDR; note which dpIDs change; map to channels. 3) If direct‑wired:
    • Test ADC pins P23–P26 for LDR/NTC.
    • Try I2C scan with two pins as SCL/SDA; if found, start the matching sensor driver.
    • For LCD, try HT1621 or TM1637 with candidate pins and see if test text shows.
  • Useful OBK actions (names may differ slightly by build):
    • Pins/Roles page: set Pin Role = ADC, I2C_SCL, I2C_SDA, TuyaRX, TuyaTX, TM1637_CLK, TM1637_DIO, HT1621_DATA/WR/CS, etc.
    • Drivers page: start/stop drivers (TuyaMCU, HT1621, TM1637, AHTx0/SHT3x).
    • Console: run i2c_scan; watch logs for Tuya frames and sensor detections.
  • Startup script examples (direct‑wired, TM1637):
    • Every 5 s, print temperature channel CH1 on the display:
    • setInterval 5 "tm1637_print $CH1"
  • MQTT: publish discovered channels to Home Assistant; name them logically once mapped.

Possible disclaimers or additional notes

  • Pin numbering silkscreens differ; CB3S pad numbers are not the same as OBK “Pxx” GPIO numbers—use OBK’s GPIO names (P23…).
  • Some boards connect the LDR to the local MCU only; CB3S will never see it directly. In that case, only a TuyaMCU dpID will expose “brightness.”
  • Battery devices often power‑gate CB3S; you may see Tuya data only periodically to save power.

Suggestions for further research

  • Look up your exact model in the OpenBeken device templates list and community forum; many CB3S thermometers already have dpID maps or full pinouts published.
  • If you share clear PCB photos (both sides) and current OBK Logs output, we can usually tell you the exact pins/dpIDs within one or two iterations.
  • If it is HT1621 and direct‑wired but unresponsive, trace the three LCD lines with a multimeter to confirm continuity from CB3S pins.

Brief summary

  • Determine architecture first. If TuyaMCU, map dpIDs to channels; you cannot directly access the LCD from CB3S. If direct‑wired, LDR and NTC use ADC pins (try P23–P26), I2C sensors show up on scan after assigning SDA/SCL, and the LCD is likely HT1621 or TM1637 which OBK can drive once you find the correct pins. Provide PCB photos/logs if you want exact pin/dpID assignments for your unit.

User question

display ic gnv 1792s how to adress this in openbeken

Artificial Intelligence Response

Direct answer to the question

  • In almost all Tuya CB3S/BK7231N temperature/humidity meters that contain the GNV1792S, the LCD driver is controlled by a small local MCU, and the Wi‑Fi module (CB3S running OpenBeken) only talks to that MCU via TuyaMCU UART. In this common architecture you cannot “address” the GNV1792S directly from OpenBeken; instead configure the TuyaMCU driver and map datapoints (dpIDs) to OBK channels. (elektroda.com)
  • Only if you verify that GNV1792S SCL/SDA lines go directly to the BK7231N pins (no local MCU in between) could you drive it from OpenBeken. The GNV1792S uses a 2‑wire SCL/SDA interface (I²C‑like), 36×4‑bit display RAM and 1/4‑duty LCD drive; OpenBeken has no built‑in GNV1792S driver, so you would need a custom driver or scripting. (item.szlcsc.com)

Key points

  • Most practical path: configure TuyaMCU in OBK; don’t try to talk to the LCD IC. (elektroda.com)
  • GNV1792S interface is 2‑wire SCL/SDA (not HT1621‑style 3‑wire), so HT1621 drivers won’t apply. (item.szlcsc.com)

Detailed problem analysis

  • Typical hardware in these battery sensors
    • CB3S (BK7231N) Wi‑Fi module for networking.
    • A low‑power MCU (frequently observed in teardowns of similar devices) that reads the sensor, drives the segment LCD via GNV1792S, and wakes the Wi‑Fi module only to exchange Tuya frames. Multiple community teardowns of CB3S T/H monitors show TuyaMCU UART traffic and separate LCD driver ICs; the display continues to work under the local MCU after flashing OBK. (elektroda.com)
    • GNV1792S segment LCD driver: 36 SEG × 4 COM (144 bits RAM), 1/3 or 1/2/1/4 bias options, supply 2.5–5.5 V, and a two‑wire serial bus labelled SCL/SDA (I²C‑like). These specs come from distributor datasheet pages. (jlcpcb.com)
  • Why you usually can’t drive the LCD from OBK
    • The SCL/SDA (or any control lines) of the GNV1792S are routed to the local MCU rather than the BK7231N pins, so the Wi‑Fi SoC never sees the bus. OBK only exchanges Tuya frames over UART with that MCU. (elektroda.com)
  • OpenBeken capability vs this IC
    • OBK provides TuyaMCU, I²C and SPI infrastructure and many drivers, but no published GNV1792S driver. Creating one is possible, but advanced. (github.com)
  • Battery‑powered caveat
    • Keeping Wi‑Fi awake to “continuously drive” a display is hostile to battery life; community threads note rapid drain when Wi‑Fi is not allowed to sleep. These devices were designed for a sleeping Wi‑Fi with a separate low‑power LCD/MCU subsystem. (elektroda.com)

Current information and trends

  • GNV1792S availability/attributes: widely listed by LCSC/JLCPCB; two‑wire SCL/SDA interface explicitly mentioned; 36×4 RAM and low‑power operation. (jlcpcb.com)
  • OBK development: strong TuyaMCU support; active community recipes for mapping dpIDs to channels and publishing to Home Assistant. (elektroda.com)
  • Practical community experience (2022–2025): teardowns of CB3S T/H meters show TuyaMCU frames and a separate LCD driver; users configure OBK to read dpIDs rather than driving the LCD. (elektroda.com)

Supporting explanations and details

  • How to proceed in the common (TuyaMCU) design
    1. Find the UART pins between CB3S and the local MCU and set pin roles:
      • Try common CB3S pairs (e.g., P10/P11, P0/P1) for TuyaRX/TuyaTX in OBK. Reboot and watch logs for 55 AA … Tuya frames. (elektroda.com)
    2. Enable TuyaMCU driver and set baud (often 9600; some use 115200):
      • In autoexec.bat: startDriver TuyaMCU; optionally tuyaMcu_setBaudRate 9600; tuyaMcu_defWiFiState 4. (elektroda.com)
    3. Map dpIDs to channels:
      • Example commands: linkTuyaMCUOutputToChannel val ; then setChannelType temperature_div10, humidity_div10, battery, etc., so values display and publish correctly. (elektroda.com)
  • If, and only if, the GNV1792S is wired directly to BK7231N
    • Verify with continuity/tracing that GNV1792S pins labelled SCL/SDA go to BK GPIOs, not to a local MCU.
    • Assign those GPIOs in OBK as I2C_SCL/I2C_SDA, then implement a driver:
    • You will need the actual command set from the manufacturer’s datasheet (initialization: oscillator on, bias/duty, display on; then write to internal 36×4 RAM to light segments). No stock OBK driver exists; expect to write C code against OBK’s I²C API. (github.com)
    • Note: GNV1792S is not HT1621‑compatible (that part is a 3‑wire serial controller), so OBK’s or Arduino HT1621 examples are not applicable to this IC. (item.szlcsc.com)

Ethical and legal aspects

  • Reverse‑engineering or modifying the PCB (cutting traces to rewire SCL/SDA from the local MCU to BK) can void warranty and may impair device safety. Proceed only on your own hardware and document changes for future owners. Ensure ESD and battery safety (coin/AAA cells). (elektroda.com)

Practical guidelines

  • Recommended (fast, robust)
    • Treat it as TuyaMCU: find UART pins, enable TuyaMCU, link dpIDs to channels, and integrate with MQTT/HA. This leaves the original local MCU in charge of the LCD. (elektroda.com)
  • Advanced (only if direct I²C wiring is proven)
    • Obtain the GNV1792S datasheet, confirm the device address and command set; write a minimal OBK driver that initializes the chip and updates RAM; characterize the segment map by writing test patterns. Expect hours with a logic analyzer if the glass/segment mapping is unknown. (item.szlcsc.com)

Possible disclaimers or additional notes

  • Distributor pages confirm the GNV1792S interface and capabilities but may omit protocol timing details; you’ll need the full datasheet to implement a reliable driver. (item.szlcsc.com)
  • Battery devices running OBK continuously can drain cells much faster than factory firmware designed around a sleeping radio. (elektroda.com)

Suggestions for further research

  • Post clear PCB photos (both sides) so we can confirm whether SCL/SDA from the GNV1792S go to BK7231N or to the local MCU, and identify the UART pins quickly.
  • Review OBK TuyaMCU setup guides and examples for mapping dpIDs and publishing to Home Assistant. (elektroda.com)
  • Keep an eye on OBK repository for new peripheral drivers; if you develop a GNV1792S driver, consider contributing it upstream. (github.com)

Brief summary

  • The GNV1792S is an I²C (SCL/SDA) segment LCD driver (36×4 RAM). In Tuya CB3S meters it is almost always driven by a separate low‑power MCU, not by the BK7231N. With OpenBeken you typically do not address the GNV1792S directly; instead, enable TuyaMCU, discover dpIDs, and map them to channels. Only if you confirm the LCD driver is wired to BK7231N’s GPIOs should you attempt a custom I²C driver for GNV1792S in OBK. (item.szlcsc.com)

If you can share board photos or which pins you’ve already tried for TuyaRX/TuyaTX, I’ll help you finish the exact OBK configuration.

Ask additional question

Wait...(2min)
Disclaimer: The responses provided by artificial intelligence (language model) may be inaccurate and misleading. Elektroda is not responsible for the accuracy, reliability, or completeness of the presented information. All responses should be verified by the user.