Design strategy of home security system based on ADSP-BF533

Publisher:自由思考Latest update time:2011-04-09 Source: 电子科技Keywords:ADSP-BF533 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Design strategy of home security system based on ADSP-BF533

With the development of modern sensor technology and network technology, the use of modern sensors and computer technology for anti-theft has become an inevitable trend in the development of home security systems. This paper designs a home security system based on ADSP-BF533. The system uses BF533 as the core processor and adopts the MPEG-4 video compression standard. It detects illegal intrusion through infrared detectors. Once an abnormal situation is detected, it will alarm the user in the form of a text message, and at the same time start the video acquisition module to obtain on-site image information, and save the compressed and encoded video data to the storage device for users to play back, view and edit. Compared with the traditional anti-theft method that relies on installing anti-theft doors and windows and the alarm that uses on-site voice alarm as a means to deter and inform, this system has GSM remote alarm and on-site image acquisition and storage functions, which improves the timeliness, reliability and effectiveness of alarm processing.

1 Overall system solution
The design scheme of the home security system based on BF533 mainly consists of 4 parts, namely pyroelectric infrared detection, CMOS image acquisition, GSM alarm and image storage. The system structure block diagram is shown in Figure 1. The pyroelectric infrared detection module is connected to the PF port of BF533 to detect the indoor space. Once an illegal intrusion is detected, an interrupt request is immediately sent to the DSP to wake up the DSP in sleep mode. The GSM SMS alarm module is connected to the UART interface. The DSP can control the GSM module through the UART port to send alarm information. The CMOS camera is connected to the PPI interface. The PPI port moves the video data to the SDRAM in DMA mode for compression by the DSP. The storage device SD card is connected to the DSP through the SPI interface to save the compressed video stream data.



2 System Hardware Design
2.1 Pyroelectric Infrared Detection Circuit

The pyroelectric infrared detection module is completed with the BISS0001 pyroelectric infrared control dedicated chip. When someone moves in the effective detection area of ​​the pyroelectric infrared sensor, the sensor will receive the infrared signal emitted by the human body and convert it into a weak pulse voltage signal. After the voltage signal is amplified, amplitude-discriminated and timed by the internal circuit of BISS0001, it outputs a high level from the output pin. The high level is connected to the PF port of the DSP as the interrupt request signal of the DSP to wake up the DSP and enter the working state.
2.2 CMOS image acquisition circuit
This system uses the P03030K image sensor of Pixelplus to complete the image acquisition function. The P03030K outputs 300,000 pixel images and supports multiple output modes and output data formats. Here, the QVGA output mode and YUV4:2:2 output data format are used. P03030K is connected to the PPI port of BF533. The connection method is shown in Figure 2. P03030K generates three synchronization signals: HREF, VSYNC, and PCLK, which are the line synchronization output signal, field synchronization output signal, and output pixel clock. Y[7:0] is the image data signal output by P03030K. BF533 uses GPIO PF0 and PF1 to simulate the I2C bus protocol, thereby realizing the read and write operations of the internal registers of P03030K.


2.3 GSM alarm circuit
The GSM alarm circuit is completed using Siemens' TC35 module. The TC35 module is connected to the UART port of the DSP through the MAX232 serial port interface chip. The TC35 module also provides a SIM card interface.
By inserting a registered SIM card, it can access the GSM communication network to complete the SMS alarm function.
2.4 Image storage circuit
This system uses an SD card to store compressed and encoded video data. The SD card has two working modes: SDIO mode and SPI mode. Since BF533 supports the SPI interface, the SPI mode is used. The SPI interface data transmission rate of BF533 can reach 1/4 of the system clock at the fastest. Calculated based on the system clock of 118.8 MHz, the maximum data rate of SPI can reach 29.7 MB/s. Considering the large amount of video stream data, a double buffer mechanism is used for storage, which can meet the system requirements. The SD card interface circuit is shown in Figure 3.



3 System software design
The system software can be divided into three parts: video acquisition and compression program, GSM SMS alarm program and image storage program. The software flow chart is shown in Figure 4.


3.1 Video Capture and Compression Program
DSP completes the initialization of the P03030K image sensor through the I2C interface, and sets the corresponding registers to complete the settings of the working mode, data output format, resolution, brightness and chromaticity, etc. P03030K is connected to the PPI port of DSP, and the output image data is transferred to SDRAM for storage by DMA. This system uses the ping-pong buffer method to transfer data, opens two buffers in the memory, and uses two head-to-tail connected descriptor linked lists to control PPI DMA to transfer data to two buffers at a time. After DMA collects each line of image data, it generates an interrupt. In the interrupt service program, the memory DMA is used to move the data to the off-chip SDRAM, waiting for DSP to perform MPEG-4 compression processing on it. The video capture flow chart is shown in Figure 5.


DSP compresses and encodes video data using the MPEG-4 standard. Since the CMOS image acquisition module outputs YUV4:2:2 images, and the input of the encoding model is YUV4:2:0 images, the acquired images need to be chromatically resampled. DCT and IDCT are two functions that are frequently called during the encoding process, so they are implemented in assembly language and Chen's fast algorithm is used. In addition, according to the characteristics of BF533's hardware and compiler system, various methods are used to optimize the MPEG-4 encoding program code. The PADDING algorithm, motion vector prediction, SAD minimum search algorithm, and half-pixel interpolation, which need to be repeatedly executed, are assembled and optimized using the circular buffer technology and various pixel operation instructions and vector operation instructions provided by DSP, so as to give full play to the parallel processing capabilities of BF533. In terms of memory allocation, four frame buffers are opened in SDRAM, which are used to store the current encoding frame, the current reference frame, the next encoding frame, and the next reference frame data. The DSP's on-chip RAM capacity is small, but the access speed is fast. The smallest coding unit of MPEG-4 is the macroblock, so the macroblock can be transferred from the off-chip SDRAM to the on-chip RAM for processing, and then stored in the SDRAM after processing. In addition, in order to speed up the data block movement speed, the powerful DMA capability of BF533 is fully utilized to complete the data transmission operation. At the same time, the programs and data frequently accessed by the CPU are placed in the on-chip cache, and the ping-pong buffer structure is fully utilized to improve the encoding efficiency.
The MPEG-4 encoding process is shown in Figure 6.


3.2 GSM SMS alarm program
When the infrared detector detects an intruder, the DSP will immediately send an SMS alarm message to the owner so that the user can take measures. BF533 sends AT commands through the UART port to control the TC35 module. Send "AT+CMGF=1" to set the SMS sending mode to text mode, send "AT+CREG?" to query the network registration status, and send "AT+CMGS=13572472507" plus the SMS content to achieve the purpose of sending an alarm message to the target mobile phone. Due to the text sending mode, Chinese characters cannot be sent. This system chooses to send the English characters "Danger".
3.3 Image storage program
The compressed video stream data will be written to the SD card in the form of a file. Before writing the card, the SD card must be initialized and set to SPI working mode. The addressing mode of SD card is byte addressing. To speed up the process, it is set to sector addressing. Each sector is 512 bits. The function of writing a sector is as follows:

Among them, sector is the sector number to be written, buff points to the data stream to be saved, SPI_transfer_byte is the function of transferring 1 bit to SD card through SPI port, and SD_write_block is the encoding of SD card write command.

4 Conclusion
This system relies on the GSM public network with high coverage rate at present, and uses the existing wireless communication service and short message service service to realize the remote alarm function, which is not restricted by region and time. It also uses CMOS camera to collect on-site images, which improves the efficiency of alarm processing. Tests have proved that the system is stable and reliable, the alarm is accurate and timely, the frame rate of image acquisition is 15 f·s-1, and the resolution of single frame image is 320×240, which can meet user needs.

Keywords:ADSP-BF533 Reference address:Design strategy of home security system based on ADSP-BF533

Previous article:QAM signal modulation recognition algorithm based on constellation diagram cluster analysis and DSP implementation
Next article:Low-latency variation design for telecommunication systems based on SERDES transceivers and CPRI

Latest Embedded Articles
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号