01
introduction
The smart cloud home system designed in this paper can transmit the information collected by the sensor to the server of the Gizwits Cloud IoT platform through ESP8266, and then remotely monitor and manage it through the smart watch. The sensors used in this system are relatively common and cheap, and the accessories are widely sourced and highly accurate, scalable and highly portable, thereby reducing hardware costs and greatly improving the cost performance of the product.
02
System hardware structure
The hardware structure of the first part of the system is shown in Figure 1. It uses STM32F103ZET6 single-chip microcomputer as the core, equipped with temperature and humidity sensors, gas sensors, light intensity sensors, smoke sensors, relays, motors, and ESP8266 as a communication module for data cloud transmission.
In order to make the system data transmission more stable and reliable, this system uses STMicroelectronics' STM32F103ZET6 microcontroller. The main frequency of this microcontroller can reach 72MHz, and it has resources such as 4-channel PWM, 13 communication interfaces and 16-bit timers, which can meet the requirements of this design.
Figure 1 Hardware system framework
The hardware structure of the second part of the system is shown in Figure 2. WT-32-SC01 is a visual touch screen with ESP32 as the core. This development board is used as the core of the smart watch, and the home is remotely monitored and managed by connecting to the Gizwits cloud platform.
ESP32 is a product of Espressif Corporation. It integrates power management, power amplifier, RFbalun, filter, and receiving low-noise device, which can realize powerful processing performance and WiFi function.
Figure 2 WT-32-SC01 object
Smart home data cloud transmission
The data cloud transmission function of this system adopts the ESP8266 of Espressif, which has a self-contained system and a complete WiFi network solution. In AP mode, ESP8266 can access wireless services, such as routers, etc., so as to interconnect with the cloud of Gizwits. The main control chip will analyze and process the collected information, and transmit it to the cloud platform of Gizwits through ESP8266.
Smart Watch Remote Monitoring
The smart watch designed in this system uses ESP32 as the core, connects to the router in the STA mode of ESP32, and then connects to the mobile Internet; by accessing the IP address of Gizwits Cloud, it can read various information stored in the smart home in the cloud and give real-time feedback Displayed on the smart watch to achieve the purpose of remote monitoring. The smart watch monitoring terminal is shown in Figure 3.
Figure 3 Smart watch monitoring terminal
Smart Watch Remote Management
When the smart home designed by this system is in normal operation, the smart home can be remotely managed through the touch screen on the smart watch. Through the touch screen, the smart watch will feed back the commands to the Gizwits Cloud platform in real time, and the Smart Cloud Home will read the commands from the Gizwits Cloud, perform a self-check and execute the commands. For example, remotely turn on electric fans and LED lights, etc.
Smart home smart adjustment
The system will turn on the intelligent adjustment function under normal operating conditions. The system uses a temperature and humidity sensor to detect the indoor temperature and humidity. When the temperature exceeds the set threshold, the system will automatically turn on the fan to cool down the room; when the indoor carbon dioxide concentration reaches the threshold, the relay will drive the exhaust fan. Ventilation; when the light intensity is lower than the set threshold, the LED lighting will be automatically turned on; when a large amount of carbon monoxide is generated in the room, the system will alarm and ventilate to exhaust the carbon monoxide in the room. All thresholds of intelligent adjustment can be adjusted according to the situation.
03
Software Design and Implementation
Smart home system collection data
The single-chip computer of this system initializes each sensor, and the sensor transmits the collected information such as temperature and humidity, carbon dioxide concentration, light intensity, carbon monoxide concentration, etc. to the main control chip, and the main control chip will analyze and process the received data and wait for send. The data collection process of smart cloud home is shown in Figure 4.
Figure 4 Smart cloud home data collection process
Smart home data cloud transmission
The main control chip sets the time interval for sending data each time through the timer, which can effectively improve the system stability. The main control chip connects the processed data to the Internet through ESP8266 and then transmits it to the Gizwits cloud platform. The cloud transmission process of smart cloud home data is shown in Figure 5.
Figure 5 Smart cloud home data cloud transmission process
Smart watch remote monitoring data cloud transmission
The smart watch reads the data from the Gizwits Cloud platform by connecting to the mobile Internet, and the main control chip ESP32 on the watch side displays the data on the touch screen in real time. The flow of data displayed on the smart watch is shown in Figure 6.
Figure 6 The flow of data displayed on the smart watch
Smart Watch Remote Management
Through the touch feedback of the touch screen, ESP32 transmits the commands to the Gizwits Cloud IoT platform in real time, and finally to the smart cloud home system. Figure 7 shows the process of sending commands for touch feedback on the smart watch side.
Figure 7 Smart watch side touch feedback command
Smart adjustment
The system automatically turns on the adjustment system under normal operating conditions, and the main control chip analyzes the data transmitted by each sensor to judge whether each state is within the threshold value and perform intelligent adjustment. The intelligent adjustment process is shown in Figure 8.
Figure 8 Intelligent adjustment process
04
Experimental results
The real object of the smart home system is shown in Figure 9. Carry out hardware and software tests on the system. This system uses sand table building as the carrier, and fixes each functional module on each position of the sand table building. It passes the smart cloud home data collection system test, data cloud transmission test, smart watch remote monitoring test, smart The mobile phone remote management test and the smart cloud home smart adjustment test prove that the system can operate normally. The smart watch remotely displays "normal startup" in real time, which is consistent with the data collected by the smart home, and the response time of the system is about 1s. The processing error of the system for temperature and humidity, smoke concentration, and carbon monoxide concentration exceeding the threshold is 1% to 5%, which meets the design requirements.
Figure 9 Smart home object
05
Experiment summary
In response to the aging phenomenon in our country, it is necessary to liberate young people from the tedious, complicated and high-repetition daily housework, so that they can focus on more valuable and creative affairs. The smart cloud home system researched and developed in this paper can be installed in the homes of most families. It has the advantages of high scalability, strong stability, and high cost performance, and can effectively improve people's quality of life.
The scheme in this paper can also be optimized from the following aspects: optimize the data transmission system, reduce the data delay time, so that it can display data on the smart watch faster; increase the remote monitoring and management function of the mobile phone APP, and the current usage rate of smart phones is very high , is a good remote monitoring and management platform.
Past recommendation
☞ IDC China 2022 IoT Platform Evaluation Report
☞ IoT Platform Trends in 2022: Privatization
☞ 5 failed lessons worth sharing about Internet of Things startups