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
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
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
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
- The amplification area of the transistor is also called the linear area. So if we do not consider factors such as temperature, it can be regarded as a linear state. Which one is right for MOS...
- Detailed analysis of the damage causes of power MOS tubes
- Which is the control chip of this flyback power supply?
- Chanel lost the lawsuit against Huawei for logo infringement. Do you think these two logos are similar?
- Experts come to help
- Is there any solution to adjust the voltage accurately to 0.1V and start continuously and stably? ??? ? Help! ! ! !
- WTS Bluetooth headset wireless charging ear compartment solution
- Understanding FPGA Design from Xilinx FPGA Design Flow
- How to make the buzzer sound when pressing K1 and the indicator light on when pressing K2D1
- AM437x Processor PoM to Create Industrial Gateway Based on IoT (IoT-SDK)