Design of intelligent community safety monitoring system based on single chip microcomputer

Publisher:骄阳少年Latest update time:2022-03-24 Source: eefocusKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

This project uses the wireless transmission module NRF905 to improve and reorganize isolated systems such as single infrared anti-theft alarm, gas (CO) leak detection alarm, and fire detection alarm. Through the control of the single-chip microcomputer, a comprehensive and all-round home security system is formed. This design is mainly divided into a residential area detection system and a community property monitoring system. In the design of the residential area detection system, the human infrared sensing module is used to detect whether someone breaks into the room without authorization, the carbon monoxide sensor is used to detect whether there is a combustible gas leak in the room, and the flame sensor is used to detect whether there is a flame in the room. The power module supplies power to the single-chip microcomputer and the wireless transmission module, and the wireless transmission module is used to send the collected data to the community property management system. In the design of the community property management system, the clock module is used to display the current time in real time, the LCD is used to display the basic information and alarm status of the community owners, the power module is used to supply power to the single-chip microcomputer and the wireless receiving module, the wireless receiving module is used to receive the data sent by the wireless transmission module, and the LED light and buzzer are used to automatically alarm when an abnormal situation occurs. The community property management personnel will quickly deal with it according to the specific situation.

 

 

The STC12C5410AD series MCU is a single clock/machine cycle MCU that can use a low-frequency crystal oscillator to significantly reduce electromagnetic interference (EMI). It is a new generation of 8051 MCU with high speed, low power consumption and super strong anti-interference. The instruction code is fully compatible with the traditional 8051, but the speed is 8~12 times faster, and the internal integrated MAX810 dedicated reset circuit. 4-channel PWM, 8-channel high-speed 10-bit A/D conversion, for motor control, strong interference occasions.


The STC12C5410AD microcontroller includes a central processing unit (CPU), program memory (Flash), data memory (SRAM), timer/counter, UART serial port, I/O interface, high-speed A/D conversion, SPI interface, PCA, watchdog, on-chip R/C oscillator, and external crystal oscillator circuit. It can be said that the STC12C5410AD microcontroller contains almost all the unit modules required for data acquisition and control, and can be called a system on chip (SOC), which can easily form a typical measurement and control system.

HC-SR501 is an automatic control module based on infrared technology. It adopts the LHI778 probe design imported from Germany. It has high sensitivity, strong reliability, and ultra-low voltage working mode. It is widely used in various automatic sensing electrical equipment, especially automatic control products powered by dry batteries. The sensing module adopts a dual-element probe. The window of the probe is rectangular. The dual elements (A and B) are located at the two ends of the longer direction. When the human body walks from left to right or from right to left, there is a difference in the time and distance of the infrared spectrum reaching the dual element. The larger the difference, the more sensitive the sensing.


When a person walks into its sensing range, the human infrared sensor outputs an analog signal. Since the signal is weak, it must be conditioned or amplified by an operational amplifier before being transmitted to the microcontroller to meet the A/D converter's requirements for input analog amplitude and polarity. After the LM339 comparator, when the output voltage is greater than 3.3V, it outputs a low level, and when the output voltage is less than 3.3V, it outputs a high level.

The flame sensor can detect infrared light with a wavelength of 700 nanometers to 1000 nanometers, with a detection angle of 60 degrees. The sensitivity is maximum when the infrared light wavelength is around 880 nanometers. The far-infrared flame probe converts the intensity change of external infrared light into the change of current, which is reflected as the change of value in the range of 0 to 255 through the A/D converter. The stronger the external infrared light, the smaller the value; otherwise, the larger the value.


In the flame sensor module, 1-AOUT is analog signal output, 2-DOUT is digital signal output, 3-GND is external ground, and 4-VCC is 5V working voltage. The DOUT digital signal output is directly connected to the microcontroller IO interface P2.7, and the microcontroller is used to detect high and low levels to detect whether there is a flame in the environment. When the infrared transmitting tube detects a flame, the signal indicator light turns on, and the module digital interface DOUT outputs a low level.

The gas-sensitive material used in the MQ-7 gas sensor is tin dioxide (SnO2) with low conductivity in clean air. The high and low temperature cycle detection method is used to detect carbon monoxide at low temperature (1.5V heating). The conductivity of the sensor increases with the increase of carbon monoxide gas concentration in the air, and the high temperature (5.0V heating) cleans the stray gas adsorbed at low temperature. A simple circuit can be used to convert the change in conductivity into an output signal corresponding to the gas concentration.


The packaged gas-sensitive element has 6 pins, 4 of which are used for signal output and 2 for providing heating current. The working voltage is 5V. Before use, the power supply should be preheated for at least 2 minutes. VCC is a 5V working voltage, DOUT is a digital switch output interface (0 and 1), AOUT is an analog output interface, GND is an external GND, and the digital output DOUT can be directly connected to the microcontroller. The microcontroller is used to detect high and low levels to detect the CO concentration in the environment. When there is no CO gas or the gas concentration does not exceed the set threshold, the digital interface DOUT outputs a high level. When the CO gas concentration exceeds the set threshold, the signal indicator light is on and the module digital interface DOUT outputs a low level.

NRF905 has four working modes, including two active RX/TX modes and two power saving modes, where the active modes include ShockBurst RX and ShockBurst TX. The working mode of NRF905 is set by the settings of TRX_CE, TX_EN, and PWR_UP.

In ShockBurstTM transceiver mode, the first-in-first-out stack area on the chip is used. Data is sent from the microcontroller at a low speed, but transmitted at a high speed. This can save energy as much as possible. Therefore, a low-speed microcontroller can also obtain a high RF data transmission rate. All high-speed signal processing related to the RF protocol is performed on the chip. This approach has three major advantages: maximum energy saving; low system cost (low-speed microprocessors can also perform high-speed RF transmission); short data stay time in the air and high anti-interference. ShockBurstTM technology also reduces the average operating current of the entire system. In ShockBurstTM transceiver mode, NRF905 automatically processes the header and CRC check code. When receiving data, the header and CRC check code are automatically removed. When sending data, the header and CRC check code are automatically added. When the sending process is completed, the DR pin notifies the microprocessor that the data transmission is completed.

Data detection program design: After the system is powered on, the system is initialized first, and then enters an infinite loop process. The sensor in the system detects whether there is an alarm to be sent. If not, it returns to continue to judge; if there is, the collected data is pre-processed into a level signal, and the household owner information stored in the CPU in advance is sent to the host through the RF chip NRF905, finally realizing the remote alarm function.

Data supervision program design: First, the system is initialized, the time module provides a precise time for the host system, and then NRF905 is in the state of receiving signals. When a signal is received, it means there is an alarm, and the alarm module and display module are started.

Wireless transmission (NRF905) subroutine design: The RF chip and the microcontroller are connected through SPI (serial peripheral interface) to form a wireless transmission module. Various sensors detect environmental parameters in real time. When the system starts working, the microcontroller and the RF chip are initialized, and the RF chip switches from idle mode to ShockBurst TX transmission mode.

When the RF chip detects a data request to be received, the RF chip switches from idle mode to ShockBurst RX receiving mode

Keywords:MCU Reference address:Design of intelligent community safety monitoring system based on single chip microcomputer

Previous article:Production of flow meter based on 51 single chip microcomputer (process + program)
Next article:Design of multifunctional electronic password lock system based on single chip microcomputer

Recommended ReadingLatest update time:2024-11-15 11:24

"Whether learning single-chip microcomputers or embedded systems has a future" 2
  Last week, the editor sorted out Wu Jianhong's reply. The enthusiasts all said that they were very touched. Wu Jianhong was also very moved by everyone's enthusiastic response. However, when the editor contacted him, he said that he was too busy, so he could not guarantee that he could publish articles on enthusiasts
[Microcontroller]
Serial Interface Intelligent Converter for AT90S2343 Low Power Single Chip Microcomputer
Since RS-422 and RS-485 buses have the characteristics of strong anti-interference ability, high communication rate, long communication distance, and the ability to communicate with multiple slaves, they are widely used in master-slave multi-machine communication. We have designed and developed an external serial port
[Power Management]
Serial Interface Intelligent Converter for AT90S2343 Low Power Single Chip Microcomputer
Based on 51 single chip microcomputer ultrasonic obstacle avoidance + Bluetooth remote control smart car
The microcontroller source program is as follows: #include reg52.h #include intrins.h typedef unsigned char u8; typedef unsigned int  u16; typedef unsigned long  u32; sbit Sevro_moto_pwm = P2^6; //Connect the servo signal terminal to input PWM signal to adjust the speed sbit ECHO= P1^1; //Ultrasonic interface defini
[Microcontroller]
Over 10 million units: BYD Semiconductor's automotive-grade MCUs demonstrate strong strength again
MCU, the microcontroller unit, is the core of the internal calculation and processing of the automotive electronic system and is the key to realizing the intelligentization of automobiles. BYD Semiconductor has been deeply involved in the MCU field for more than ten years and has a series of automotive-grade and indus
[Automotive Electronics]
Over 10 million units: BYD Semiconductor's automotive-grade MCUs demonstrate strong strength again
8051 MCU (STC89C52) eight-segment digital tube static lighting
In the upper left corner of the STC89C52, there are eight eight-segment digital tubes. In the process of controlling the lighting of the digital tubes, only one digit can be lit at a time according to the high and low levels of the three pins P24, P23, and P22 (the three inputs of the 3-8 decoder). Here (P24, P23, P22
[Microcontroller]
8051 MCU (STC89C52) eight-segment digital tube static lighting
Learn the necessary register knowledge of 51 microcontroller
Speaking of microcontroller memory, you may know RAM and ROM, but how to use it specifically needs to be understood in depth. Today, Tongcheng Chuangpin will come to learn more about the memory of 51 microcontroller. I hope it will be helpful to you. Program memory (also known as data Flash), as the name suggests, i
[Microcontroller]
CoreShine Technology launches China Mobile's first RISC-V low-power, high-capacity MCU chip
On December 17, at the first Dishui Lake China RISC-V Industry Forum, Wang Bin, MCU Product Manager of CoreSheng Technology Co., Ltd., introduced the company's CM32M43xR series of products, which is China Mobile's first RISC-V low-power, large-capacity MCU chip. According to Wang Bin, Xinsheng Technology is a wholly-o
[Mobile phone portable]
CoreShine Technology launches China Mobile's first RISC-V low-power, high-capacity MCU chip
51MCU PWM
 
[Microcontroller]
51MCU PWM
Latest Microcontroller Articles
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号