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
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
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
- TI-PMLK Boost Experiment Board for TPS55340 and LM5122
- [SC8905 EVM Review] Get the Nanxin Power Board
- 【GD32450I-EVAL】SPI transceiver and touch chip XPT2046 driver and pen interrupt
- Reading Notes on Operational Amplifier Parameter Analysis and LTspice Application Simulation Part 2 - Error Estimation
- 【Beijing】Recruiting embedded (video direction) R&D engineers
- UART interface algorithm transplantation encryption chip debugging skills - communication debugging
- Free sharing video - introduction to common electronic components such as resistors, capacitors and inductors------------The key is free
- MicroPython adds lightsleep() functionality to STM32
- Have you watched "Avengers 4"?
- TI CC2540 USB CDC Serial Port driver installation failure reasons and solutions