ymHfd

[Tuya Smart] Intelligent temperature and humidity sensor

 
Overview

Thermohygrometer based on Tuya WB3S

Function description

The 51 microcontroller is used to read the sensor value, and localized display is realized through OLED. The temperature can be viewed remotely through Tuya WB3S access to the network. The onboard lithium battery charge and discharge chip and lithium battery protection chip are powered by lithium batteries and can be used in situations where power supply is inconvenient.

designing process

1. Component selection

1. The main control is STC8A8K64S4A12, whose performance meets the requirements of the Tuya module MCU docking solution, and is suitable for people like me who don’t know 32*⸜( •ᴗ• )⸝*.

2. The lithium battery charging and discharging chip uses TC4056A, which has low cost and simple peripheral circuits.

3. The power supply uses two ME6212C33M5G to power the WiFi module and other circuits respectively to prevent insufficient power supply caused by excessive instantaneous power consumption of the WiFi distribution network.

2. PCB design (omitted)

Nothing much to say, just pay attention to the layout of the antenna .

**Problems in the design: **STC microcontroller USB download does not work. This circuit can be ignored and does not affect the core functions.

3. Procedure

The sensor works normally, the temperature and humidity display is normal, and the local program debugging is completed. (2021.02.03) Actual picture.jpg Tuya mcu_sdk docking

The serial communication connection is successful and product information and current status can be obtained (2021.02.05) Debugging Assistant.png

The distribution network and data reporting were successful, and the physical objects were successfully connected to the Internet. (2021.02.07)

Change the boot animation and network status display, add the battery percentage display, the battery is successfully reported to the cloud, and the sensor sampling time supports app customization. (20021.02.09)

Add a network clock and the time will be displayed after connecting to the Internet. (20021.02.18)

V1.1 program download

4. Project progress:

  • [x] Schematic diagram, PCB design (2021.01.23)
  • [x] Physical welding (2021.02.01)
  • [x] Programming and debugging (2021.02.07)

5. Instructions for use:

V1.1:

After powering on, a short press of the button will immediately refresh the sensor data and report it to the cloud. Long pressing the button for 3 seconds will reset the WiFi module and enter the network configuration state. Press and hold again to switch the network distribution mode (smartconfig and AP switch between each other). The upper left corner will display the current network status of the module, and the upper right corner will display the current battery level (The percentage display cannot be implemented temporarily, and the battery data in the cloud is wrong.   Cloud battery data is normal), no operation is performed, and the default is every15SThe sensor data will be refreshed once every 30 seconds (the time can be customized through the app) and reported to the cloud. (2021.02.18)


Networking status S!: smartconfig configuration status A!: AP configuration status (icon display): WIFI configuration is successful but not connected to the router (icon display): WIFI configuration is successful and connected to the router (icon display): WIFI has been connected to the cloud server


Use the demo


参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-08-08 12:48:05

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号