A real-time home security system is designed, using a 32-bit ARM microcontroller STM32F103C8T6 as the central control unit. The system incorporates a vibration sensor and a pyroelectric infrared sensor to detect unauthorized entry. When activated, it continuously monitors the area and automatically sends an MMS alert when motion is detected. The system captures images using the OV7670 image sensor, processes them, and sends the resulting JPEG images via the GPRS module SIM900 to a pre-set mobile phone number. Additionally, the captured images are saved onto an SD card for future reference. Experimental results confirm that the system operates reliably and meets the intended design objectives.
In recent years, with rapid urbanization in China, people's living conditions have significantly improved, and the number of valuable items in homes has increased. However, due to the complex nature of the urban population, home security has become a critical concern. Many research projects on home security have been conducted globally, often utilizing high-performance ARM9 or ARM11 platforms with embedded operating systems and advanced sensors. These solutions, while effective, tend to be expensive. This paper introduces a low-cost, real-time home security system based on a 32-bit ARM platform. It offers a practical and cost-effective solution suitable for most households, meeting the growing need for home protection.
1. System Structure
As shown in Figure 1, the system follows a modular design approach, leveraging mature technologies and existing modules to reduce complexity and overall costs. It uses a low-ripple, high-efficiency 5V switching power supply as the main power source. After voltage regulation by a multi-channel power management unit, the system supplies stable power to each module, ensuring good anti-interference performance. The core controller is the STM32F103C8T6, while the vibration sensor SW-180 acts as an interrupt input device. Users can install it in a strategic location to detect vibrations. The system architecture is illustrated in Figure 1.
The pyroelectric infrared sensor used is the HC-SR501, which is also an input unit. It can accurately detect human movement within a range of 5–7 meters at 100°C and provides real-time feedback to the system’s control core. The image sensor OV7670 is connected to the STM32F103C8T6 through a data buffer FIFO, reducing the processing speed requirements of the microprocessor and easing the system’s workload.
Once image data is acquired, the system performs initial processing and converts it into JPEG format. The processed image is then sent to a designated mobile phone via the GPRS module SIM900 in the form of an MMS. If a suspicious person enters the house, the system triggers automatically, capturing a live photo, sending an alert message, and saving the image to the SD card for later review.
2. Hardware Design
2.1 System Core Unit
The STM32F103C8T6 is a high-performance 32-bit ARM Cortex-M3 RISC processor operating at 72 MHz, featuring built-in high-speed memory (64 KB Flash and 20 KB SRAM), numerous I/O ports, and two groups of peripherals connected to the APB bus. It includes two 12-bit ADCs, three general-purpose 16-bit timers, one PWM timer, two I2C buses, one SPI interface, three USART interfaces, one USB interface, and one CAN bus interface. The microcontroller operates between 2.0 V and 3.6 V and is available in an LQFP48 package. An LDO is used to convert the 5V power supply to 3.3V for the microcontroller.
Figure 2 illustrates the clock and reset circuits. The SD card communicates with the core processor via the SPI interface. The vibration and pyroelectric sensors are connected through the interrupt I/O port. The SCCB interface of the OV7670 is connected to the I2C bus of the core processor, and the GPRS module SIM900 communicates through serial port 1.
2.2 Image Acquisition Unit
The OV7670 is a 30W pixel CMOS image sensor from OmniVision, known for its compact size and low operating voltage. It offers all the features of a single VGA camera and image processor. The system controls the OV7670 via the I2C bus, allowing output of 8-bit image data in various resolutions such as full frame, sub-sampling, or window modes. It supports up to 30 frames per second for VGA images. Users can adjust image quality, data format, and transmission method. OmniVision’s unique sensor technology enhances image quality by minimizing optical and electronic defects like fixed pattern noise, trailing, and color instability.
In the circuit shown in Figure 3, a 12 MHz active crystal is used to generate a 12 MHz clock signal for the XCLK input of the OV7670. The PAM3101DAB28 provides a stable 2.8V power supply for the analog section of the OV7670, and the same power supply is used for the I/O section. This allows the LV7670’s internal LDO to function properly, providing a 1.8V power supply to the core of the OV7670.
To reduce the system’s data acquisition burden, a FIFO chip AL422B with a capacity of 384 KB is integrated, sufficient to store two QVGA image frames. By using the FIFO as a data buffer, the system no longer needs to handle the timing and control of the CMOS sensor directly. The designer only needs to focus on reading the FIFO data interface, simplifying the image acquisition process significantly.
2.3 Vibration Sensor Unit
1.0mm Ribbon Connector is commonly used in electronic devices to connect ribbon cables. It is a type of connector that has a pitch of 1.0mm, which means that the pins are spaced 1.0mm apart. This connector is designed to be used with ribbon cables that have a similar pitch.
The 1.0mm Ribbon Connector is typically used in applications where a high-density connection is required. It is commonly used in computer systems, printers, and other electronic devices that require a high-speed data transfer.
1.0Mm Ribbon Connector,Flat Cable Connector,Flat Ribbon Cable Connector,Flat Ribbon Connector
YUEQING WEIMAI ELECTRONICS CO.,LTD , https://www.wmconnector.com