May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control...

32
May0613 - A Cell Phone- Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor [email protected] Client: ECpE Department Arturo Palau – EE [email protected] Chau Nguyen – EE [email protected] u Adam Mohling – CprE [email protected] du Issa Drame – EE [email protected]

Transcript of May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control...

Page 1: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

1

A Cell Phone-Based Remote Home Control System

Advisor: Ahmed E. Kamal, [email protected]

Client: ECpE Department

Arturo Palau – [email protected]

Chau Nguyen – [email protected]

Adam Mohling – [email protected]

Issa Drame – [email protected]

Page 2: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

2

Agenda

Problem statement System overview System components

– Technology considerations– Device operations

Summary and conclusions Questions

Page 3: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

3

Problem Statement

Design a system that allows users, upon authentication, to remotely control and monitor multiple home appliances using a cell phone-based interface.

Page 4: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

4

Thermostat

Fan

Lamp

Project in Action – Entire System

Con

trol

led

Dev

ices

Page 5: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

5

Thermostat

Fan

Lamp

Project in Action – Cellular Phone Communication

Con

trol

led

Dev

ices

Page 6: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

6

Cellular Phone Communication

Technologies Considered

Tone Decoding (DTMF) Features High Compatibility with all cell phone models Limited user interaction More prone to user error (uneditable) Inefficient, time consuming Additional hardware required (convert sound to binary)

Text Messaging (SMS) Features Data transmitted in binary form (ASCII) Message can be edited prior to sending

Page 7: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

7

Cellular Phone Communication

Technology Selected: Text Messaging

Reasons for Selection: Allows user to verify and edit the message before

sending to ensure the command issued is the command requested

Data is transmitted in binary, requires less hardware to manipulate (as opposed to DTMF)

Most commonly used in M2M technology

Page 8: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

8

Cellular Phone Communication

Text Message Implementation

Users will be provided with a list of pre-defined commands that can be stored into the cellular phone

Users will then have to enter or issue the commands from the cellular phone defined by the command list

Example – “command : PASSWORD”

Page 9: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

9

Thermostat

Fan

Lamp

Project in Action – Cellular Module

Text Messages

Con

trol

led

Dev

ices

Page 10: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

10

Model TypeConnection

type Programming Additional features Kit SIM

EE54 Edge

GSM / GPRS

USB 2.0 Low insertion force

system connector

AT commands (GSM07.07 and 07.05)

TCP/IP protocol stack. PPP protocol

Required1.8/3V on board SIM card reader

GM47GSM / GPRS

60 pin board-on-board including

RS232 for AT + 2 general

purpose Serial interfaces

AT +proprietary commands

AT access to TCP/IP stack UDP

Required

3/5V SIM reader with

SIM detection

GM28GSM / GPRS

RS232 DB-9 connection

Control via AT commands

AT access to TCP/IP stack UDP UCS2 16 bit data supported

Not Required

3/5V SIM reader with

SIM detection

Cellular Modules

Page 11: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

11

Module Selected: GM28

Reasons for Selection: RS232 DB9 connector No kit necessary for interface Located coding examples

Cellular Modules

Page 12: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

12

Thermostat

Fan

Lamp

Project in Action - Microcontroller

Text Messages

GM28

Con

trol

led

Dev

ices

Page 13: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

13

Microcontrollers

Starter Kit STK200 Starter Kit STK300 Starter KitFreescale Starter KitMC68HC11E9

8051 Starter Kit Philips XA/RD/66x

MicrocontrollerAT90S8515**(8K bytes Flash)

ATmega128**(128KB Flash; 4KB EEPROM; 4KB SRAM)

MC68HC11E9 (12KB Flash/EPROM; 512B RAM; 512B EEPROM)

XA-G49 (64KB Flash; 2KB RAM)

Cable/Connection ISP and RS232 ISP and RS232; opt. USB PC COM port RS232

Power Consumption 9-15VDC or 7-12VAC 9-15VDC or 7-12VAC 7-18VDC 9-15V AC or DC

I/O 64-pins 66-pins 38 pins 32 pins

Highlights  

Sockets for various microcontrollers

Vcc and Ground for powering external circuitry

3"x1.5" Solderless Breadboard 40-pin DIP

Vcc and Ground for external circuitry Include daughter board 32Kbytes external RAM 44-pin PLCC sockets

Brownout (2.9V or 4.5V level) Brownout (2.9V or 4.5V level)

Buffalo Monitor utility for debug and test program

switches and 10-way Bar LED

Software  

Application Builder STK300 Application Builder AXIDE Application Builder

AVR Studio 3 and 4 AVR ISP (C-complier) free Assembler, C compiler C-compiler Demos

AVREdit and AVRGCC AVR and IAR Studio  WINISP and Flash Magic Programming Tools

Price $66 $85 $99 $94.80

Page 14: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

14

Microcontroller

Microcontroller Selected: STK300 Starter Kit

Reasons for Selection: Allows large-scaled projects (ATmega128) Interchangeable microcontroller design Sufficient number of I/O pins Vcc and Gnd pins can power external circuitry Application Builder, AVR Studio, and programmable

in C Language

Page 15: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

15

Programming Languages Considered

All the software developed for this project will be loaded into the memory of the STK300 microcontroller.

The language must be supported by the STK300’s compiler– The STK300 compiler supports C and Assembly– Java and C++ considered because code can be converted to C

Assembly C++

C Java

Page 16: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

16

Development Languages

Development Language Considered

Assembly Language Features: Low level language (greater device control) Less memory required Not many development resources/libraries available Team out of practice in Assembly language

programming

Page 17: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

17

Development Languages

Development Language Considered

JAVA Language Features: Many GSM programming resources available Object oriented language (modular coding) Large memory requirement Poor response time

Page 18: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

18

Development Languages

Development Language Considered

C++ Language Features: All team members have knowledge of C++ Object oriented language (modular coding) Not many development resources / libraries

available

Page 19: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

19

Development Languages

Development Language Considered

C Language Features: Universally reliable language Many programming resources available

– Serial port libraries– GSM libraries

Example code and project resources online Team will need to identify differences between C and

C++

Page 20: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

20

Development Languages

Development Language Selected: C Programming Language

Reasons for Selection: Vast amount of online resources Ease of development Team members have experience coding C

Page 21: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

21

Software Development Environment

The code for this project will be developed in a more user friendly environment than AVR Studio (provided with the STK300)

Possible Solutions: Eclipse v3.1 MS Visual Studio .NET 2003

Page 22: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

22

Software Development Environment

Eclipse v3.1– Free, but requires some setup for team

MS Visual Studio .NET 2003– Free through MSDNAA (available to all ECE)

Both are similar in their advantages. Since the .c files will be copied into the STK300’s compiler, decision was made to go with Visual Studio .NET

Page 23: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

23

Con

trol

led

Dev

ices

Project in Action – Controlled Devices

Text Messages

GM28

STK300

Thermostat

Fan

Lamp

Page 24: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

24

Controlled Devices

The following devices will be controlled by the microcontroller:

Fan Light Digital thermostat

Page 25: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

25

Controlled Devices - Fan

Page 26: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

26

120VAC

STK300 port B, bit 0

Power from outlet

Manual/Remote select

STK300 port B bit 1

Light Switch

Control relay

Controlled Devices - Light

Page 27: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

27

Controlled Device Status Detection

Page 28: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

28

Controlled Device - Digital Thermostat

Page 29: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

29

Summary

ExperiencesTechnical Experiences:

– GSM modules– Microcontroller – Control circuits synthesis

Personal Experiences:– Time management– Communication– Accountability

Page 30: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

30

Conclusions

Lessons Learned Functioning in a team environment Should follow assignment criteria closely Amount of detailed documents goes in a

professional project

Page 31: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

31

Special thanks to Sony Ericsson for providing the team’s GM28 cellular module

Special thanks to Prof Kamal for his continued support to the team

Acknowledgements

Page 32: May0613 - A Cell Phone-Based Remote Home Control System 1 A Cell Phone-Based Remote Home Control System Advisor: Ahmed E. Kamal, Professor kamal@iastate.edu.

May0613 - A Cell Phone-Based Remote Home Control System

32

Questions?

Text Messages

GM28

STK300

Any device with an electrical interface

Con

trol

led

Dev

ices

Thermostat

Fan

Lamp