Design of infrared remote control password lock system based on AT89C51

Publisher:科技独行者Latest update time:2014-10-15 Source: dzscKeywords:AT89C51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  1 Introduction

  At present, the main development direction of password lock systems at home and abroad is: contact password lock system, contactless password lock system, intelligent identification password lock system; but they all have different disadvantages. The cost of infrared remote control password lock system is comparable to that of contact password lock system, and it can be remotely controlled at a short distance, which is very convenient to use. The use of digital signal encoding and secondary modulation can not only realize the control of multi-channel information, increase remote control functions, improve the anti-interference of signal transmission, reduce false operations, but also have low power consumption; infrared rays will not leak to the outdoors, and will not produce signal crosstalk; fast response speed, high transmission efficiency, stable and reliable operation, etc. In industrial equipment, under high voltage, radiation, toxic gases, dust and other environments, the use of infrared remote control is not only completely reliable but also can effectively isolate electrical interference. Therefore, infrared remote control is currently the most widely used communication and remote control means.

  For this purpose, this design consists of an infrared receiver head HS0038 (infrared receiving frequency is 38khz) and a receiving part controlled by AT89C51; the transmitting part controlled by an infrared light-emitting diode and AT89C51 completes the password sending process. Electromagnetic relays are used in the design to replace the functions, and there are two LED lights to indicate the system's buttons and unlocking. The application design of the remote control system using a single-chip microcomputer has flexible and diverse programming and a clear circuit structure. It is especially suitable for homes, hotels, warehouses, private garages and other places.

  2. Overall design of password lock

  This system uses AT89C51 single-chip microcomputer as the core component of this design. The system consists of two parts: the transmitter module and the receiver module. The remote control transmitter module can be carried with you. As long as it is near the receiver, it can be remotely unlocked. The remote control transmitter is mainly composed of AT89C51 single-chip microcomputer, infrared emitting diode, matrix keyboard and remote control switch circuit. The structural diagram of this part is shown in Figure 1.

  

  The infrared remote control consists of two parts: the sending part and the receiving part. The sending end uses a single-chip microcomputer to encode and modulate the binary signal to be sent into a series of pulse signals, and transmits the infrared signal through the infrared transmitting tube. The infrared receiving part uses a reliable integrated infrared receiving head to receive the infrared signal. It amplifies, detects and shapes the signal at the same time to obtain the TTL level coded signal, which is then sent to the single-chip microcomputer for decoding and related operations.

  The infrared transmission and reception control circuits are both implemented using the 8051 single-chip microcomputer. The circuit is simple, the output control method can be selected, and it is highly practical. Figure 2 is a schematic diagram of transmission and reception:

  

  3. System main hardware design

  In this design, the AT89C51 microcontroller is the core. The AT89C51 microcontroller is a low-power, low-voltage, high-performance CMOS 8-bit microcontroller, and its output pins and instruction system are compatible with MCS-51. The AT89C51 is a powerful, flexible and reasonably priced microcontroller that can be easily used in various control fields.

  3.1 Infrared transmitter and receiver

  Here, infrared light-emitting diodes such as SE303·PH303 are used. They are similar in appearance to light-emitting diodes LED and emit infrared light (near infrared is about 0.93um). The tube voltage drop is about 1.4V, and the working current is generally less than 20mA. In order to adapt to different working voltages, a current-limiting resistor is often connected in series in the circuit. When emitting infrared rays to control the corresponding controlled device, the controlled distance is proportional to the emission power. In order to increase the control distance of infrared rays, infrared light-emitting diodes work in a pulse state, because the effective transmission distance of pulsating light, that is, modulated light, is proportional to the peak current of the pulse. As long as the peak current is increased as much as possible, the emission distance of infrared light can be increased. The way to increase the peak current is to reduce the pulse duty cycle, that is, to compress the width of the pulse. Reducing the pulse duty cycle can also greatly increase the emission distance of low-power infrared light-emitting diodes. To make an infrared light-emitting diode produce modulated light, it is only necessary to add a pulse voltage of a certain frequency to the driver tube.

  This design uses the infrared integrated receiving head HS0038. HS0038 integrates the reception, amplification, detection and shaping of remote control signals, and outputs TTL signals that can be recognized by the microcontroller. This greatly simplifies the complexity of the receiving circuit and the circuit design work, making it easy to use.

  3.2 Coding Processing of Infrared Signals

  3.2.1 Infrared encoding

  The remote control information code is modulated into a 38.5KHz infrared carrier signal by the timer T1 of the AT89C51 microcontroller. Different pulse numbers represent different operation code information. The minimum number is two pulses (two pulses are used), and the pulse numbers of other information codes increase one by one. In order to make the reception as reliable as possible, the first code width is 3ms, the rest are 1ms, the code spacing is 1ms, and the remote control code data interval is greater than 10ms. Each key on the remote control has a unique key number. The microcontroller sends an agreed number of pulses by checking the key value of the pressed key.

  3.2.2 Decoding of infrared receiving signals

  The decoding of the received signal is based on the format of the pulse frame output by the infrared receiver, that is, the accumulator A is used to count the negative jump pulses that meet the conditions. When the infrared receiver outputs pulse frame data, the low level of the first code will start the interrupt program and receive the data frame in real time. When receiving the data frame, the code width of the first (start) code will be verified according to the format of the transmission frame. If the pulse width of the first low-level code is less than 2ms, it will be treated as an error code. When the high-level pulse of the interval bit is greater than 3ms, the reception is terminated, and then the number of pulses in the accumulator A is used to determine whether the six-digit password entered on the keyboard is the same as the set password, thereby controlling whether the relay is unlocked or not. Figure 3 is a waveform diagram of a frame of remote control code output by the infrared receiver. [page]

  

  3.2.3 Communication interface circuit

  The communication between the computer and the single-chip microcomputer is done by serial communication, which is the simplest and most widely used data communication method between the PC serial port and the device at this stage. The serial port is a universal device communication protocol in the computer. The RS-232 interface standard can be used to realize the transmission of data and complete the transmission of temperature data and control instructions.

  4. System software design

  4.1 Remote control transmission program design

  This part is mainly divided into the main program, key scanning program and remote control code pulse transmission program. It mainly sets the timing mode of timer T1 and initializes the counter.

  4.2 Host computer software design

  This paper also designs host computer software to carry out human-computer interaction, which can expand the application of password locks in a wider range of fields.

  This paper uses LabVIEW graphical programming language to complete the design of the control platform. The system software adopts modular design ideas. The LabVIEW program reads the password lock data through the serial communication circuit and performs corresponding analysis and processing on the data.

  4.2.1 User Management Module

  The normal operation of the password lock monitoring system is related to the security of the entire password lock system. Only authorized users can enter the system to operate. Each authorized user has a unique identity, that is, a user name, and the user logs in to the system with a password. Users can be divided into three categories according to their permissions: administrators, ordinary users, and test users. Test users can only use some functions of the system; ordinary users can use all functions of the system; in addition to the permissions of ordinary users, administrator users can also manage other users, including adding users, modifying user permissions, deleting users, etc.

  4.2.2 Password lock status and display module

  The password lock status is displayed point by point on the computer monitor through the LabVIEW front panel and connected to display the tested password lock in real time. The data acquisition program flowchart is shown in Figure 4.

  

  The data access module calls WriteCharacters To File in LabVIEW to enable the subroutine to save the detected password lock status value to an Excel table, making it convenient for users to call up historical password lock status values ​​for reference and research in the future.

  5. Conclusion

  This design uses a single-chip microcomputer chip to control an infrared remote control system, which overcomes the disadvantage of traditional locks that the key must be inserted into the lock to open, and has a long-distance remote unlocking function. And establish a host computer software to manage the state of the infrared remote control password lock network. The infrared remote control password lock designed in this scheme has functions such as remote unlocking, password modification, and password error alarm, and has the characteristics of good confidentiality, safety, reliability, and low cost. After testing, the infrared remote control password lock has strong practicality

Keywords:AT89C51 Reference address:Design of infrared remote control password lock system based on AT89C51

Previous article:Design and implementation of high performance frequency synthesizer based on DDS+PLL
Next article:Design of a real-time measurement and control system for CO concentration in cars

Recommended ReadingLatest update time:2024-11-16 23:45

Design of Portable Digital Blood Pressure Monitor Based on AT89C51 Single Chip Microcomputer
introduction At present, due to unscientific eating habits and unhealthy living habits, people are prone to various diseases, and hypertension, as one of the diseases, has seriously threatened the health of modern people. How to detect hypertension as early as possible has become the primary issue for people to fight
[Microcontroller]
Design of Portable Digital Blood Pressure Monitor Based on AT89C51 Single Chip Microcomputer
Serial communication design based on AT89C51 application system
1 Introduction In the power equipment status detection system using infrared imaging technology, the application system is based on the AT89C51 microcontroller and uses the non-contact infrared thermometer model 3iLRL3 from the American Raytheon Company. This thermometer uses the RS232C serial communication standard
[Microcontroller]
Design of LED Chinese character dot matrix scrolling display based on AT89C51 microcontroller
LED display screen is a flat display screen composed of light-emitting diode dot matrix modules or pixel units. It has the advantages of high luminous rate, long service life, flexible configuration, rich colors and strong adaptability to indoor and outdoor environments. And it is widely used for information release a
[Microcontroller]
Design of LED Chinese character dot matrix scrolling display based on AT89C51 microcontroller
Application of AT89C51 single chip microcomputer in variable frequency speed regulation constant pressure water supply system
The principle of variable frequency speed regulation constant pressure water supply and the hardware composition and software design method of variable frequency speed regulation constant pressure water supply control system composed of AT89C51 are discussed. 1 Working Principle Compared with water sup
[Microcontroller]
Application of AT89C51 single chip microcomputer in variable frequency speed regulation constant pressure water supply system
Single chip temperature measurement system (AT89C51, DS18B20 temperature sensor, LCD1602)
1. Introduction This system is mainly composed of AT89C51, DS18B20 temperature module and LCD1602. The general principle is that the temperature data collected by DS18B20 is transmitted to P3.3/INT1 (external interrupt 1) of AT89C51, and finally the current real-time temperature is displayed through LCD1602. 2. Rend
[Microcontroller]
Single chip temperature measurement system (AT89C51, DS18B20 temperature sensor, LCD1602)
Intelligent Mine Environment Quality Monitoring System Based on AT89C51
1 Introduction With the purpose of monitoring toxic and harmful gases in mines, this paper introduces the design and implementation of a highly versatile intelligent air monitoring system. Using AT89C51 single-chip microcomputer as the main controller, it can realize the collection, processing, storage, display
[Microcontroller]
Intelligent Mine Environment Quality Monitoring System Based on AT89C51
Design of AT89C51 Single-Chip Microcomputer Digital Electronic Clock
1. Design Purpose and Requirements Design purpose: Through design, cultivate the ability to use the knowledge learned to solve practical problems, the ability to consult information, the ability to self-study and the ability to analyze and solve problems independently and the ability to think independently. Design r
[Microcontroller]
Design of AT89C51 Single-Chip Microcomputer Digital Electronic Clock
Design of embedded temperature measurement system based on CAN bus
1. Introduction Temperature is a very important physical quantity, and its measurement and control are of great significance. With the development of modern industrial and agricultural technology and the improvement of people's requirements for living environment, people also urgently need to detect and control temper
[Microcontroller]
Design of embedded temperature measurement system based on CAN bus
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号