The Specification, Design, and Implementation of aHome Automation SystemJavier Castro and James Psota{javy,psota}@mit.edu6.111: Introductory Digital Systems Laboratory Final ProjectMassachusetts Institute of TechnologyThis paper presents the specification, design, and implementation of a home automation systemthat was designed and built as a final project for 6.111 at M.I.T. This system was designed to beflexible and generally programmable, extensible such that adding additional features is relativelysimple, and modular and forward-compatible, so that new components can be added withoutredesigning the entire system. To achieve these goals, the system runs a user-defined programon a special-purpose processor, using real-world sensor inputs as operands. The sensors andother input mechanisms along with user-programmable event schedules allow the user to adjustand customize the home environment. Using sensors that measure temperature, light level, andinfrared commands from a remote control, this system will create a comfortable and safe homeatmosphere. Design decisions, implementation details, and testing procedures are thoroughlydiscussed, and the resulting functional system is described.2 ·Contents1 Introduction 42 Design and Implementation 42.1 Input/Sensor Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.1.1 IR Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.1.2 Clock Module . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.1.3 Temperature Module . . . . . . . . . . . . . . . . . . . . . . . . 92.1.4 Light Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.2 Control Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.2.1 Major FSM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.2.2 Instruction Format . . . . . . . . . . . . . . . . . . . . . . . . . 162.2.3 Program Format . . . . . . . . . . . . . . . . . . . . . . . . . . 172.2.4 Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.2.5 Truth Engine Processor . . . . . . . . . . . . . . . . . . . . . . . 182.2.6 Status Monitor: Hardware . . . . . . . . . . . . . . . . . . . . . 192.2.7 Status Monitor: Software . . . . . . . . . . . . . . . . . . . . . . 202.3 Actuator Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 Testing 223.1 IR Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.2 Temperature Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.3 Light Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233.4 Control Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233.5 Actuator Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233.6 Integration Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 Conclusion 24List of Figures1 Three-layer System Architecture . . . . . . . . . . . . . . . . . . . . . . 52 IR Transmitter/Receiver Waveforms . . . . . . . . . . . . . . . . . . . . 53 Phillips RC-5 Encoding Protocol . . . . . . . . . . . . . . . . . . . . . . 64 IR Module Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . 75 IR Module State Transition Diagram . . . . . . . . . . . . . . . . . . . . 86 IR Module Simulation Waveform . . . . . . . . . . . . . . . . . . . . . . 87 Clock Module Block Diagram . . . . . . . . . . . . . . . . . . . . . . . 98 Clock Module Waveform Simulation . . . . . . . . . . . . . . . . . . . . 109 Temperature Module Block Diagram . . . . . . . . . . . . . . . . . . . . 1110 A/D Interface State Transition Diagram . . . . . . . . . . . . . . . . . . 1211 Sensor Module State Transition Diagram . . . . . . . . . . . . . . . . . . 1312 Temperature Module Simulation Waveform . . . . . . . . . . . . . . . . 1313 Light Module Simulation Waveform . . . . . . . . . . . . . . . . . . . . 1414 Simple Thermostat Program . . . . . . . . . . . . . . . . . . . . . . . . 1415 Top-Level Control Unit Block Diagram . . . . . . . . . . . . . . . . . . 1516 Control Unit Major FSM . . . . . . . . . . . . . . . . . . . . . …
View Full Document