走马观花

[Tuya Smart] Tuya Smart 7-in-1 Air Box

 
Overview

 

All basic functions have passed the test and are all normal. All functions have been realized. Except for the amplification design of the op amp part that is too high, the rest of the circuit is normal (V2 version has been corrected).

       In the PCB layout, the Tuya module uses a module with an IPEX interface. If the antenna is not plugged in, no radio frequency will come out. You need to plug in the radio frequency antenna (V2 version has been corrected).

The code is shared on GitHub, there is a link at the end of the article, and only the firmware is provided in the attachment.

 

Finished product renderings:

lIvlZqON9QzmUet5PBTqcIo1UUczm6HSZezi1E7m.jpeg

To facilitate debugging, the panel is not attached.

 

Actual circuit board:

cbCNMcvaRxkZrmcYDxodPh9HOSTBMZV8lHn75YIU.jpeg

                              Component side

 

 

bgzHNHgWIcA1dnh35YsseRyBJYWfXbQAQ4P4e2iK.jpeg

                                   screen surface

 

1. Function overview:
1. Supports detection of C02, temperature, humidity, illumination, formaldehyde, PM2.5, and noise.
2. With 2.8-inch TFT touch screen, supporting color display and touch control.
3. Supports battery power supply, using 3.7V lithium-ion battery.
4. Support battery power detection, overcharge, over-discharge, and low-voltage protection.
5. With buzzer, it can be used for detection and alarm.
6. With a one-button power-on circuit, under normal circumstances, when the machine is turned off, the lithium battery will only draw a few microamps of current.
7. Support LCD backlight adjustment.


2. Design functions:
1. User operation interface
realizes the operation interface of the machine that interacts with the user (for example: sliding screen, parameter setting, parameter viewing, etc.).
2. The cloud service
directly uses Tuya Cloud to provide cloud services, and the box detection parameters can be viewed at any time on the mobile phone.
3. Power management
controls the working conditions of different circuits when the power is plugged in, not plugged in, or the battery is low, and maintains stable operation of the box under specific conditions.
4. Intelligent warning:
When a certain detection value exceeds the standard, the buzzer will sound the alarm, and the screen will display the specific alarm item. The user can cancel the alarm by pressing the button.

 

3. Function realization

1. The user interface is divided into main interface, details page, settings page and information page.

   1) The main interface mainly displays the actual parameters of several important detection data (PM1, PM2.5, PM10, temperature and humidity, formaldehyde, carbon dioxide). The main page has weather and calendar functions, which can display weather information released by the current city.

   2) Details page, this page can display the data of all sensors, and the data is updated in real time.

   3) Setting page: This page can modify some parameters of the control box (such as temperature scale, calibration time, reset WIFI, etc.).

   4) Information page: This page can display the box’s operating information and author-related information.

2. Cloud services

    Choose Tuya's wbr1d module and go directly to Tuya Cloud. Regarding the module, the module selected in the V1 version does not have an ipex interface, because it is installed in the box. It is recommended to choose a module with an IPEX socket, which has a better signal.

3. Power management

   The power of the box can be turned on/off through the power button to turn it on and off. At the same time, after the box is running normally, the buttons can also be used as ordinary buttons, allowing one button to be used for multiple purposes.

   It has a built-in 3.7V 2000mAh lithium-ion rechargeable battery. The board is equipped with power management and boost circuits, which can realize functions such as charging management, battery power supply, power supply + battery, single power supply, and battery over-discharge protection.

   Equipped with battery power monitoring, it can adjust the power consumption of the box according to changes in power to protect the battery from damage.

   Built-in lithium battery boost circuit, with high boost efficiency, low loss and high output power.


4. The shell and sensor
shell use a common mode shell, and the appearance is a little different.

XUuWUbI0MdCjH2rDPZsOyT9u8OoHHGfOjw1BmvcO.png

Since the shell is a common-mode shell, the dimensions are a bit inappropriate in some places during installation, but they are within the acceptable range.

 


The sensors use off-the-shelf modules. As follows:
Dust sensor, model: PMS7003, has high accuracy, stability, and relatively low power consumption.

AirW8oiiqdkqXtvSvmNAVgs6wIB7mxaQQvBQPe0F.png

 

Formaldehyde sensor, model: DART WZ-S, has high accuracy and low power consumption. It just takes a while after power-on for data to be returned.

jPq0FNMcY94UtZ2QmbjCyKeD5GfZZhX4ZXum2yFO.png
Carbon dioxide sensor, model T6703-5K, has high accuracy and low power consumption. Please pay attention to keeping the detection port away from debris and stains.

     Personally, I think this module should be led out with a flat cable, otherwise it will take up too much space when soldered on the board, and it will be difficult to disassemble.

KQjD3DKmjUetbmGRCMMdWnnPl7Qr52svTIuElEuP.png

 

5. Description

1. The program is written using a firmware library, and the code is constantly updated to fix bugs.

2. The box uses an LCD screen, which supports Chinese character display and picture display. Since Chinese characters and pictures are to be displayed, a Chinese character library and a picture library (used pictures) are required.

The font library and image library are stored in external Flash (W25Q128). If there is no image library and font library in W25Q128, the box cannot operate normally.

3. The font library and image gallery are written together with the STM32 program when downloading the box program. The principle is to load the STM32 external SPI Flash programming algorithm through MDK to program W25Q128.

It only needs to be programmed once, and there is no need to modify the internal data of W25Q128 later. Modifying any part of the microcontroller program will not affect the font and library data inside W25Q128 (except for full chip erasure).

4. Compared with the capacitive screen, the resistive screen used for the display screen has a slower touch response and is prone to error detection, so do not click too fast during operation.

5. Please refer to the instructions in the attachment for how to download the font library and image gallery.

 

Code repository: https://github.com/VCJ-550/SmartAirSTM   

 

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-23 08:41:37
  • The world's thinnest glass keyboard
  • Summary of basic knowledge points of C language
  • CC2640R2F Chinese data sheet download -TI Bluetooth MCU
  • Please tell me about the I2C slave device no response phenomenon
  • dll path problem under wince
  • Ask WinCE 5.0 DM9000E driver problem

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号