"

Lab #9: Home security system (Alarm System)

person using laptops

Objective: Design and implement a microcontroller-based development board for a home security system using the PIC16F18875 microcontroller. The system should meet the specified performance requirements and be thoroughly documented.

Specifications

  1. System Scope:
    • The system is designed to secure an average home.
    • It must monitor a minimum of 5 openings (doors or windows), with at least one door and one window.
  2. Code Input:
    • The system will be enabled and disabled by inputting a 3-digit code sequentially.
  3. Arming Delay:
    • A 30-second delay upon arming the system at a door opening to allow the occupant to exit without triggering the alarm.
  4. Disarming Delay:
    • A 30-second delay upon entering the premises at a door opening to allow the occupant to enter and disarm the system without triggering the alarm.
  5. Alarm Outputs:
    • Two distinct outputs:
      • A signal to activate an external siren or bell.
      • A second signal, delayed by 15 seconds, to notify a local monitoring station.
    • The external siren signal will have a silent feature.
  6. Opening Indication:
    • The system will indicate which opening was entered when enabled and retain this information until reset.
  7. Inputs and Outputs:
    • Inputs: Sensor outputs (5), code input, silent feature, and reset signal.
    • Outputs: Two system outputs for the siren and monitoring station, indicated by LEDs.
  8. Board Design:
    • Ensure the development board has enough pins for all connections.

Requirements

  1. Assembly Language Program:
    • Write the program in Assembly language with appropriate comments.
    • Include subroutines where possible to adhere to standard programming techniques.
  2. Building and Debugging:
    • Build the program and produce the .asm file for review.
    • Download the .HEX file.
    • Debug the program thoroughly and include portions of the debug process in your report.
  3. Demonstration:
    • Demonstrate the operational program to the instructor.
    • Post a demo video on Canvas.
  4. Technical Report:
    • Prepare a fully documented technical report, including:
      • Introduction: Overview of the project and objectives.
      • Discussion of Results: Detailed explanation of the design process, including equations, graphs, schematics, oscilloscope pictures, and other relevant components.
      • Understandability: Ensure the report is understandable to another engineer or supervisor not working on the project.
      • Conclusion: Summarize the results, discuss interesting findings or unexpected outcomes.

Detailed Steps

  1. Circuit Design:
    • Design the circuit to monitor 5 openings with sensors connected to the microcontroller.
    • Include input mechanisms for the 3-digit code, silent feature, and reset signal.
    • Design output connections for the siren and monitoring station, indicated by LEDs.
  2. Coding:
    • Initialize the microcontroller’s I/O ports and configure the ADC for sensor inputs.
    • Write subroutines for reading the sensors, inputting the code, and managing delays.
    • Implement logic for arming/disarming the system, triggering alarms, and indicating which opening was entered.
  3. Testing and Debugging:
    • Test the circuit and code to ensure all specifications are met.
    • Debug any issues and document the debugging process.
  4. Documentation:
    • Create a detailed schematic diagram of the circuit.
    • Include high-quality pictures of the assembled circuit board.
    • Write and comment the assembly code.
    • Record a video demonstrating the working system.

Submission

  • Schematic Diagram: Upload a PDF or image file of the schematic diagram.
  • Circuit Board Pictures: Upload image files of the circuit board.
  • Code: Include the commented assembly code in a text file or directly within the submission platform.
  • Video: Upload the video file demonstrating the working security system.
  • ASM and HEX Files: Upload the .asm and .HEX files containing the code.

Grading Criteria

  1. Report Quality:
    • Clarity, spelling, grammar, and organization of the report.
    • The report should be understandable to another engineer or supervisor not involved in the project.
  2. System Functionality:
    • Whether the system works according to the specifications.
    • How well the system was designed and implemented.
  3. Programming Standards:
    • Adherence to standard programming techniques, including the use of subroutines.

License

Icon for the Creative Commons Attribution 4.0 International License

Introduction to Microcontrollers Copyright © 2024 by Lake Washington Institute of Technology is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.