Video surveillance is an important part of security system. Its application is everywhere. Whether it is residential areas, school colleagues, companies and enterprises, it can timely reflect the on-site situation to the monitoring center, and effectively prevent the occurrence of crime. However, the current monitoring systems have their limitations. Due to the limited number of display surfaces of the monitoring surface in the monitoring center, it is not possible to display the surfaces transmitted by all cameras in the monitoring network at the same time. Recently, the main measure is to increase the monitors in the monitoring center, or switch the surface regularly and in turn. These solutions are not smart enough and increase operating costs. In this paper, an intelligent monitoring system based on S3C2440 is proposed, which is based on msp430f2121 and nrf24loi, combined with RFID technology to realize real-time intelligent monitoring of items in the room, that is, when items in the room are removed, the image information of the room is displayed in real time at the monitoring end.

Radio frequency identification technology is a technology that uses radio frequency signals to transmit information through spatial coupling, and through the transmitted information to achieve identification. The RF communication module nrf24lol used in this paper can work at 2.45 g. with long reading and writing distance and high identification accuracy, which fully meets the actual requirements.

1. Overall system architecture

This paper mainly simulates the actual monitoring environment and designs a set of hardware system and corresponding software system to realize real-time monitoring of various objects in the room. The specific idea is: attach a 2.45 g RF tag to each important object in the monitoring room, and the tag sends its own information (tag number) to the 2.45 G card reader (main control module) in the room at regular intervals, To prove that the items represented are still in the room. If the card reader does not read a label within the specified time, it proves that the corresponding items are no longer in the monitoring area, the monitoring module immediately opens the camera in the room, collects the on-site video data, and displays the data on the LCD display screen. The overall architecture of the system is shown in Figure 1.

How is video surveillance based on RFID

2 hardware platform of intelligent monitoring system

2.1 2.45G electronic label

Electronic tag is an important part of this system. It is powered by 3.7 V lithium battery, so the power consumption is required to be as low as possible. Msp430f212l is a typical low-power mixed signal processing chip of TI company. It has a normal working mode (AM). And five low power consumption modes (lpmo, lpmi, lpm2, lpm3 and lmp4). Each module of MSP430 Series MCU is independent of each other. The system enters the low power consumption mode to let the CPU sleep, while other modules (such as timer, a / D conversion and watchdog) operate normally. When the CPU is needed, it can be awakened by interrupt to enter the normal working mode. The wake-up time is about L ¨ s. This design uses msp430f2121 as the main control chip of electronic label, which fully meets the requirements of low power consumption.

At present, the RF communication part of 2.45c electronic tag has the following solutions: WiFi, Bluetooth, nrf240101 of Nordic company and wireless USB of cypress company. This design comprehensively considers circuit performance, power consumption, cost and system complexity

Due to various factors such as complexity, Nordic’s nRF24L01 chip is selected as the RF transceiver solution H. NRF24L01 is a wireless communication chip working in 2.4G band. It adopts CFSK modulation, supports frequency hopping, point-to-point and 1-to-6 wireless communication. Internally, enhanced short burst protocol is integrated, so nRF24L01 can automatically process frame header and CRC check code. And its transmission power can be adjusted by white action.

The label master chip msp430f2121 communicates with nrf24loi through SPI bus. SPI has SCLK, MoSi and mis0 lines, plus enable CE, chip selection CS and IRQ signal lines, a total of 6 lines. In this design, the main task of the tag is to actually send Baiji information to the card reader every other section, so miso and IRQ lines can be omitted. The structure diagram is shown in Figure 2.

How is video surveillance based on RFID

2.2 main control module

The main function of the main control module is to read the surrounding label information. After completion, compare it with the label table in the memory. If some labels are not read, it proves that the items bound to the labels are not within the read range. At this time, turn on the camera and display the situation in the room in real time on the LCD.

The main control chip of the main control module adopts S3C2440 of Samsung. The SOC is an ARM9 core with a dominant frequency of up to 400 MHz. It has independent instruction cache and data cache and MMU controller. It also integrates rich hardware resources, such as PWM timer, UART controller, memory controller, NAND flash controller, LCD controller and camera interface. It fully meets the requirements of the main control chip in this design.

2.2.1 card reader of main control module

In the design of electronic tag, the tag is always in the sending mode. Therefore, at the main control module end, configure the nrf24loi to be in the receiving mode to always read the information of the surrounding labels. S3c2440 has SPI controller, so it is convenient to configure nRF24L01. The specific configuration process is similar to that of electronic label nrf24loi. It should be noted that relative to the tag end, the main control section uses miso and IRQ signals. Miso receives the information sent by the tag, and the IRQ signal line is connected with the external interrupt 0 port.

How is video surveillance based on RFID

Fig. 3 hardware structure diagram of RF part of main control module

2.2.2 video acquisition and display part of main control module

S3c2440 is integrated with SDRAM controller to facilitate external SDRAM connection. This design uses k4s561632n of SamSung company as the SDRAM of the system. K4s561632n is organized as 16m * 16 bit, and its linewidth is 16 bits. After two k4s561632ns are connected in parallel, a 32-bit linewidth is obtained, with a total capacity of 64mbyte. The reason why large memory is needed is that the data collected by the camera needs to be stored

Stored in memory for easy display on LCD. Check the data manual. K4s561632n has 13 row address lines (rao-ra12), 9 column address lines (cao-ca8) and 2 bank selection lines (Bao BAL). The row address line and column address line of SDRAM are time-sharing multiplexed. The row address is sent first, and then the column address is sent. They are locked in the row address latch and column address latch respectively.

According to the design requirements, when objects are removed from the surrounding environment and the main controller cannot read a label, it is necessary to collect the image teaching data of the room in real time. S3c2440 integrates camera control interface and has 13 signal lines: camdata [7:0] (camera input data), campclk (input pixel clock), camvsync (input frame synchronization clock), camrer (input horizontal synchronization clock), camclkout (clock provided to camera) and camreset (camera reset). S3c2440 camera interface supports ltu-r bt601 / 656 data input, and supports two channels of camera DMA, preview channel and codec channel. The preview channel stores data in the memory allocated by preview DMA, which is mainly used for local video display. This design adopts this channel. In this system, the camera adopts COMS camera OV9650 of omnivision company, which integrates SCCB bus interface. The bus includes two signal lines, SLO C clock line and sio-d data line. SCCB bus is compatible with IIC bus, so you can configure OV9650 register with IIC bus of S3C2440 to complete camera initialization.

S3c2440 integrates LCD controller and supports monochrome \ gray \ color LCD screen. For the operation of LCD controller, it is necessary to pay attention to three timing signals, Vsync (frame synchronization signal), Hsync (row synchronization signal) and vclk (pixel synchronization signal). Another important aspect of LCD display is the display buffer. You can define a two-dimensional array with the same size as the screen in memory

Display buffer for. This paper uses an LCD display with a screen size of 320×240, so the two-dimensional array is defined as LCD_ BUFFER[240][320]。 Then, assign the set two-dimensional array address to the lcdsaddr1 and lcdsaddr2 registers, and the initialized LCD display screen can display the data stored in the buffer. LCD control has a dedicated DMA controller. Using this DMA channel, it can

It can transfer video data from frame buffer to LCD driver without CPU intervention. The display unit of this design adopts qunchuang 3.7-inch TFT LCD screen.

The video data collected by the OV9650 is stored in the memory allocated by the preview DMA through DMA, so that this memory coincides with the LCD display cache, so that the data collected by the camera can be displayed in real time on the LCD. The video information acquisition and display module is shown in Figure 4.

How is video surveillance based on RFID

Fig. 4 hardware structure diagram of video monitoring part

2.3 download and operation of main control module program

The storage system of this design is NAND flash Download the program to NAND flash through JTAG interface When the system is started, the program cannot be run in NAND flash. However, S3C2440 automatically moves the first 4K content of the program from NAND flash to the stepping stone area inside the processor, which becomes boot integral SRAM, and then runs the program in it, the first 4K

The move function in the program copies the whole program from NAND flash to SDRAM, and runs the program from SDRAM. So far, the whole system starts normally. The reason why NAND flash is used as the storage system is relative to NOR flash NAND flash has the advantages of high storage density, high erasable times and low price. Therefore, it is a common data storage device. The model of NAND flash used in this design is k9f2g08uob, and its capacity is 256M bytes. The NAND flash controller of S3C2440 can easily control NAND flash.

3 software design of intelligent monitoring system

3.1 software design on electronic label

Msp430f2121 completes initialization: set the clock frequency, select the working mode, and configure nrf24loi through SPI bus. However, msp430f2121 does not contain SPI bus interface, so it is necessary to use 1 / 0 port to simulate SPI bus according to SPI protocol to configure nrf24lol.

In this design, the electronic tag only sends its own information and does not receive any information. Configure the reader address register TX addr through the MoSi interface of SPI Automatic retransmission register setup_ Retr, communication frequency register rf-ch and transmission parameter configuration register RF_ Setup et al. Specific parameters: the communication frequency is 2.45 g, no automatic retransmission, imhz transmission rate and 0 DBM transmission power.

After the nrf24loi is configured in msp430f2121, use the timer to time is, turn on the timer, and enter the low power consumption mode lpm3. When the timer time expires, an interrupt is generated to wake up the CPU. In the interrupt processing function, write data (tag number) to TX FIFO, CE = I, and keep it above 10 ‘; s. nRF24L01 enters TX mode from standbv-i mode. After the data is sent, ACK is not detected and automatically returns to standby-i mode. After the interrupt returns, the CPU sleeps again, and the timer continues to count, so reciprocating. Figure 5 is the program flow chart.

How is video surveillance based on RFID

Figure 5 flow chart of electronic label software

3.2 software design of main control module

The total control module is the core of this design, and its software is also the focus of the whole design. S3c2440 has high main frequency and rich hardware resources. This makes it easier to initialize and control external devices.

First, in the S3C2440 startup code, set the working frequency, establish the abnormal interrupt vector table, initialize the stack, initialize the memory, and initialize the application execution loop.

Then jump to the main application. In the main application, initialize the camera and LCD controller, call the SPI controller, configure nrf24loi, and set the receiver address RX add Select communication frequency, wireless rate and other parameters. Switch the working mode. Rf24loi enters RX mode from standby-i mode. In this mode, it receives the information sent by the tag.

Then establish an integer array of whether the label exists, such as tag [n]. N is the number of array elements. Each element in the array represents the existence of a label, 0 indicates existence and l indicates nonexistence. The array tag [0] has 32 bits that can represent the existence status of 32 Tags. In this design, there are only 5 electronic tags, so the lower 5 bits of tag [0] are used to represent the existence status of tags. The initial values are all 1, that is, tag [ol = oxlf. When the information sent by the tag is received, the external einto strictly generates an interrupt. In the interrupt processing function, read the information sent by the tag and jump out of the interrupt processing function, Clear the representation bit of the corresponding tag in tag [0], and cycle like this. If the timer overflows and interrupts (5S in this design), judge whether tag [0] is equal to O. if it is not equal to 0, it indicates that there is a label that has not been read. At this time, the article indicated by the label may not be in the room. The main controller turns on the camera, turns on the LCD display, and

Real time face-to-face display in the room. The management personnel shall check the site and restart the system manually. The software flow chart is as follows:

How is video surveillance based on RFID

Figure 6 software flow of main control module

4 Conclusion

After testing, when the tag transmission power is set at 0 DBM, the identification range of the main control module is within the network radius of 15 m in an open field. On the open playground, five items are randomly placed within 15 m around the main control module, and each item is pasted with an electronic label. When taking an object and walking out of the recognition distance, the main control module will open the camera in SS and display the scene on the LCD, realizing the real-time video monitoring function. The experimental results are basically in line with expectations.

Responsible editor: CT

Leave a Reply

Your email address will not be published. Required fields are marked *