Abstract: This paper introduces a design of a multi-node home security system with AT89S52 single-chip microcomputer as the control core, which transmits information through DTMF public telephone network and CAN bus. This intelligent home security system integrates fire prevention, anti-theft and anti-gas, and can realize automatic detection and automatic voice dialing alarm. The DTMF transceiver circuit, call circuit and CAN bus transmission circuit are introduced in detail. The experimental results show that this system is practical, the information transmission is real-time and reliable, and it is suitable for home security or other security systems.
1 Introduction
Today's security systems can be implemented with the help of computer technology, IC card technology, communication technology, etc. The application of CAN bus in security systems has played a good role in promoting the development of home intelligence. The application of DTMF technology in security systems does not require special wiring, does not occupy radio frequency resources, and has no electromagnetic pollution. This paper designs a new type of intelligent home security system based on CAN bus and DTMF technology with AT89S52 microcontroller as the core, which has improved the real-time and reliability of the original community security system to a new level. This system can monitor the security environment of the entire home in real time, and the monitoring scope includes a series of unsafe factors such as indoor anti-theft, fire alarm, gas leakage, etc. Once the above accidents occur, the alarm system will issue corresponding alarm information, broadcast the alarm category with voice, and provide alarm voice to remote users and relevant departments.
2 Overall composition of the system
The system block diagram is shown in Figure 1. The single-chip microcomputer controls the DTMF transceiver circuit, digital voice circuit, and on-hook and off-hook control circuit. The detector can quickly and accurately detect abnormal conditions in the residence, and notify the controller in time after confirmation. The single-chip microcomputer then controls the telephone interface circuit to simulate off-hook, automatically dial the pre-set telephone number for voice alarm and notify the management center. When the other party responds, the alarm state is automatically restored.
Figure 1 Block diagram of home security system
3 Hardware Design
The main control part of the system uses AT89S52 single-chip microcomputer, and there is no need to expand external memory. The watchdog circuit uses a programmable serial EEPROM - X25045. X25045 stores data information such as flag field, phone number, alarm code, system settings, etc. The digital voice circuit uses the digital voice chip ISD1420. In the system, ISD1420 is only used as a basic recording and playback circuit, so all address lines are set to 0, so the starting address of playback is 0. The voice signal is picked up by the electret microphone and input from the MIC and MIC REF ends to the amplifier inside the chip for amplification. The audio signal after the power amplifier is used from SP+ to connect to the call circuit to send out the voice signal.
3.1 Ring detection and analog off-hook and off-hook unit
The system is always in monitoring state at both ends of the telephone line, which will not affect the normal operation of the telephone. When the system receives a ringing signal, it will perform a ringing detection. The ringing signal is connected to the P3.4 port of AT89S52 after passing through three inverters. If no one answers after 5 rings, the system enters the automatic off-hook state. The P1.2 pin of the microcontroller outputs a high level, the transistor V501 is turned on, and the relay K1 is activated, and the load resistor is connected to the circuit to simulate off-hook. After that, a current greater than 10mA will appear on the telephone line. After the exchange center detects this current, it will no longer output a ringing signal but turn to connect the phone. If the ringing signal disappears before reaching the preset value, the count value of the microcontroller is reset to zero and the controller does not act.
3.2 DTMF transceiver unit
The DTMF transceiver circuit uses the DTMF signal encoding/decoding chip MT8880[5]. The microcontroller dials the phone number through the DTMF transceiver circuit to make a telephone alarm. The DTMF transceiver circuit is shown in Figure 2.
Figure 2 DTMF transceiver circuit
MT8880 provides an interface connected to a microprocessor to control its transmission, reception and working mode. Its receiving part uses a single-ended input, which is composed of R27, R28 and C16. Its input voltage gain is 1. The gain of the input signal can be adjusted by changing R28. Its transmitting part is composed of R29, C17, C18 and XTAL2. Its control part is composed of R30 and C19. IRQ/CP is connected to the P3.5 pin of the microcontroller. When MT8880 receives a valid dual-tone multi-frequency signal, the microcontroller performs interrupt processing. The IN- terminal of MT8880 is connected to the QR terminal of the call circuit TEA1062, and the TONE terminal of MT8880 is connected to the DTMF terminal of TEA1062.
Talk unit #e#3. 3 Talk unit
The call circuit uses the dedicated call integrated circuit TEA1062 for telephones. When sending a call, the voice signal (from ISD1420) is input through the M IC + pin, and the DTMF signal (from MT8880) is input through the DTMF pin. After being amplified by TEA1062, they are sent to the telephone line from the LN pin. When receiving a call, the signal is input from the IR pin through the sidetone cancellation network, and is output from the QR pin after amplification. It is divided into two paths: one is sent to the ANA IN terminal of ISD1420 for voice recording, and the other is sent to the IN - terminal of MT8880 to extract the DTMF signal.
3.4 CAN bus data transmission unit
The CAN bus data transmission unit consists of two parts, one is the CAN controller, which realizes the interaction and control of the bus data, and the other is the CAN data transceiver, which realizes the network transmission of data.
The single-chip microcomputer AT89S52 accesses the bus by controlling the CAN controller, and is also responsible for the measurement and control of the functional units. The CAN bus interface circuit is shown in Figure 3.
Figure 3 CAN bus interface circuit
AT89S52 accesses CAN controller SJA1000 through interrupt mode. In order to enhance the anti-interference ability of CAN bus nodes, SJA1000 is connected to CAN bus driver PCA82C50 through high-speed optocoupler 6N137. CANH and CANL pins of PCA82C50 are connected to CAN bus through a 5Ω resistor respectively, which can limit the current and prevent PCA82C50 from being impacted by overcurrent.
4 Software Design
The system software adopts a modular design, mainly including the main program module, CAN communication module, ringing detection module, voice alarm module, DTMF transceiver module, etc. Here we mainly introduce the main program and CAN communication module design.
4.1 Main program design
The main program mainly completes the call of each functional module, detects the system input, and then makes judgments and processes according to the system status. Before the program enters the main loop, it is necessary to perform necessary initialization, such as MT8880, ISD1420, SJA1000, related flags, etc. The main program flow is shown in Figure 4.
Figure 4 Main program flow chart
4.2 CAN communication module design
The CAN communication module includes controller initialization, data receiving and sending subroutines. SJA1000 has two states: reset mode and working mode, and the register configuration is different in the two states. After the parameters are set, the CPU issues a command, and SJA1000 is in working state and performs normal communication. If a communication error occurs, the CPU will return SJA1000 to reset mode. The receiving module is responsible for receiving and processing node messages. During the receiving process, the CPU will read the data and perform different processing based on the command word to determine the type of data frame. The sending module is responsible for sending messages. Before SJA1000 sends data, it must determine whether the sending conditions are met. If so, the message frame information, identifier and data to be sent are written into the buffer and sent. The receiving and sending flow chart of JA1000 is shown in Figure 5.
Figure 5 JA 1000 sending and receiving flow chart
5 Conclusion
This system is based on AT89S52 single-chip microcomputer. It does not need any modification to the telephone network. It can realize automatic detection and voice alarm of home defense points. The design uses CAN bus structure to form a security system, which has good flexibility and scalability. At the same time, the CAN bus is used to introduce real-time data processing to improve the reliability of the system. It has great application and promotion value for building video intercom, intelligent community management, access control management, etc.
Previous article:Application of ICL7135 and PIC microcontroller in temperature transmitter
Next article:Special IC decryption technology AVR application skills
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- The World Cup also likes to use RFID
- SDK BLE example project command line compilation (HeartRate device)
- EEWorld interviews Toshiba PCIM booth engineer: 2-minute short video shows you key products and solutions
- Is it necessary to learn TI's KeystoneII series multi-core heterogeneous processors?
- cc2540 cc2541 low power consumption measurement and summary - and precautions - low power consumption less than 10uA
- Design of Serial Universal Asynchronous Receiver/Transmitter Based on FPGA
- I am looking for a book that explains in detail the pronunciation rules of English words, such as the relationship between open syllables, closed syllables, stress and open syllables.
- Inductive whistle problem in digital phase-shifted full-bridge circuit, please help
- Tesla Robot Optimus Prime Conference Uncut 4K HD Episode 2
- FPGA error, added clock timing, and how to solve this error