1 Overall system solution
The overall structure of the smart home system is shown in Figure 1, which includes four subsystems: data acquisition and automatic control system, data monitoring system, camera monitoring system and remote alarm system. Among them, the data acquisition sub-node sends data to the centralized processing node through the wireless sensor module NRF24L01 to perform related automatic control tasks. The data of the centralized processing node is sent to the S3C6410 main control board through RS232 for data processing; a wifi module is used to establish a local area network, and data is sent to the Android mobile terminal in the local area network; a GSM module is used to send an alarm signal to the mobile terminal, and the camera is installed on the S3C6410 main control board, and a router is used to establish a local area network. The browser can be opened on the terminal to monitor the camera.
1.1 Data acquisition and automatic control system
The principle of data acquisition and automatic control is shown in Figure 2. The data acquisition and automatic control system collects and automatically controls the main parameters of the home environment (temperature and humidity, natural environment lighting status, gas status, infrared sensing status). This system contains three acquisition and automatic control nodes. Temperature and humidity are collected through the temperature and humidity sensor DHT11, the natural lighting status is detected through the photoresistor circuit, the gas status is detected through the smoke sensor module, and the staircase status is detected through the infrared sensing sensor; the system has three nodes, node 1 includes indoor temperature and humidity collection, staircase status detection and automatic switch control of staircase lights, kitchen smoke status detection and automatic switch control of kitchen exhaust fans; node 2 has bathroom smoke status detection and automatic control of exhaust fans; node 3 includes outdoor temperature and humidity collection, natural lighting status detection and automatic switch control of yard lights. The data acquisition centralized processing node (wireless sensor module NRF24L01) collects discrete node data. An LCD screen is installed on the centralized node to display the collected temperature and humidity data, and sends it to the S3C6410 main control board through the serial port.
1.2 Data Monitoring System
There are two types of terminals for data monitoring in the system, namely the main control board display screen and the mobile Android terminal. The data monitoring principle is shown in Figure 3. S3C6410 uses the serial port to receive data from the data acquisition system and performs corresponding processing. An LCD screen is installed on the main control board to display the icons and data of the collected objects; the application of the display screen is developed using the QT development tool C++ development language and called using the Linux system. A wifi module is installed on the main control board, and a wifi local area network is established through this module; the mobile Android terminal is loaded with the Android system, and the monitoring application is designed in the java language using the Eclipse development tool; the monitoring data is transmitted from the wifi module to the outside, and within the LAN range, data monitoring can be performed as long as the established local area network is connected.
1.3 Camera surveillance system
The camera can be monitored on many devices as long as the device is equipped with a browser. The camera monitoring solution is shown in Figure 4. The camera is installed on the main control board and driven by the program; the camera data is transmitted using the local area network established by the network cable or wireless router; the camera can be monitored on the computer by connecting the network cable, or by connecting the local area network established by the router, and at the same time, the camera can be monitored on the mobile terminal by connecting the local area network established by the router. Multi-terminal monitoring is convenient, flexible and practical.
1.4 Remote alarm system
Gas is a major hidden danger to home safety. Here, a gas remote alarm system is established using a GSM module and a mobile terminal. The solution is shown in Figure 5. When a gas leak occurs, the GSM module is triggered to remotely notify the user to handle it in time. [page]
2 System Hardware Design
The smart home system based on S3C6410 is composed of data acquisition and self-control system and multi-terminal monitoring system; all nodes form a whole through wired media and wireless network; the main control board adopts S3C6410 matching board and core board; the main design of the hardware is in the data acquisition part, which uses STM32 processor, plus peripheral sensors and control circuits.
2.1 Home temperature and humidity hardware design
The core of the temperature and humidity acquisition module is the collection of temperature and humidity. It uses an integrated temperature and humidity sensor DHT11. It should be noted that the digital quantity output by DHT11 is serial data with a specific data format. The general IO port of STM32 is needed to "simulate" this serial port to communicate with DHT11.
2.2 Infrared status hardware design
The infrared sensing system includes a pyroelectric human infrared module circuit and an automatic light-on module circuit. The pyroelectric human infrared module circuit uses a RE200B pyroelectric human infrared detection head, uses a special high-performance sensor signal processing integrated circuit BISS0001 to process the RE200B signal, and then transmits the signal to the STM32 for processing.
2.3 Hardware Design for Natural Lighting Conditions
The home's natural light status data collection and automatic control system includes two parts: a light resistance detection circuit and an automatic light-on circuit. The light status detector uses a photoresistor sensor. When the light value does not meet the set requirements, its resistance value increases rapidly, so that the sensor circuit outputs a signal and automatically controls the light-on circuit. The signal collected by the photoresistor is connected to the STM32 after passing through the zero-crossing comparator and processed by the STM32.
2.4 Gas Leakage Status Hardware Design
The household gas leakage system consists of two parts: the gas leakage detector circuit and the automatic switch exhaust fan control module circuit. The gas leakage detector uses the MQ-7 gas sensor. When the element contacts the reducing gas, its conductivity increases rapidly with the increase of gas concentration; it can be used to detect combustible gas. The hardware circuit of the gas leakage detector is shown in Figure 6. The signal collected by MQ-7 is connected to STM32 after passing through the zero-crossing comparator and processed by STM32.
3 System Software Design
The software system includes three parts: data acquisition and automatic control, main control board monitoring and Android monitoring. The data acquisition and automatic control part is designed in C language on the KEIL platform; the main control board monitoring part is designed in C++ using the QT platform; the Android monitoring part is designed in Java language using the Eclipse development tool; these software systems realize the functions of acquisition, control, transmission and display.
3.1 Data collection and automatic control system software design
The home data collection part periodically collects temperature and humidity, infrared sensing status, natural light status, and gas status; the automatic control part includes real-time automatic control of yard lights, exhaust fans, and stair lights. The software is designed in C language using the keil development tool. The data collection and automatic control task flow chart is shown in Figure 7.
3.2 Main control board monitoring system software design
The main control board periodically receives data from the data acquisition part and performs display, control and transmission tasks, which are completed by software. The software is designed using the C++ high-level language using the QT platform and called by the Linux system. The system automatically transmits data and displays it on the LCD screen. At the same time, the display icon changes according to the data, and a sound alarm will be issued if a gas leak occurs.
3.3 Android monitoring software design
The Android terminal receives data transmitted from the main control board by connecting to the WiFi local area network; the software design is designed in Java language using the Eclipse development tool; the software can be used to display the received data on the Android device display, and a sound alarm will be issued if a gas leak occurs.
4 System Design Considerations
The following issues should be noted when designing the system: 1) When using STM32, because there are many IO ports used, the software configuration of the IO port should pay special attention to the correct configuration of its mode. 2) Because there are many IO ports used, there are also many program processing parts, so special attention should be paid to checking to avoid multiple functions overlapping the use of the same IO port. 3) When using the wireless transceiver module NRF24L01, write the receiving channel address. The P0 and P1 channels are 40-bit addresses, but P2-P5 only have 8-bit addresses. Their high 32-bit addresses are the same as the P1 channel, so just write a byte address. 4) Remember that when configuring the NRF24L01 wireless transceiver, the sending and receiving modes cannot be confused, and the sending and receiving frequencies must be set to the same. 5) Be patient and careful when configuring the kernel, otherwise problems are likely to occur. 6) STM32 is a chip with many small pins, so special attention should be paid when soldering the chip. 7) The sensitivity of each sensor must be adjusted before use, otherwise it will not be tested.
5 Conclusion
The project uses S3C6410 main control board, STM32, wifi module, GSM module, various mobile terminals, etc. to design a smart home system, so that discrete devices are combined into a whole through wireless and wired media, so that it has rich functions such as home environment monitoring, multi-terminal camera monitoring, automatic control of lamps, remote alarm of gas leaks, etc., which can truly make users feel safe, comfortable and convenient at home.
Previous article:Design of comprehensive monitoring system for urban rail energy-feed power supply system based on ARMCortex-A8
Next article:Embedded home gateway server platform based on ARM platform
Recommended ReadingLatest update time:2024-11-16 17:54
- Popular Resources
- Popular amplifiers
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
- I need help from a master, diesel engine electronic throttle pedal signal synchronization failure
- In three minutes, let me show you what load is.
- Data Structures in Embedded System Software Design (Full Version)
- When BLE meets MEMS——Introduction to HID Report Descriptor
- MSP430 SPI Hardware Interface
- Understand the role and use of capacitors in one article
- The results of the GD32F350 contest (sharing experience & interaction) are as follows: Thanks to all the cool people in the contest
- Serial port printing problem after BLUENRG-1 wakes up from sleep
- 【I-Prober 520】Test Summary
- How can I wire this circuit to minimize interference?