Design of dormitory intelligent fire and theft alarm system based on ARM7

Publisher:LianaiLatest update time:2015-06-26 Source: eepwKeywords:ARM7 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  0 Preface

  Nowadays, in school dormitories, accidents such as theft of students' valuables and fires caused by students' negligence often occur. These are "big problems" that have always troubled students, student workers and school security departments. Traditional preventive measures have great drawbacks. For example, when an accident occurs, protective iron doors and iron railings will become the biggest obstacle for the owner to escape. The use of intelligent fire and theft alarm system can solve such problems well. However, the price of fire and theft alarm systems on the market is too high for college students. This system is designed and manufactured for university dormitories from a low-cost perspective.

  1 System composition and working principle

  This system is simulated by a monitoring room and two dormitories, and communication is achieved through the RS 485 bus. Considering that the monitoring room should be able to monitor the entire dormitory building in reality, the powerful ARM7 chip LPC2103 is used as the host control chip, and the slave uses the low-cost 51 series microcontroller as the control chip. The dormitory uses pyroelectric sensors to detect human bodies, smoke sensors to detect fireworks, and infrared sensors to detect the number of people entering and leaving the dormitory. The host monitors the slave in real time through the RS 485 bus. When an abnormality occurs, the alarm devices in the dormitory and the monitoring room will sound at the same time. Only the members of the dormitory can remove the alarm state by entering the password of the slave in the dormitory. The detailed structure diagram of the system is shown in Figure 1.

  

 

  2 Hardware circuit design and related theoretical analysis

  The hardware of the fire and theft prevention intelligent alarm system is mainly composed of seven parts: the host part processor circuit, the slave part processor circuit, the sensor detection circuit part, the sound and light alarm circuit, the RS 485 bus interface circuit, the keyboard interface circuit and the display circuit.

  2.1 Sensor detection and sound and light alarm circuit

  The sensor module consists of a pyroelectric sensor, a smoke sensor MQ211 and an infrared sensor.

  The internal resistance of the smoke sensor changes with the concentration of smoke, so it needs to be converted into a changing voltage signal. Here, it is composed of a voltage comparator LM339 and several corresponding voltage-dividing resistors. The specific circuit design is shown in Figure 2. The internal resistance of the sensor is about 130 kΩ when it is powered on. When the smoke is thick, the internal resistance is about 6 kΩ. When there is no smoke, the negative input of the comparator is about 2.5 V and the positive input is about 1.2 V. When there is smoke, the negative input is 2.5 V and the positive input is 3 to 5 V. This circuit can achieve level conversion very well. The pyroelectric infrared sensor is composed of RE200B, signal processing component BISS0001 and a small number of external components. The circuit is shown in Figure 3.

  

 

  

 

  The infrared sensor circuit is composed of an infrared emitting diode and 1838B. The microcontroller is used to detect the order of the low levels of the two sensors to determine the entry and exit of people. The principle is shown in Figure 4. The sound and light alarm module is composed of a buzzer, (red, green) light-emitting diodes and an NPN transistor drive circuit. The specific circuit diagram is shown in Figure 5. [page]

  

 

  

 

  2.2 RS 485 communication circuit

  This module uses the MAX485, a low-power, slew-rate limited transceiver for RS 485 and RS 422 communications. The MAX485's driver slew rate is not limited, and a maximum transfer rate of 2.5 Mb/s can be achieved.
 

  3 Software Programming

  The software part of the system mainly completes the initialization of the system and each module, the detection of alarm signals (fire alarm/theft alarm), system settings, RS 485 bus protocol and the programming of sound and light alarm. The specific program flow chart is shown in Figure 6 and Figure 7.

  

 

  4 Communication Protocol

  In the RS 485 bus communication system, due to the influence of factors such as power supply, spatial noise and transmission path, the data transmission process is easily disturbed or signal attenuated, resulting in communication failure. Therefore, it is necessary to design a transmission protocol to ensure a reliable data connection on this unreliable physical link. In this system, the data collector and the host in the monitoring room are a simple multi-point to point communication.

  4.1 Baud rate setting and communication method selection

  Considering the characteristics of RS 485 bus and the speed and stability of data communication, the baud rate is 2 400 b/s, which can transmit data over a longer distance. Since the communication is a many-to-one relationship, the serial port selects working mode 3.

  4.2 Determination of data verification method

  When using RS 485 bus communication technology to transmit data, it is easy to encounter interference, which will change the transmitted data and cause transmission errors. Considering the actual requirements of the system, this design adopts an 8-bit CRC (cyclic redundancy check) check method.

  The calculation of CRC checksum is a cyclic calculation. From a mathematical point of view, CRC checksum is the remainder obtained by dividing a polynomial (represented by a data block) by a generating polynomial (algorithm rules). CRC checksum is to add some check bits to a data block to be transmitted. These check bits (CRC check bits) are calculated from the data block and transmitted together with the data block. At the receiving end, the CRC checksum is recalculated for the received data block according to the specified algorithm, so as to determine whether there is an error in the data transmission process.

  4.3 Communication Data Encoding

  To ensure the reliability and accuracy of data transmission, the data frame format used in this design is shown in Table 1. Among them, the first two bytes are the starting synchronization signal, the address code occupies 1 byte (0-255), which is used to mark different bed numbers; the data to be sent includes: smoke sensor signal (1 B), infrared sensor signal (1 B), pyroelectric sensor signal (1 B) and acquisition time (7 B); the check code is an 8-bit CRC check code. The transmission order is: smoke sensor signal, infrared sensor signal, pyroelectric sensor signal (high bit first, low bit last), acquisition time (in order: seconds, minutes, hours, days, months, years); when sending a response command, the data to be sent is 2 B of 0xCC or 0xBB.

  

 

  4.4 RS 485 communication protocol

  The RS 485 bus communication of this system adopts the polling method. The host sends the address of each slave to the RS 485 bus, and inquires each slave in turn to see if there is an alarm in the slave part. If a slave has an alarm, it will send a command report to the host through the RS 485 bus, and then the host and the slave communicate, the slave sends a data packet, the host receives and parses the data packet, and makes corresponding processing. The host will continuously query the status of each slave to achieve real-time monitoring.

  5 System Testing and Result Analysis

  After testing, the system has stable sensor performance. The detection distance of the pyroelectric sensor can reach 5 to 8 meters. The smoke sensor can well realize the fire prevention function. The infrared sensor is very sensitive and can effectively detect the entry and exit of personnel. The RS 485 bus can well realize the communication between the host and the slave, and achieve real-time monitoring. The various modules can be well linked together and have high stability. After many debugging, the system has achieved the design requirements. The overall effect is satisfactory.

  6 Conclusion

  The dormitory intelligent fire and burglar alarm system described in this paper provides a feasible way for dormitory security. The system uses multi-sensor detection and automatically realizes external help through the RS 485 bus. It has the characteristics of intelligence and automation. The system has a relatively broad application prospect. For the increasingly high security requirements, in the future further improvement of the system, real-time monitoring can be carried out by adding a microprocessor to the detector. It is of great significance to the safety construction of college dormitories.

Keywords:ARM7 Reference address:Design of dormitory intelligent fire and theft alarm system based on ARM7

Previous article:Design of LCD driver terminal based on ARM9
Next article:Design of power distribution control module based on LPC2119

Recommended ReadingLatest update time:2024-11-24 17:55

JPEG software decoding and its implementation on ARM7
As a mature image compression standard, JPEG has the advantages of high compression efficiency, good restored image quality, and easy implementation , and has been widely used. With the rapid development of modern embedded technology, various electronic products are increasingly favored by various small embedded pro
[Industrial Control]
JPEG software decoding and its implementation on ARM7
ARM7 9 10 classification series and special
ARM classification and characteristics: ARM microprocessors using RISC architecture generally have the following characteristics: 1. Small size, low power consumption, low cost, and high performance; 2. Support Thumb (16-bit)/ARM (32-bit) dual instruction sets, and good compatibility with 8-bit/16-b
[Microcontroller]
ARM7 LPC2138 digital frequency meter design source code and report
1.1 Design Principle Frequency is the number of times a periodic signal changes within a unit time (1s). If the number of repeated changes of this periodic signal measured within a certain time interval T is N, then its frequency can be expressed as f=N/T. Among them, f is the frequency of the measured signal, N is t
[Microcontroller]
ARM7 LPC2138 digital frequency meter design source code and report
Hardware Design of Fingerprint Attendance System Based on ARM7
Biometric technology relies on its uniqueness and reliability of identification. After nearly a decade of development, its application has become increasingly widespread and mature. Currently, fingerprint recognition technology has tended to be popularized in the civilian market, and fingerprint attendance machines
[Microcontroller]
Hardware Design of Fingerprint Attendance System Based on ARM7
Difference between ARM7 and Cortex-M3
1. ARM Implementation Method ARM  Cortex-M3 is the latest ARM embedded core based on ARM7v architecture. It adopts Harvard structure and uses separate instruction and data buses (under von Neumann structure, data and instruction share one bus). In essence, Harvard structure is more complex physically, but the processin
[Microcontroller]
Implementation of Serial Port Server Based on ARM7
By expanding multiple serial ports, you can remotely monitor and manage various peripherals on the PC, or perform system upgrades on peripherals. Usually, the serial port server uses an ARM9 microprocessor and a paid operating system with a TCP/IP protocol stack. The serial port server proposed in this article is im
[Power Management]
Implementation of Serial Port Server Based on ARM7
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号