Design and implementation of image communication in wireless visual intercom entrance guard system

2021-12-03 11:45
Design wireless video intercom circuit with MCU AT89C51 as core and SRWF-1, CAMERA OV 7620, IDT7205 as peripheral chips, etc. The whole circuit is discussed around the acquisition, transmission and display of images. Describes the hardware and software processing technology in the wireless video door entry circuit. The simulation results show that the video intercom circuit has the functions of monochrome bitmap collection, one-key press confirmation of the access room number, wireless transmission of image signals, monochrome bitmap LCD display , ringing call and other functions. Compared with the existing system, this system applies low-speed single-chip microcomputer to image signal acquisition with large data volume and short-distance wireless image transmission, and has achieved better results.

Access control system

At this stage, most of the entrances of residential buildings in small and medium-sized cities are open, which makes it easy for residents to enter and exit, and also brings many inconveniences and unstable factors to the lives of residents. For example: Anyone can enter the residential corridor at will, and all kinds of paper notices hanging on the wall or on the stairs can be seen everywhere in the residential corridor. This affects not only the hygiene in the corridor, but also the performance of the Beautiful corridor. The video door entry access control system can perform the functions of visitor image recognition by residents and two-way communication, which simply solves the many inconveniences of residents' lives and has become a facility of indispensable support in the residential community. Today's video door entry access control systems are mostly wired systems. Although they have the advantages of high transmission capacity and high reliability, wired systems also have their inevitable shortcomings, such as poor flexibility, high installation costs, great construction difficulties, and maintenance difficulties. The wireless video door entry access control system can be installed at will, ready to use, eliminating the hassle of wiring and drilling, and will not affect the decoration environment and interior beauty. People can use the wireless remote control to automatically unlock the lock at any position in the room, avoiding the inconvenience of having to go to the designated position to open the lock. Therefore, the study of wireless video door phone access control systems to replace cable video door phone access control systems has far-reaching practical importance and high academic value, and can solve practical problems in real life. .
    At present, foreign research on wireless video door phone access control systems is vigorously developing. A typical representative is the latest model GB3188 designed by Motorola. With its outstanding overall design and excellent price-performance ratio, this machine has provided efficient and simple access management solutions to many businesses, especially for users in the property management, hospitality, construction and manufacturing industries, but it is not enough. The system does not involve the transmission of images. National research on wireless video door entry access control systems is mainly moving in the direction of wireless display. The wireless video door entry access control system designed by Beijing University of Technology Master Cui Zhen can transmit analog signals and digital signals on the same channel, saving a set of wireless transceiver equipment and reducing costs. However, the image signal and sound signal are transmitted by analog signals, and only the ringing signal, unlock signal and alarm signal are transmitted by digital signals, resulting in sound quality and poor image quality and interference signals. The wireless video door entry access control system designed by Professor Meng Limin of Zhejiang University of Technology realizes the digital transmission of sound signals, but the image signals are still transmitted by analog signals, so the quality of the picture is not good. This document designs a wireless video intercom circuit for buildings. This circuit uses a single chip microcomputer as the core of the controller and then connects to the peripheral circuit. The video signal is transmitted through the wireless digital transmission circuit, which can reach a wireless transmission distance of 50-200m. The advantage of this design is to obtain a continuous display of images on the basis of a single shot, which in a true sense performs wireless digital transmission of image signals.

1 general design plan
 
    The structure of the system is mainly made up of 3 parts: the upper computer system, the lower computer system, and the communication system. These three parts jointly complete the information exchange between the main controller and the sub-controller to achieve the purpose of building monitoring. The main controller and sub-controllers transmit data and commands through the SRWF wireless digital transmission module. This communication model belongs to the one-to-many communication mode, and its general block diagram is shown in Figure 1.
 
    The main control chip of the main controller is AT89C51, and the number of the room to be visited is obtained from the keyboard. After confirmation, the single chip microcomputer will control to open the video capture chip and buffer chip to work and communicate through the serial port under the set communication baud rate., The microcomputer of a Single chip sends the data to the digital transmission circuit, and the digital transmission circuit sends the data through the wireless channel. The main control chip of the slave controller also uses AT89C51, which receives the control information and data information from the master controller through the digital transmission circuit, and classifies the received data. If the communication direction signal sent by the host, the slave controller read the vibration The ringtone stores the data in the circuit, so it outputs the ringtone. Then start receiving the video signal and display it through the LCD display circuit. The user can decide if he wants to make more calls with the main controller through the button control circuit.

2 hardware circuit design
 
     The main controller circuit is composed of single-chip AT89C51, keyboard scan circuit, digital display and driving circuit, surveillance circuit, wireless data transmission circuit, etc. The schematic diagram of the main controller system hardware circuit is shown in Figure 2.
 
     Its workflow is as follows: first scan the key information of the user through the keyboard scan circuit to obtain the communication address of the slave machine, and display the key information through 4 LEDs so that the user clearly knows the address of the slave machine you want to visit. The user can confirm and modify the input value by incrementing, decrementing and re-entering on the keyboard. When the user presses the confirm key, the host stores the slave address at this time and turns on the video chip to sample the video signal, and at the same time sends the slave address through the SRWF wireless digital transmission chip . After receiving the answer signal and the ready signal from the slave, the master starts sending data at the set baud rate. Every time a data frame is sent, it waits for the response signal from the slave and at the same time sends a verification frame for each data frame to ensure the accuracy of the data transmission.

3 software design
 
    The master is the AT89C51 single chip microcomputer and the slave is the AT89C51 single chip microcomputer. The baud rate of data communication between master and slave is set to 9,600 B, and each slave has a unique address number, which is used to distinguish each slave. One-chip computer data communication is completed by the serial port, the T1 timer is the baud generator, the data transmission format is 1 start bit, 8 data bits, 1 stop bit and 1 bit programmable (T-B8). Work mode: set T1 timer to mode 2 and serial port to work mode 3.
    The communication protocol of this system is: the SM2 position of all slaves is 1, in the state of receiving an address frame, the master sends an address frame, where the eighth bit is the address and the ninth bit is the address. address / data distinctive flag Position 1 indicates Frame is an address frame. After all slaves receive the address frame, they compare the received address with the address of the local machine. For the slaves that match the address, set your SM2 position to 0 and send the local address to the host in response; for those that do not match the address The slave still keeps SM2 = 1 and ignores the data frame sent by the master. After the data is sent from the slave, a checksum frame is sent and the ninth bit is set to 1, as a signal for the end of the slave's data transmission. When the host receives data, it first judges the data receive flag RB8. If RB8 = 1, it means that the data transmission has ended and the checksum of the frame is compared. If it is correct, the correct signal 00H is sent to order the slave to restart; if there is an error, the OFFH signal is sent to instruct the slave to resend the data. If the received frame RB8 = 0, the data will be buffered and ready to receive the next frame of information. After the host receives the reply address from the slave, it confirms if the address matches. If the address does not match, it sends a reset signal; if the address matches, it clears TB8 = 0 and starts sending data. After receiving the reset command, the slave returns to the status of the monitoring address; otherwise, he begins to receive data and commands. The communication program flow chart between the master controller and the slave controller is shown in Figure 4 and Figure 5.

4 System simulation
 
    Draw the schematic diagram of the circuit in the Proteus ISIS 7.1sp2 software environment. The next step is to compile the program designed in machine language in the Keil C51μVision2 integrated development environment, enter Proteus ISIS, click the "Debug" menu with the left mouse button and select "Use romote debuger monitor" to perform the debugging of the connection between KeilC and Proteus. First, double click the single chip AT89C51 in Proteus to program it into KeilC. Import the HEX file to the AT89C51, you can click the full-speed simulation run button in Proteus to see the phenomenon, you can clearly observe the level change of each pin on the chip, red represents a high level, blue represents a low level; If the phenomenon is not correct, debug the program step by step in KeilC and observe the phenomenon in Proteus, if the step is not correct, modify the program in this section and debug until the simulation is completely successful.
    Press the 3 buttons on the keyboard to scan one by one. After inputting the 3 buttons, the data you just pressed will be displayed on the digital tube, and the numbers will be displayed in the order they were pressed. This number represents the room number to be visited, such as 504 Indicates the owner who wants to visit room 504. The room number will be provided to the single chip computer as the address for communication between multiple machines. The simulation result is shown in Figure 6.
    Replace TFT6448B chip in design with LM4229 in Proteus. The purpose of simulation: the encoding method used to obtain the image display and the monochrome bitmap display function of the liquid crystal. LM4229 uses the levels of the three pins of CDWRITE READ to determine whether to read data or read status, or write data or write commands. Its data pin is 8-bit, it can carry out direct data exchange with the one-chip computer, the P2 port is the control end of the liquid crystal display, the simulation result is displayed as in the Fig. 7.