Among the three I/O lines, one is used as output to control the ringing of the intercom extension; one is used as input to detect the off-hook signal of the intercom extension; and one is used to control the control relay of the analog audio signal channel of the intercom extension, so that the user can directly communicate through the audio analog channel after it is connected. The unlocking key is set on the keyboard, and the unlocking signal is transmitted to the outdoor station through the CAN bus. After receiving the unlocking signal, the outdoor station controls the opening of the building door lock.
3.3 Security Alarm Section
The functions of the security alarm part include input of alarm signals, local alarm, local alarm display, and remote alarm.
The alarm signals include signals from various detectors, such as window magnetic switches, door magnetic switches, passive infrared sensors, gas detectors, fire detectors, etc. All alarm signals are connected to the PB port of 8255. Local alarm is that the microcontroller controls the buzzer through the I/O port to sound the alarm, and the eight-segment digital tube display shows the alarm category. Remote alarm includes remote telephone alarm and alarm to the management personnel in the centralized control room through the CAN bus.
3.4 Telephone remote monitoring part
There are three main solutions for remote monitoring: remote control based on the Internet, remote control based on power lines, and remote control based on telephone networks. The first two networking solutions are relatively complex, technically difficult, and costly, and require a high level of technical skills from the maintainer. The telephone network is a mature, widely used, and low-cost communication network. This design uses the telephone network to achieve remote monitoring. When there is an alarm at home, the user can remotely alarm by phone. When it is necessary to remotely control household appliances, the user can send the control signal to the microcontroller through the phone, and the microcontroller then outputs the control signal through the PA port of 8255 to drive the relay to switch the household appliances. The circuit of the telephone remote monitoring part mainly includes three parts: signal detection, analog off-hook circuit, dual-tone multi-frequency DTMF signal transceiver circuit implemented by HT9170 and HT9200A, and voice recording and playback circuit using ISD1420 as the recording and playback component.
3.5 Nodes connected to the CAN bus
This design uses the CAN bus peer-to-peer communication network to realize the exchange of information between indoor extensions of the smart home control system, as well as between extensions and the switchboard. It has the characteristics of equal status of each node and no master-slave node.
Since the main controller AT89C52 microcontroller itself does not have a CAN bus controller, this design uses the SJA1000 CAN bus communication controller and the AT82C250 bus driver to realize the information exchange between the microcontroller and the CAN bus.
3.6 Keyboard display
The keyboard adopts a 4×4 matrix keyboard with a total of 16 keys, including ten numeric keys, and the rest are the arming button, resident call intercom button, unlock button, confirm button, clear alarm and disarm button and home appliance control button, which are used for input of various control signals, call/help signals, unlock signal, disarm/arm signal. The display adopts the 74LS164 shift register with serial input and parallel output to drive a single LED eight-segment digital tube for real-time display of control parameters or alarm categories.
4 Design and implementation of smart home control system software
In order to make the program clear and readable and run at a high speed, this system software adopts a modular structure design, which consists of a main program and related subprograms (such as keyboard scanning subprogram, display subprogram, voice prompt subprogram, dial alarm subprogram, electrical control subprogram, etc.). The main program flow is shown in Figure 2.
Figure 2 Main program flow chart
The program mainly includes three modules: security alarm, building intercom and telephone remote control.
The main program works as follows: the system is initialized after power-on reset. After the initialization is completed, the system detects the alarm signal, building intercom call signal and incoming telephone call signal respectively. If there is a signal input, it enters the corresponding processing module. In the security alarm module, a delay program is set to eliminate jitter and false alarms. The delay program is mainly implemented by calling the keyboard scanning subroutine. If there is still an alarm after the delay is completed, the local alarm, the alarm to the central control room through the CAN bus and the dial-up telephone alarm are carried out in sequence, thereby realizing the function of multi-point alarm and minimizing the loss.
In the building intercom module, the call signal of the door phone is transmitted to the extension via the CAN bus. After the extension detects this signal, it connects the intercom ringing, and then determines whether to pick up the phone. If there is no off-hook signal, it will delay the judgment. When the resident picks up the phone, the microcontroller outputs a signal to control the control relay of the audio communication line to turn on, allowing the resident to talk with the caller.
During the call, the microcontroller determines whether the user is on-hook. If the user is on-hook, the microcontroller returns. If the user is not on-hook, the microcontroller calls the keyboard scanning subroutine to determine whether the unlock key is pressed. If the unlock key is pressed, the microcontroller remotely unlocks the door through the CAN bus and the door station. The working process of the telephone remote control program module is that when there is an incoming call, the microcontroller first detects whether the phone rings 4 times, then simulates picking up the phone, and then plays a recording prompting the user to enter the password. If the password is incorrect, the user simulates hanging up the phone. If the password is correct, the microcontroller plays a recording prompting the user to enter the serial number of the appliance to be controlled, and then detects the control signal returned, and calls the appliance control subroutine to control the switch of the household appliance, and simulates hanging up the phone after completion.
5 Conclusion
The smart home control system designed in this paper makes full use of the powerful control function of the single-chip microcomputer and the outstanding features of the CAN bus, such as flexibility, convenience, high reliability, high communication rate, low price, and easy networking. It integrates the relatively independent systems in the smart home and realizes functions such as building intercom, telephone remote control, and multi-point alarm. CAN technology is a new control network technology. Combined with the existing mature public telephone network, it will gradually show its unique advantages in the application of smart communities.
Abstract: Aiming at the problem that the smart home system has low integration and little connection between systems, this paper introduces a networking technology based on CAN bus with a single-chip microcomputer as the control core, and designs a smart home control system that can realize building intercom, telephone remote monitoring and multi-point alarm functions in combination with the public telephone network.
1 Introduction
Smart home emerged in Japan and Europe and the United States in the 1980s, and entered China in the late 1990s. With the development of the economy and the improvement of people's living standards, it has gradually been understood and accepted by the Chinese people. At present, there are many kinds of intelligent systems and products in China, but each system is independent of each other, with low integration and little connection with each other. For example, building intercom systems, security systems, household appliance automatic control systems, etc., each has its own terminal, and there is no unified intelligent control platform. For users, this situation increases the cost of use and the complexity of operation; for construction, it leads to repeated wiring. In view of this situation, this paper designs a single-chip microcomputer AT89C52 as the control core, using the original telephone network to integrate the building intercom, security alarm and telephone remote monitoring system to form a unified intelligent control platform, and connects with the door machine and the management machine through the CAN bus network, which can realize the functions of building intercom, telephone remote monitoring and alarm. The intelligent home control system. This system is simple to operate, does not require repeated wiring, and reduces the cost. It is a system that is truly suitable for smart homes.
2 Main components and functions of smart home control systems
(1) Building intercom system
The building intercom adopts a community networking system, and the intercom system is installed at the door of each residential unit and in the residents' homes to realize the functions of visitor identity verification and intercom with residents, as well as remote control unlocking by residents, thereby effectively preventing illegal persons from entering residential buildings.
(2) Home security system
The home security system has functions such as anti-theft, fire prevention, remote monitoring and alarm.
(3) Household appliance automatic control systems
The main function of the household appliance automatic control system is to control household appliances, lighting and other electrical equipment. The system can realize local centralized control of home lighting or household appliances, and can also remotely control home appliances through telephone when necessary to save energy.
3 Smart Home Control System Hardware Design and Implementation
The indoor extension system of the smart home control system is shown in Figure 1. The system is mainly composed of a single-chip microcomputer and its I/O port expansion part, a building intercom part, a security alarm part, a telephone remote monitoring part, a node part connected to the CAN bus, and a keyboard and display part.
Figure 1. Structure of indoor extension system of smart home control system
3.1 MCU and I/O port expansion
The single-chip microcomputer uses the powerful AT89C52 as the main controller, which is mainly used for signal acquisition, data processing, and output of control signals. It is the core of the entire control system. Since this system requires many I/O ports, the I/O ports provided by the single-chip microcomputer itself are not enough, so the chip 8255 is used to expand its I/O ports. Among them, the PA port of 8255 works in output mode and is used to control the switch of household appliances; the PB port works in input mode and is used to input the alarm signals of various alarm detectors; the PC port is used to expand the keyboard.
Previous article:Design of battery safety detection system based on single chip microcomputer
Next article:A mixed signal LED buck-boost drive circuit
Recommended ReadingLatest update time:2024-11-17 03:54
- Popular Resources
- Popular amplifiers
- New Energy Vehicle Control System Inspection and Maintenance (Edited by Bao Pili)
- Detailed explanation of big data technology system: principles, architecture and practice (Dong Xicheng)
- Automotive CAN embedded intrusion detection system based on deep learning
- Lightweight FPGA-based IDS-ECU architecture for automotive CAN networks
- 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
- EEWORLD University Hall----Principles and Applications of Sensors (Tongji University)
- About Linux kernel dts viewing tools
- Download Volkswagen car series component function and testing data
- EEWORLD University Hall----UCD3138 Digital Power Tools
- Use files to control the output level of gpio under linux
- EEWORLD University ---- Operating System (RISC-V)
- Five Lectures on Microwaves
- A comprehensive Python 3 "cheat sheet"
- FPGA implementation of high-speed dedicated GFP processor.pdf
- MSP430Ware use notes to initialize XT1