logo elektroda
logo elektroda
X
logo elektroda

On-PCB BK7231N TH01 Battery Temp/Humidity Sensor with SHT30 Sensor - Another Variant

divadiow 1710 9
ADVERTISEMENT
  • #1 21110006
    divadiow
    Level 35  
    Hi

    I won't go mad with detail because it's just another TH01 type battery temperature/humidity sensor that other threads can be consulted on for more intimate detail on this kind of device. Posting so this can be another +1 for the device list.

    This one appears to vary in that it has no module. The BK7231N is soldered directly to the PCB and is accompanied by an SHT30 temperature and humidity sensor.

    TH01 temperature and humidity sensor with attached test wires on a wooden table next to the casing. TH01 temperature and humidity sensor with connected wires on a wooden floor background. User manual brochure for a temperature and humidity sensor. Sensor box with a label containing barcodes and compatibility icons. Wi-Fi temperature and humidity sensor kit, user manual, and reset tool. Close-up of a printed circuit board with a BK7231N chip and other electronic components. Close-up of a PCB with a BK7231N chip. Close-up of a circuit board with a soldered integrated circuit and components. Circuit board with mounted integrated circuit and electronic components.

    The test pads are

    Printed circuit board of a temperature and humidity sensor with BK7231N chip.

    The two unlabelled in the middle are two of these 4 I believe

    Diagram of connections with labeled pins on a circuit board.

    which means there is no readily available UART2_TXD for the output log. The underside of the PCB is plain but for a ground pad.

    Dump attached. Firmware version 1.1.17, which looks to be cloudcuttable. Extracted pin assignments:

    Code: Text
    Log in, to see the code


    and the user params

    Code: JSON
    Log in, to see the code


    The presence of "net_led_pin":"26" in the json but not in the plain text assignment list means Easy Flasher forgot to include P26 for the WifiLED.

    It's good to see the new additions showing

    Code: Text
    Log in, to see the code


    which means we assign the SHT:
    Screenshot of the pin configuration interface for P7 and P8 with SHT3X assignments.

    The alert pin is not yet usable.

    basic autoexec to config battery:

    Code: Text
    Log in, to see the code


    P20 button swapped for DoorSnsrWSleep so the button can wake the device from deep sleep.

    Data table for DoorSensorWithDeepSleep driver.

    Code: JSON
    Log in, to see the code
  • ADVERTISEMENT
  • #3 21110323
    p.kaczmarek2
    Moderator Smart Home
    That's a nice discovery, I haven't seen any such sensor (door/humidity/water) with BK7231 directly on PCB. Is that yet another method used to reduce costs by Tuya?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #4 21111898
    divadiow
    Level 35  
    A reasonable assumption
  • ADVERTISEMENT
  • #5 21516997
    fernandorpeixeiro
    Level 4  
    Hi and congratulations for your excellent work.

    I've a problem with a sensor, it's like the one posted in the first message.
    It doesn't show temperature nor humidity.
    I've flashed it with openbeken, last version. It shows battery percentage, although I'm feeding it with a lm1117.

    In the log is showing a clear message that states: "Info:MAIN:Driver SHT3X is not known in this build."

    Is there a way to test if sht30 isn't damaged? I'm not using this sensor for a few months, without batteries.

    This is the startup command:
    addEventHandler OnClick 20 startScript this runmeas 456

    init:
    echo "Init driver and powersave "
    startDriver TuyaMCU
    setChannelType 3 toggle
    setChannelType 1 temperature_div10
    setChannelType 2 humidity

    again:
    echo "activate SHT3X Sensor"
    startDriver SHT3X
    setChannel 3 1
    echo "Send some measure"
    delay_s 2
    echo "stop SHT3X driver"
    stopDriver SHT3X
    setChannel 3 0
    echo "wait 10min"
    delay_s 10
    goto again

    runmeas:
    // stopScript ID bExcludeSelf
    // this will stop all other instances
    stopScript 456 1
    echo "Force measurement"
    startDriver SHT3X
    setChannel 3 1
    delay_s 2
    stopDriver SHT3X
    setChannel 3 0
    echo "go back to loop"
    goto again;

    For now I'm only interested in having temp and humidity values, because probably the sensor will be permanently energized, so don't mind about power save modes.

    Thanks for any help.
    Fernando

    Screenshot of system logs, showing channel changes, MQTT connections, and errors related to unknown SHT3X driver.

    Screenshot of the OpenBekenX user interface showing device status information.

    GPIO interface configuration showing a list of pins and their functions.
  • #6 21517270
    max4elektroda
    Level 20  
    SHT3X driver is not enabled in the firmware by default.
    If you have a git account, you can download a version with this driver in the artifacts of
    PR #1601.
  • ADVERTISEMENT
  • #7 21517587
    fernandorpeixeiro
    Level 4  
    >>21517270
    Good morning
    Thanks max4elektroda, you nailed it.
  • #8 21614248
    fernandorpeixeiro
    Level 4  
    Hi,
    Today I was trying to connect other Tuya sensor to my Home Assistant setup, and I saw that there was an upgrade. As soon as the upgrade started to roll, the sensor, I have the one above, stopped publishing temperature and humidity.
    On the log was the same that I posted on 5#, I tried to roll back to version "OpenBK7231N_1.18.118.rbl", no luck.
    Can someone get me the ota file with sht3x driver, or explain what am I doing wrong?

    Thanks.
  • #9 21614257
    p.kaczmarek2
    Moderator Smart Home
    I think that Releases section has _sensors build version of OpenBeken available for download. https://github.com/openshwprojects/OpenBK7231T_App
    Helpful post? Buy me a coffee.
  • #10 21615280
    fernandorpeixeiro
    Level 4  
    >>21614257
    Thanks p.kaczmarek2, by the way, why so many versions? Couldn't they all fit in one single release?

Topic summary

A new variant of the TH01 battery temperature/humidity sensor was presented, featuring the BK7231N chip soldered directly onto the PCB alongside an SHT30 temperature and humidity sensor, differing from previous versions that used a CBU module. The pin assignment matches earlier devices, with some discussion on the alert pin configuration. This design may represent a cost-reduction approach by Tuya. A user reported issues with temperature and humidity readings after flashing the sensor with OpenBeken firmware, noting the log message "Driver SHT3X is not known in this build," indicating the SHT3X driver is not enabled by default. The solution involves using a firmware build that includes the SHT3X driver, available in the artifacts of pull request #1601 on the OpenBeken GitHub repository.
Summary generated by the language model.
ADVERTISEMENT