Smart home is a living environment that is efficient, comfortable, safe, convenient and environmentally friendly, with the house as the platform, building equipment, network communication, information appliances and equipment automation, and integrates systems, structures, services and management. It uses advanced computer technology, network communication technology and integrated wiring technology to organically combine various systems related to home life, and through overall management, make home life more comfortable and safe. Home automation, home network, network appliances, information appliances and other products are all smart home system products.
Data collection, processing and transmission are the core of realizing intelligent community control. Here, a scheme for collecting basic information of owners is designed, which uses embedded system as development platform and TCP/IP protocol as information transmission method.
Due to the development and popularization of the Internet, the use of TCP/IP protocol is simple, convenient, low-cost, open and highly standardized. On the one hand, the property management center obtains the latest news (weather forecast, major news, etc.) through the Internet and publishes it to the outside. On the other hand, it uses the data collected from each node to control, make decisions and coordinate, and publish information to the outside.
1 Data Acquisition System Design
1.1 Basic requirements
Each owner collects, processes and analyzes his or her basic information (mainly including the readings of electricity meters, water meters, barometers, etc.) and indoor conditions (mainly including temperature, natural gas concentration, etc.) to complete the control of individual owners, and transmits it to the property management center for use by property management personnel and reference by the majority of owners. The basic requirements that must be met are as follows:
It is compatible with all kinds of sensor devices in the owner's home, that is, it can realize the collection of multi-channel analog and digital signals. The collection time interval is 30 s to 2 min.
It has the function of owner control and can realize data transmission, processing and control. Once the communication network fails, each node can realize the alarm function based on historical data and currently collected information.
It receives information sent by the management center in real time and can make corresponding displays to remind the owner of his current situation. It has rich communication interfaces (TCP/IP communication interface, RS 232/USB interface, etc.) and large memory space. The composition principle of the data acquisition system is shown in Figure 1.
1.2 System Design
1.2.1 Node hardware composition
Taking into account the complete independence of each owner, the front-end device adopts an embedded design method, and its hardware structure is shown in Figure 2.
As part of the control, the node must complete the control function of each owner. The control is realized by using the various data collected and the coordinated control instructions issued by the center, which are processed by the node. Therefore, a node consists of three functional units: data collection, transmission, and control. The realization of these functions is completed through the embedded system.
According to its functional requirements, its data flows are: first, the data collected from each sensor is processed through the intermediate processing process and displayed in front of the owner; second, the data taken from the information collection system is processed through the intermediate processing process, uploaded to the property management center, and stored in the database; third, the management center issues system coordination and control commands or processing results and displays them in the owner's home.
1.2.2 Data Collection
The main function of property management data collection is to send the original data of each owner's water meter, electricity meter, gas meter, etc. to the node for pre-processing through various detectors.
Common sensor technologies include reed switch sensors, Hall sensors, infrared sensors, IC card controllers and electronic sensors. This system uses electronic sensors. Electronic sensors are installed under the dials in the counting mechanisms of ordinary water meters and gas meters, so that the sensors rotate synchronously with the counting gears. The electronic information obtained by the electronic sensors is completely synchronized with the mechanical readings, forming a certain functional relationship. After A/D conversion, digital information of the water meter and gas meter readings is obtained respectively. The readings of the electric meter can be obtained by using an electronic smart meter. It is transmitted to the microprocessor through the RS 232 interface.
The camera data communicates with the processor via the USB interface. It is mainly used to turn on the camera when the owner is away (especially on vacation). It can monitor the living room or other important places.
1.2.3 Data Preprocessing
The main function of node data preprocessing is to filter the abnormal data collected by various detectors, remove illegal and invalid data, recover fault data, format valid and legal data according to standards, encapsulate it, and send it to the data channel or database specified by the measurement and control center through the communication network using TCP/IP protocol. Provide it to the property management center. The real-time detection traffic data collected after preprocessing is more effective and more in line with the needs of actual conditions, and effectively saves the workload of computer storage.
1.2.4 Data display, storage and transmission
The node control machine uses the traffic flow information collected by various detectors to control the traffic at the node, and at the same time it must be pre-processed by the processor. On the one hand, it uses LCD display to make it easy for each owner to know their various expenses; on the other hand, it uses the communication interface to ensure the security, reliability and effectiveness of the collected data through the TCP/IP protocol and transmits it to the control center for coordinated control and management of the entire system.
2 System Implementation
2.1 Hardware Structure
The node processor has to perform heavy communication and algorithm processing, which places high demands on the communication and computing speed of the processor. The performance of traditional single-chip processors is limited and cannot meet the requirements of the node. Therefore, the processor S3C2410 platform of SAMSUNG company is adopted. It has flexible characteristics and powerful performance and has been widely used in embedded systems. The processor integrates a 32-bit microcontroller with ARM920T processor core of ARM company. It has rich resources, with independent 16 KB instruction cache and 16 KB data cache, LCD controller, RAM controller, NAND flash controller, three-way UART, four-way DMA, four-way Timer with PWM, parallel I/O port, eight-way 10-bit ADC, TouchScreen interface, I2C interface, I2S interface, two USB interface controllers, two SPI, and the main frequency can reach up to 203 MHz. Based on the rich resources of the processor, relevant configuration and expansion are also carried out. The platform is equipped with 16 MB 16-bit FLASH and 64 MB 32-bit SDRAM. A network port is extended through the Ethernet controller chip DM9161, and a HOST USB interface is also introduced. The hardware platform is shown in Figure 3. It mainly includes data acquisition, data display, data storage and data transmission (network control). Here we mainly introduce the implementation of data display and data transmission.
2.1.1 Implementation of display interface
In the hardware circuit of the display system, the connection between S3C2410 and LCD module is the key. S3C2410 has an internal LCD driver controller (STN & TFT), which can support black and white LCD with specifications of 2 bits per pixel (4 gray levels) or 4 bits per pixel (16 gray levels). It can also support color LCD screens with 8 bits per pixel (256 colors). Through programming, it can support the requirements of different LCD screens. In addition to displaying the user's water, electricity, and gas usage, this system also displays the time and indoor camera images. Therefore, the graphic dot matrix 256-color STN liquid crystal module LM057QCl-T0l produced by Sharp is selected. Its resolution is 320×240. Due to its simple interface, stable operation and easy operation, it has a wide range of applications in embedded systems. LM057QClT01 requires its power supply voltage VDD to be 5 V, and the high-level input voltage V1H of LCD data and control signals is in the range of 3.8 to 5.25 V, and the low-level input voltage V1H is in the range of 0 to 1.5 V, so it can be directly connected to S3C44BOX0, and the deflection voltage (27 V) required for LCD display can be connected to VEE (pin 7) by an external circuit. The circuit diagram is shown in Figure 4.
2.1.2 Implementation of network communication interface
For the Ethernet interface, S3C2410 has two built-in Ethernet controllers, which support the IEEE 802.3. MAC control layer protocol in full-duplex mode, but does not provide a physical layer interface. An external physical layer chip is required to provide an Ethernet access channel. DM9161 is selected as the physical layer chip in this system because the signal definition is very clear and the connection is relatively simple. The sending and receiving of signals should be connected to the Ethernet through the network isolation transformer and the network crystal connector RJ45 interface. DM9161 is a highly integrated, low-power 100Base-TX and 10Base-T physical layer transceiver chip. It only needs to connect a few peripheral components to realize the physical layer transceiver of Ethernet data, and provides all the physical layer functions of 100Base-TX defined in IEEE 802.3u. Unshielded twisted pair (UTP5/UTP3) is used as the transmission medium to provide MII for MAC layer devices. MII is an interface specification defined in the IEEE 802.3u standard (Clause22). Its purpose is to provide a simple and easy-to-implement interface between the MAC sublayer and the physical layer. The MII interface enables different transmission media and physical layer interface modules to exchange data with the MAC sublayer through a unified interface.
2.2 System Software
The system operating system uses the Linux operating system. The Linux kernel is an open source operating system with a modular design. Only the necessary functional modules are retained, redundant functional modules are deleted, and the kernel is recompiled, so that the hardware resources required for system operation are significantly reduced. The most important point is that Linux has been inseparable from the network since its birth. The Linux system kernel integrates a large number of network applications and supports all standard Internet protocols and almost all networking technologies. This makes Linux very suitable for network-based application development. The program code written by users can be directly built on the basis of these network applications, thereby greatly shortening the development cycle. Therefore, it is applied to the design of smart home controllers, which has the advantages of small code volume, low system resource consumption, high reliability, and short development cycle, which meets the requirements of smart home data acquisition controllers for operating systems.
2.3 Application Software
The application software mainly includes protocol software, data acquisition module, communication processing module, user interface management, etc. Here we mainly introduce the implementation of data display module and communication processing module.
2.3.1 Data display
LCD display includes three modules: LCD initialization, LCD display and LCD screen clearing. PORTC and PPORTD of S3C2410 are used as LCD driver interfaces, so they need to be set to work in the third function state. The statements for setting the I/O port control register are as follows:
Part of the display program is as follows:
2.3.2 Communication software module
This system uses TCP/IP protocol, and the communication process adopts client-server mode. The specific flow chart is shown in Figure 6.
3 Conclusion
This paper proposes a design of a smart home data acquisition system based on the S3C22410 processor. The system consists of four parts: data acquisition, data display, data storage, and data transmission (network control). It realizes the intelligent management of water, electricity, and gas meters, uses TCP/IP protocol to realize data transmission, and effectively monitors the home environment status, which not only effectively saves the human resources of community business management, but also effectively reduces the incidence of accidents, ensuring convenient, safe, and comfortable living, and is very suitable for the application and promotion of smart homes.
Previous article:An overall intelligent data acquisition system design solution
Next article:Integrated wireless data acquisition instrument design solution
Recommended ReadingLatest update time:2024-11-16 16:48
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- How to get started with Renesas MCU?
- Shanghai ACM32F070 Development Board Review 1. Unboxing
- Strange crash problem of STM32G series timer TIM7!
- Watch the video to win a JD card | Taixiang's actual test of Shui Ge's secrets [Second issue]
- How to choose MCU in applications running at high temperature
- EEWORLD University Hall ---- 2019UDE on-site report: Appotronics leads laser display to a new peak
- SK Hynix only pays 17 months' salary as year-end bonus, sparking employee dissatisfaction
- Microcontroller Program Outsourcing: Urgently need help to write an MCU to control the RF chip to send and receive
- Apply for ADI smoke detection module for free, design smoke detectors more reasonably, and save lives more effectively.
- ROHM R Classroom: Power supply design technical information is continuously updated. Click to download