A smart home system design based on S3C6410 and STM32

Publisher:疯狂小马Latest update time:2015-07-03 Source: eepwKeywords:S3C6410 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  With the development of science and technology and the improvement of people's living standards, people's requirements for home safety, comfort, convenience and other aspects are gradually increasing. Modern homes are developing towards highly intelligent and humanized smart homes. Smart home, also known as smart house, is a networked intelligent home control system that integrates automatic control system, computer network system and network communication technology. As a new industry, smart home has huge market consumption potential. This paper takes Samsung's S3C6410 processor as the core, and uses S3C6410 main control board, STM32, wifi module, GSM module and various mobile terminals to design a smart home system, so that discrete devices form a whole through wireless and wired media, realizing home environment monitoring, anti-theft automatic alarm, automatic control of lamps, gas leak remote alarm and other functions, making home safer, more comfortable and more convenient.

  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.

Keywords:S3C6410 Reference address:A smart home system design based on S3C6410 and STM32

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

stm32: firmware library file description
About the firmware library file description File description under the firmware library folder STM32F10x_StdPeriph_Lib_V3.5.0: 1. The main files in the Libraries folder are: 1. core_cm3.c , core_cm3.h : CMSIS core files, through the interface to enter the Cortex_M3 core 2. The startup folder contains the system
[Microcontroller]
Pull-up and pull-down resistors for STM32
STM32F10X I/O can enable weak pull-up or pull-down resistors through the configuration register. According to the datasheet, this resistor is: min=20K, typ=30K, max=40K. The input of STM32F10X I/O can be configured as floating/pull up/pull down. For STM32F10X, the state of I/O after system reset is Floating input. S
[Microcontroller]
Design of a single star simulator system with multi-color temperature and multi-magnitude output based on STM32
0 Introduction With the rapid development of space science and technology in my country in recent years, satellites, manned spacecraft and other spacecraft require higher control accuracy, reliability and longer life. Star sensors are widely used on various spacecraft, and their performance indicators directly affec
[Microcontroller]
Design of a single star simulator system with multi-color temperature and multi-magnitude output based on STM32
STM32 FSMC Learning Notes (I)
FSMC Application Introduction FSMC stands for "static memory controller". STM32 can be connected to the pins of SRAM, ROM, PSRAM, Nor Flash and NandFlash memory through FSMC to exchange data. 1. Characteristics of FSMC: 1.  One of the major features of FSMC is that it supports asynchronous read and write operation
[Microcontroller]
STM32 FSMC Learning Notes (I)
How to solve the problem that STM32 ST-LINK Utility cannot be downloaded
Phenomenon: Prompt family: Unknown device            Read out protection is activated.            Could not disable Read Out Protection!   Analysis: Since STM provides data protection internally, there are read protection and write protection. If read protection is disabled, the downloader will not be able to read the
[Microcontroller]
How to solve the problem that STM32 ST-LINK Utility cannot be downloaded
STM32 Getting Started with USART (STM32F030F4P6 based on CooCox IDE)
#include "stm32f0xx.h" #include "stm32_lib/inc/stm32f0xx_rcc.h" #include "stm32_lib/inc/stm32f0xx_gpio.h" #include "stm32_lib/inc/stm32f0xx_usart.h"   int main(void) { //1. Enable the clock RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1,ENABLE); //Special note: Because the serial port uses GPIO, the corresponding GP
[Microcontroller]
Watchdog in STM32
In a microcomputer system composed of a single-chip microcomputer, the operation of the single-chip microcomputer is often interfered by the external electromagnetic field, causing the program to run away and fall into an infinite loop. The normal operation of the program is interrupted, and the system controlled by t
[Microcontroller]
STM32 matrix keyboard scanning program
    #define __JUZHENJIANPAN_H     extern u8 KeysCAN(void);     extern void GPIO_Config(void);     #endif     #include "stm32f10x.h"     #include "juzhenjianpan.h"     #include"gpiobitmap.h"     #define PC0 PCo_0     #define PC1 PCo_1     #define PC2 PCo_2     #define PC3 PCo_3     #define PC4 PCo_4     void GPIO_Confi
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

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号