Car Alarm System
Total Page:16
File Type:pdf, Size:1020Kb
2012 Car Alarm System BY David Lane [email protected] California Polytechnic State University San Luis Obispo, CA Advisor: David Braun Revision 7 3/20/2012 2 Table of Contents Abstract ........................................................................................................................................................ 7 Introduction ......................................................................................................................................7 Objective ................................................................................................................................................... 7 Design Requirements ................................................................................................................................ 7 Project Specifications ................................................................................................................................ 8 The Planning ......................................................................................................................................8 The Design .........................................................................................................................................9 Powering the Alarm System ...................................................................................................................... 9 Component Designs ................................................................................................................................ 10 Button Module: Design Choices .......................................................................................................... 10 Button Module Design Choice: KEYPAD.............................................................................................. 11 Window Sensor: Design Choices ......................................................................................................... 11 Window Sensor Design Choice: Vibration Sensor + Microphone ....................................................... 12 Wireless Transmitter: Design Choices ................................................................................................ 13 Wireless Transmitter Design Choice: RF Transmitter ......................................................................... 13 Alarm Noise: Design Choices............................................................................................................... 13 Alarm Noise Design Choice: 102 dB Piezo Electric Siren ..................................................................... 14 Component Information................................................................................................................... 15 KEYPAD .................................................................................................................................................... 15 MICROPHONE ......................................................................................................................................... 15 DOOR SENSOR ......................................................................................................................................... 17 VIBRATION SENSOR ................................................................................................................................ 18 Chosen Option: Piezo Electric Film Vibration Sensor .......................................................................... 18 Original Option: Accelerometer .......................................................................................................... 20 WIRELESS TRANSMITTER ........................................................................................................................ 21 Chosen Option: Universal Garage Door Opener ................................................................................. 21 Original Option: Bluetooth Devices .................................................................................................... 22 ALARM NOISE .......................................................................................................................................... 23 Chosen Option: 102dB Piezo Electric Siren ......................................................................................... 23 Original Option: Car Horn ................................................................................................................... 24 3 Problem with Using Car Horn ............................................................................................................. 26 Component Placement ..................................................................................................................... 27 The Programming ............................................................................................................................ 28 Alarm_System_Test.cpp ......................................................................................................................... 29 Alarm_task.cpp ....................................................................................................................................... 30 Keypad_driver.cpp .................................................................................................................................. 32 Door_Sensor_driver.cpp ......................................................................................................................... 33 Senior Project Analysis ..................................................................................................................... 34 Summary of Functional Requirements ................................................................................................... 34 Primary Constraints ................................................................................................................................ 34 Economic ................................................................................................................................................. 34 Costs ........................................................................................................................................................ 34 Equipment ........................................................................................................................................... 35 Time Line ............................................................................................................................................. 35 Bill of Materials ................................................................................................................................... 35 Environmental ......................................................................................................................................... 36 Manufacturability ................................................................................................................................... 37 Sustainability ........................................................................................................................................... 38 Ethical and Health ................................................................................................................................... 38 Safety ...................................................................................................................................................... 39 Social and Political .................................................................................................................................. 39 Bibliography .................................................................................................................................... 41 Final PERT Chart ............................................................................................................................... 42 Mid-Point PERT Chart ....................................................................................................................... 44 Original PERT Chart .......................................................................................................................... 46 Code ................................................................................................................................................ 48 Makefile .................................................................................................................................................. 48 Alarm_System_Test.cpp ......................................................................................................................... 58 Alarm_task.cpp ....................................................................................................................................... 60 Alarm_task.h ........................................................................................................................................... 66 Door_Sensor.cpp ..................................................................................................................................... 67 Door_Sensor.h ........................................................................................................................................ 69 4 Keypad_Driver.cpp .................................................................................................................................. 70 Keypad_Driver.h ....................................................................................................................................