2nd year igen project - final report

26
Automated Garage Door System Submitted to: Dr. William Dunford Estella Qi Dr. Noboru Yonemitsu By: Johnny Gong Michael Harvey Andrew Li Jael Lumba Lachlan Pedersen 15 April 2014 Integrated Engineering University of British Columbia

Upload: michael-harvey

Post on 19-Feb-2017

117 views

Category:

Documents


2 download

TRANSCRIPT

Automated Garage Door System

Submitted to:

Dr. William Dunford

Estella Qi

Dr. Noboru Yonemitsu

By:

Johnny Gong

Michael Harvey

Andrew Li

Jael Lumba

Lachlan Pedersen

15 April 2014

Integrated Engineering

University of British Columbia

ABSTRACT

A common concern people have is to accidentally leave their home with their

garage door left open. By leaving a garage open, an opportunity is presented to passers

by to steal or vandalize the belongings in the garage. With the many valuables being

stored in a typical garage, the consequences of leaving an open garage unattended are

severe. Moreover, when a garage is left open, the garage is unprotected from the

environment.

To assure the closure of the door and to improve the convenience of using a

garage, this project automates the operation of a garage door system. Our focus is to

make the Automated Garage Door System appealing to consumers by being easy to

install, intuitive to use, and require little maintenance.

GLOSSARY

Arduino A prototyping platform that compiles code based on the C

programming language

Housing A 3D printed box containing the system components. Placed

inside both the car and the garage.

Magnetic Leaf Switch A sensor consisting of a magnet and a switch ­ when the two

are in contact, the switch is on, otherwise, the switch is off

Microcontroller A small computer on an integrated circuit (i.e Arduino)

Transistor A semiconductor in which amplifies and switches electronic

signals as well as electric power

Ultrasonic Sensor A proximity sensor which detects the distance of the closest

object in front of it

XBee Shield A component that fits on top of the Arduino to allow the

Arduino to communicate wirelessly

TABLE OF CONTENTS

1.0 Introduction 2.0 Design Process

2.1 Existing Systems

2.1.1 Magic Closer Garage

2.1.2 Novalert

2.1.3 Garage Hawk

2.2 Design Decisions

2.2.1 Convenience

2.2.2 Security

3.0 Project Design

3.1 Components

3.1.1 Arduino

3.1.2 XBee Shield

3.1.3 Ultrasonic Sensor

3.1.4 Magnetic Leaf Switch

3.1.5 Power Supply

3.1.6 Transistors

3.1.7 Garage Door Remote

3.2 Stages

3.2.1 Stage One ­ User Enters Car

3.2.2 Stage Two ­ Car Leaves

3.2.3 Stage Three ­ Car Returns

3.2.4 Stage Four ­ Shutdown

4.0 System Testing

4.1 Individual Component Testing

4.1.1 Ultrasonic Sensor

4.1.2 Garage Remote and Opener

4.1.3 Microcontroller

4.2 Collective System Testing

5.0 Conclusion REFERENCES APPENDIX A APPENDIX B APPENDIX C

1.0 INTRODUCTION

This report will discuss our year­long design project for IGEN 230 called the

Automated Garage Door System.

This report has been prepared for Estella Qi, who will mark this report for IGEN

201, as well as Dr. William Dunford and Dr. Noboru Yonemitsu who have helped us in

the progression of our design project. This report contains information from research we

have performed on company websites, as well as data from testing the components of

our design.

Report Format

To touch­base on our design project, this report includes the following main

sections:

Section 1.0: Introduction

Section 2.0: Design Process

Section 3.0: Project Design

Section 4.0: System Testing

Section 5.0: Conclusion

2.0 DESIGN PROCESS

The design process for our project required research on existing garage systems

in order to address their problems. With addressing these problems, we were able to

plan our design to eliminate and/or minimize the existing problems involving user

convenience and security.

2.1 EXISTING SYSTEMS

There are several comparable automated garage door systems available. Many

of which are timer based systems and none are are based on the location of the vehicle.

The following are existing garage system that have the same objectives as our project

along with their deficiencies.

2.1.1 Magic Closer Garage:

The Magic Closer Garage is a timer­based system, as described on the webpage

of the manufacturer, Big Ideas Inc. It requires a 5 or 15 minutes delay when it is in

automatic close mode. As a result, the garage is left open for a substantial amount of

time after the user has drove away. Furthermore, the installation process is intrusive to

the garage by requiring the user to connect a module garage wall controller.

2.1.2 Novalert: Similar to the Magic Closer, the manufacturer describes the system to be

timer­based, requiring 5­6 minutes before closing the garage door. This results in the

system being prone to allowing thieves to enter the garage before the timer notifies the

system to close the door.

2.1.3 Garage Hawk: From information gathered through the manufacturer, Innovative Home Systems

LLC, the Garage Hawk system consists of a module located in the garage and another

in the user’s home. The Garage Hawk is reliant on supervision of the system from inside

the user’s home. This system does not remind the user to close the door when owner is

leaving the home. As a result of the setup of the Garage Hawk, it only enables the user

to close the door from the user’s home. Therefore, it is not a complete automation

system.

The common issue with all of these systems is that they do not provide a

comprehensive experience. Owners will still expose their belongings for a substantial

amount of time. In addition, all of these systems only assist with the closing of the

garage door, not opening when the user returns.

2.2 Design Decisions

The major decisions that went into designing the system were regarding

convenience and security. A lengthy decision process was performed based on these

criteria in order to decide on the best process and components to use.

2.2.1 Convenience

Convenience was a major factor in the design of the Automated Garage

Door System.The product needed to be functional, yet as unintrusive as possible. The

initial goal for the system was only to close the door after the car had left. To make the

system more comprehensive, the ability to open the door was introduced to the design.

A method to open the door was needed, one that would only open the door when the

user was leaving. It was decided that buckling the seat belt was an indication that car

was ready to leave the garage. For this reason, a leaf switch on the seatbelt was

chosen to initialize the system and open the door. The leaf switch is also small, and

requires no power, making it the ideal option for placement on the seat belt.

2.2.2 Security

The two biggest security risks of the design come from the time between when

the car leaves and when the door closes, and the signal of the Xbees being vulnerable.

With the system, the door is closed as soon as the car is past the ultrasonic sensor, so

this is not an issue. The second concern is that the signal between the XBees is not

secure. The way this was worked around was only using the car to open the door. A

copied signal broadcast when the car is in the garage would do nothing, as the XBee in

the car would not receive the signal. A copied signal sent when the car is away would

also be useless, because the car is required to be in the XBee range in order to open

the door. This means that there are no repercussions of not encrypting the XBee signal.

3.0 PROJECT DESIGN

Our project design consists of multiple components that will be outlined in this

section. In addition, the stages in which these components will be in use will be

thoroughly explained.

3.1 Components

The components used in our design were chosen to carry­out commands that

were coded in a programming suite for Arduino.

3.1.1 Arduino The Arduino is a prototyping platform that compiles code based on the C

programming language. In our design, we are using two Arduinos, one is the garage

unit and the other is the car unit. The inputs to the two Arduinos are multiple sensors

around the car and garage. The Arduino microcontroller takes these inputs and follows

a logic flow to control the state of the garage door.

3.1.2 XBee Shield The Xbee Shields are components that are fitted to the top of each

Arduino and allow the two units to communicate wirelessly. In our design, we are using

two XBee shields to determine the distance between the car and the garage.

3.1.3 Ultrasonic Sensor

The Ultrasonic Sensor is a proximity sensor which detects the distance of

the closest object in front of it. We are using one Ultrasonic Sensor connected to one of

the inputs of the Arduino in the garage unit. The sensor is placed in its own housing

outside, mounted above the garage door. It faces down and detects when the car drives

out of the garage.

3.1.4 Magnetic Leaf Switch

In our system we use two magnetic leaf switches; one to monitor the

status of the garage door, and one to monitor the seatbelt in the car. The switches are

simple and provide a reliable reading for our microcontroller with no power

requirements. The range of the contacts is roughly five centimeters which allows

flexibility on how the user installs the sensor. As a result, the switches can be installed

on a variety of different garage door setups. The dimensions of the sensor are 5 cm by

3 cm by 2 cm. (see Figure C.2, Appendix C)

3.1.5 Power Supply

An AC/DC adaptor converts the wall outlet 120V AC to 9V DC at 1A to

power the garage unit. In the car unit, a 9V DC battery provides power to the

microcontroller and XBee shield, while the door remote is powered by its own button

cell.

3.1.6 Transistors

The car and garage units each use one npn transistor to control the

remote and the door opener respectively. Each transistor acts as a switch controlled by

a digital pin on the Arduino. When the switch is closed, the leads on the remote or door

opener are connected and the door is opened or closed, depending on its previous state

3.1.7 Garage Door Remote

The car unit requires the capability to open the garage door. For this, the

internal circuitry of an existing wireless garage door remote is utilized. It is modified to

be able to be activated by a transistor. By using an existing remote, the rolling­code

technology is incorporated and thus increases the security significantly as opposed to

building a remote from scratch. The remote must be paired to the garage when the

system is installed. The pairing process simply requires the user to press the learn

button on the opener, followed by pressing the remote within 30 seconds of pressing the

learn button. These steps can be universally applied to the standard garage door

opener. It is the component responsible for opening the garage door. It has a range

slightly lower than the XBees. (see Figure C.1, Appendix C)

3.2 Stages

There are four stages to our design, each requires different components to be

active. The functionality of our system during each stage is outlined in this section. A

flow chart (Figure 3.2, page 13) that outlines the system’s functionality is included. In

addition, please refer to Appendix B in which the Illustration of the System Functionality

is shown.

3.2.1 Stage One­ User Enters Car

The system begins with the car in the garage and the garage door closed.

The magnetic leaf switch attached to the seat belt is closed when the seat belt is

buckled. This signals the Arduino in the car unit to begin transmitting through the XBee.

Meanwhile, the garage unit is on standby waiting for a transmission from the car unit.

Once the XBees are communicating, the car unit opens the door. The car can now drive

away.

3.2.2 Stage Two ­ Car Leaves

The garage unit detects the car as it passes through the door under the

ultrasonic sensor. The Arduino then waits for the car to clear from the doorway and then

closes the door. The car drives away and leaves the range of the XBee’s, this cease in

communication signals both units to move to stage three.

3.2.3 Stage Three ­ Car Returns

While the car is away, both units are on standby. The garage unit is

periodically attempting to contact the car unit and the car unit is waiting for a signal from

the garage unit. Once the car re­enters XBee range, it receives the transmission from

the garage and begins to transmit as well. The two units are now in full communication

and the car unit starts attempting to open the garage door. Once the car is within range

of the remote, the door opens. The garage unit now senses that the door is open and

moves to standby, waiting for the door to be closed. The garage door will be open by

the time the car pulls up. The user can now enter the garage.

3.2.4 Stage Four ­ Shutdown

This is the last stage in our design and the only stage where user input is

required. The user must close the door manually when they are ready. The garage unit

will sense the closed door, and will tell the car unit to stop transmitting, as well as enter

standby itself. The system now returns to stage one and waits for a signal from the seat

belt leaf switch.

Figure 3.2: System Flow Chart

4.0 SYSTEM TESTING

Our design depends on the functionality of every component in the system. To

ensure we addressed our design’s problems, we needed to test each component both

individually and as a system.

4.1 Individual Component Testing

The components were tested individually to ensure that they could proficiently

perform their required task. Small scale test rig’s were developed to determine the

specific capabilities of each component.

4.1.1 Ultrasonic Sensor The sensor has an precise range up to about two metres. The output of the

sensor from our program is in the units of centimeters with minor fluctuations in the

readings. The purpose of sensor is to determine when the car passes through the door,

consequently the most important property of the sensor is how prompt of a response is

received by the microcontroller. From results in the testing of this component, there is a

minimal delay that does not hinder the performance of the rest of the system.

4.1.2 Garage Remote and Opener With the use of a transistor we are able to utilize the function of the remote for

our purposes as expected. Similarly in the garage unit, the transistors have allowed us

to utilize the garage door opener without a delay.

4.1.3 Microcontroller The Arduino Uno microcontrollers have sufficiently handled the processing

requirements for our system.

4.2 Collective System Testing

Initially, multiple small scale test rig’s were built in order to test and debug the

code and also to test how the components work together. The circuitry for each unit was

built on a breadboard to provide ease of modification. The small scale setup could only

test certain portions of the code since the range of the XBee modules cannot be

changed and this is an important aspect of the program. The final debugging and testing

process had to be full scale, so the entire setup was installed on a garage. The

practical range of the XBee modules was then tested from multiple approaches, and the

entire code was debugged and finalized. Error checking functions were incorporated

into the code in order to ensure that the door cannot be left open at any stage of the

process.

5.0 CONCLUSION

The Automated Garage Door System successfully eliminates the possibility of

accidentally leaving the garage door open. It does so without detracting from the

garages overall security, and operates around the user, not a timer. The user is able to

control the garage normally if they wish, or utilize the Automated Garage Door System.

The system has improved on the existing systems on the market in terms of both

convenience and security. Conventional timer based systems either leave the door

open for an extended time, or require you to rush every time you leave your garage.

Having the system based on the location of the car allows the user to leave at their own

pace, as well as ensuring the garage is left open for a minimal amount of time.

While current systems only close the door, the Automated Garage Door System

allows for the door to be opened before the car is even in the driveway, reducing time

spent waiting for the door to open. Requiring user input rather than using a timer for

closing the door and shutting down the system once the car has returned allows the

user as much time as they need before closing the door. A timer does not allow time to

stray from a routine, be it for removing groceries from the trunk, talking to a neighbor or

simply enjoying a breath of fresh air.

To improve upon the current design and make it more marketable, several things

could be done.The XBees could be replaced with generic transceivers, and the

Arduinos could be replaced with generic microcontrollers. This would cut the budget in

half, but would also require much more time and effort to program. Also, a garage door

remote could be constructed to save money, and to eliminate unused features on the

board.

REFERENCES

Big Ideas Inc. (n.d.). Magic Closer Installation Video and Operation. Retrieved from

http://www.magiccloser.com/magic­closer/

Innovative Home Systems LLC. (n.d). Remotely Monitor and Close Your Garage Door.

Retrieved from https://garagehawk.com/

Novalert LLC. (n.d.). Superior Garage Door Security. Retrieved from

http://www.novalert.com/

APPENDIX A

Letter of Transmittal

Johnny Gong, Michael Harvey, Andrew Li, Jael Lumba, Lachlan Pedersen Faculty of Applied Science University of British Columbia Vancouver, BC V6T 1Z4 March 27, 2014 Estella Qi Faculty of Applied Science University of British Columbia 290E CHBE Building 2360 East Mall Vancouver BC V6T 1Z3 Dear Estella Qi: Subject: Formal Report Assignment for IGEN 201 In response to your request for a Formal Report as the final assignment for Integrated Technical Communication 201, we have prepared the enclosed report entitled “Automated Garage Door System”. The report presents an investigation of our “Automated Garage Door System” project. We hope that this report will meet with your approval. If you require further information, please contact our team leader at [email protected]. Respectfully submitted,

__________ __________ __________ __________ __________

Johnny Gong Michael Harvey

Andrew Li Jael Lumba Lachlan Pedersen

APPENDIX B

Illustration of Stages of System Operation

Figure B.1: Stages of System Operation

APPENDIX C

Images of Components Fitted Into Their Respective Units

Figure C.1: Car Unit

Figure C.2: Garage Unit