I.INTRODUCTION
This project implements a real‑time intrusion detection system using the EK‑TM4C123GXL microcontroller, OV7670 camera, HC‑SR501 PIR sensor, and a buzzer. The system detects motion, captures image frames, compares them with a reference frame, and triggers an alert if unauthorized activity is detected. UART logs provide real‑time feedback and debugging information.
II.OBJECTIVES
- Detect motion using the PIR sensor.
- Capture image frames from the OV7670 camera.
- Compare captured frames with a stored reference frame.
- Trigger buzzer alert for unauthorized activity.
- Display system logs and pixel data via UART terminal (Putty)
III.HARDWARE COMPONENTS AND SOFTWARE TOOLS
| Component | Description |
| EK‑TM4C123GXL | ARM Cortex‑M4 microcontroller board (Launch pad) |
| OV7670 Camera | CMOS sensor for image capture |
| HC‑SR501 PIR Sensor | Detects motion |
| SFM‑27 Buzzer | Provides audible alert |
| 4.7 kΩ Resistors | I²C pull‑ups |
| Breadboard & Wires | Circuit connections |
- Code Composer Studio v12 – Embedded C development environment.
- Putty – UART terminal for monitoring logs and pixel data.
IV.BLOCK DIAGRAM & FLOW CHART

System Overview:
- PIR Sensor (HC‑SR501) → GPIO PF4 (motion detection input)
- OV7670 Camera
- Data bus → GPIO PB0–PB7
- Sync signals (VSYNC, HREF, PCLK) → GPIO PA2–PA4
- SCCB (I²C) → PA6 (SCL), PA7 (SDA)
- XCLK → PF2 (PWM output)
- TM4C123 Microcontroller
- Captures frame data into SRAM
- Compares current frame with reference frame
- Sends logs via UART0 (PA0, PA1)
- Drives buzzer via PF1
- Buzzer (SFM‑27) → GPIO PF1 (alert output)
- UART Terminal (Putty) → Displays logs and hex pixel values
Figure 1: Flow chart
Description of Flowchart:
- Start
- Initialize peripherals (UART, I²C, GPIO, PWM).
- Capture reference frame from OV7670.
- Wait for PIR motion detection (PF4 input).
- If no motion → loop back.
- If motion detected → proceed.
- Capture new frame from OV7670.
- Compare new frame with reference frame.
- If difference < threshold → Authorized.
- If difference ≥ threshold → Unauthorized.
- Output result
- Authorized → UART log + buzzer OFF.
- Unauthorized → UART log + buzzer ON.
- Delay (~2 seconds).
- Loop back to PIR detection.
V.RESULTS
- UART logs show VSYNC events, hex pixel values, and status messages.
- Buzzer activates for unauthorized detection.
- System reliably detects motion and performs frame comparison


VI.APPLICATIONS AND CONCLUSION
Applications
- Home security.
- Office surveillance.
- Educational embedded vision projects.
- IoT intrusion detection systems.
Conclusion
The project successfully integrates PIR motion detection with camera‑based frame comparison and buzzer alerting. UART logs provide transparency for debugging. The two‑stage detection improves reliability by filtering false triggers. Future work can include higher resolution capture, SD card storage, or wireless alerts.
VII.REFERENCE
- Texas Instruments EK‑TM4C123GXL datasheet.
- OV7670 camera module documentation.
- HC‑SR501 PIR sensor datasheet.
Recent Comments