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.
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
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- Qorvo experts: Smart home sector will see great growth
- [Live broadcast tomorrow at 2:00 pm] Introduction to Intel FPGA programmable acceleration platform. If you are afraid of forgetting to watch, please join the WeChat group and wait.
- How to control a four-phase stepper motor with pwm?
- TMS320C6000 Basic Learning (2) - Architecture
- 【GD32E503 Review】Part 7: What is screen tearing? Let’s take a look!
- 【ESP32-Korvo Review】 04 Development Environment Construction
- 【10/30@Shanghai- System Integrator Meeting, Sign Up Now! 】IoT Strategic Cooperation Summit Forum-Building...
- How to remove the AD official logo from the PCB template
- PCB wiring question
- Requirements for using IAR ETM Trace debugging features