Design of Monitoring and Management System Based on AT89S51 Single Chip Microcomputer

Publisher:FreeSpirit123Latest update time:2011-07-29 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction


At the entrances and exits of school dormitories, classrooms, libraries, shopping malls and other places, if a monitoring and management system is used, the number of people entering and leaving can be counted, and recording equipment or display equipment can be used for management of warm reminders, and monitoring alarms can also be performed during non-entry times. The monitoring and management system based on the AT89S51 microcontroller uses a single-chip microcomputer for control, which greatly simplifies the design of peripheral hardware circuits and has a simple system structure. At the same time, the system can be expanded in many ways, such as realizing multi-machine communication, monitoring and management of larger occasions, etc.


2 System Hardware Structure


2.1 Structure diagram




Figure 1 Structural diagram of monitoring and management system based on AT89S51 microcontroller


Figure 1 shows the block diagram of the monitoring and management system based on the AT89S51 single-chip microcomputer. The system uses the AT89S51 single-chip microcomputer system to control the operation of the system, uses a voice-specific recording chip, and also adds a clock chip, so that different recordings can be made according to the needs of oneself and the occasion, and suitable alarm signals can be issued. In addition, the clock and calendar can be displayed in real time. If the LCD display circuit is selected, text display can also be performed for warm reminders, messages or news releases, etc. This article only introduces the reminder function of the alarm using the voice IC.


The system uses software programming of a single-chip microcomputer to control the operation of each module circuit, and can set parameters through the keyboard to achieve automatic control, making the system more complete, more functional, and expandable.


2.2 Working Principle


1. Hardware composition




Figure 2: Circuit diagram of each module unit


The system is mainly composed of the AT89S51 single-chip computer minimum system circuit, and uses its I/O port to collect and control data. Figure 2 shows the circuit of each unit.


The working principle of this circuit is: first, the wireless pyroelectric human infrared probe emits infrared rays of a specific wavelength (10uM) according to the constant temperature of the human body (37℃), which are enhanced by the Fresnel filter and concentrated on the infrared sensing source. Then, a certain charge signal is generated by the pyroelectric element and sent to the single-chip microcomputer. At this time, the single-chip microcomputer immediately reads the current time and compares it with the time period set by the single-chip microcomputer before. If it is found that the current time falls within the set time period, a control signal is sent to the recording circuit chip, and the recording content of the corresponding time period is sent to the reporting circuit, and then the reporting circuit drives the speaker after amplification through the amplifier circuit to emit the corresponding sound; if it is found that the current time does not fall within the set time period, the interrupt signal sent by the wireless pyroelectric human infrared probe will not be responded to, that is, all subsequent work will no longer proceed, but wait for the next interrupt signal to come.


The connection between each chip and the microcontroller is as follows:


① The voice recording chip occupies 8 I/O ports of the MCU P0 and 6 I/O ports of P2.0~P2.5; among them, the MCU's P0 port, P2.0 and P2.1 are respectively connected to the address lines of ISD2560 to set the starting address of the voice segment. P2.2~P2.5 are used to control the recording and playback status. P1.7 is used for recording key control.


②The clock chip occupies a total of 3 I/O ports of the microcontroller P1.0~P1.2;


③The keyboard display circuit occupies a total of 4 I/O ports of the microcontroller P1.3~P1.6.


④Memory E2PROM occupies 2 I/O ports, P2.6 and P2.7


⑤The data collection result is the external interrupt input request signal.


2.3 Unit circuit design


1. MCU minimum system


This part includes two parts: the single-chip minimum system and the serial E 2 PROM. The single-chip minimum system is mainly based on AT89S51, plus a power-on reset circuit and a clock circuit; the serial E 2 PROM is connected mainly to continue to save the relevant parameters set by the system after the E 2 PROM is powered off. The serial E 2 PROM used in this circuit is AT24C01 with an I 2 C bus interface, and the software simulation method is used to realize the transmission of I 2 C bus data.


2. Data collection part


In order to collect human body data, the circuit emits infrared signals of specific wavelengths according to the constant temperature of the human body, and uses a wireless or wired pyroelectric human infrared probe. Through this probe, the collected data can be converted into a level signal to trigger the microcontroller, thereby sending an interrupt request signal. Since this part of the circuit only acts as an interrupt source in this system and is not the core circuit part of the system, it can be replaced by a finished unit module.


At the same time, it can be seen that the control system can also be set to collect other types of data as interrupt sources, and easily modified to control other services.


3. Clock chip circuit


In order to realize the real-time clock function, the circuit uses the high-performance, low-power clock chip DS1302 produced by the American DALLAS company and some peripheral components [1] . The chip has clock/calendar functions. The circuit is equipped with two button-type backup batteries to ensure that the DS1302 can keep time normally after the external power is interrupted. After the microcontroller is turned on, the time and calendar of the DS1302 can be calibrated through the keyboard.


4. Voice recording chip circuit


In order to achieve different message contents according to different usage scenarios, this circuit uses the voice recording chip ISD2560 [2] , which has the advantages of power failure resistance, good sound quality, easy use, and no need for a dedicated development system. The recording time is 60 seconds and can be repeated up to 100,000 times. You can record the content you want to record into the recording chip through the microphone.


5. Keyboard and digital tube display circuit


The keyboard control and display circuit of the circuit uses the zlg7289A chip to form a digital tube display circuit as a display [3] . This chip has an SPI serial interface function and can directly drive LEDs without external components. It can also drive 8-bit common cathode digital tubes (or 64 independent LEDs) at the same time. It is an intelligent display driver chip and is very convenient to use. The zlg7289A contains a decoder that can directly accept BCD code or hexadecimal code and has two decoding modes at the same time. In addition, it also has a variety of control instructions such as blanking, flashing, left shift, right shift, segment addressing, etc. It is very convenient to use. Only 4 ports of the microcontroller are used.


6. Sound signal circuit


The output of the chip ISD2560 already has a certain power and can normally drive a small speaker. However, in order to make the alarm signal louder and more noticeable, a two-stage amplifier circuit is added to the output power to further amplify the output signal to drive a higher-power speaker and produce a louder sound.


3. Software Design




Figure 3 Main program flow



Figure 4 Clock chip process



Figure 5 Interrupt program flow


The main program is mainly used for system start or reset initialization and calling various subroutines to complete the control of the entire system. In the initialization module, in addition to the general stack pointer setting and the assignment of various registers to be used, the keyboard display control chip ZLG7289 is also reset and initialized. The main program flow chart is shown in Figure 3.


Figure 4 is the program flow of the clock chip DS1302, which detects whether the working time is correct. If the user has modified it, the user's modification result will be used. Figure 5 is the interrupt service program flow. Its main process is to detect whether the pyroelectric element generates a certain electrical signal after the machine is turned on and initialized, and then compare the current time with the time stored in the E2PROM to determine whether a certain recording time needs to be played. If so, the corresponding language is played and then returns. The time stored in the E2PROM can be entered and set by the user through the keyboard. At the same time, when programming, the number of interruptions can be set to calculate the number of people entering and leaving. During non-opening hours, if a human body signal is detected, an alarm signal can be output.


4. Conclusion


This system uses AT89S51 single-chip microcomputer as the core, wireless pyroelectric human infrared probe signal as interrupt request signal, current time as standard, and realizes the purpose of controlling the alarm through software programming. The innovation of this system is that the system hardware circuit is relatively simple, uses fewer components, the circuit is more usable, and has high cost performance. It can be easily installed in various places that need monitoring and management. The system is very convenient to expand, such as cultivating camera startup control, etc. If you want to achieve a wider range of detection and monitoring, it is also very convenient to modify it into a master-slave multi-machine communication form.


References:


[1] Yu Fusheng, Song Xianchun, etc., Clock chip DS1302 and its application in data recording, Electronic Technology Application, March 2000
[2] Xiao Hairong, Wang Fengying, etc., Design of recording and playback system based on AT89C2051 and ISD2560, Microcomputer Information, Issue 1, 2004
[3] Guangzhou Zhou Ligong Microcontroller Development Co., Ltd. zlg7289A 8-bit LED and 8 8 keyboard control chip selection guide /upload/eWebUpload/200703/20070312110856345.pdf

Reference address:Design of Monitoring and Management System Based on AT89S51 Single Chip Microcomputer

Previous article:Frequency Measurement Technology Based on 8051 Single Chip Microcomputer
Next article:A design and implementation to eliminate system temperature drift and time drift

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号