Home
Universal Home Automation Controller - Introduction
Contents
1. e Development of a Dynamic Link Library DLL as a wrapper to access the communication routines which control the analogue and digital inputs and outputs of the USB interface board e Control application design and development as the middle tier between the wrapper DLL and the user interface web application e Creation of a user interface web application as the top tier of the system architecture providing access to the users to the features supported by the control application e Integration of addition features like live video stream and motion detection using camera s installed within the house and speech announcements and notification when certain events occur e Testing optimization and enhancement of the system SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 2 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 1 4 Feasibility A feasibility study was carried out at the beginning of this project and the following is a brief analysis of it under five interrelated types 1 4 1 Technical From a technical point of view this project was highly feasible because the technical resources required for the development of this project were already available from the university which includes integrated development environment IDE such as Microsoft Visual Studio 2005 2008 USB interface board VM110 and a USB web camera Lack of prior ex
2. for int i 1 i lt 3 i analogOutput i 255 Digital Output methods 14 WriteAllDigital Declaration Syntax public static extern void WriteAllDigital int Data SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 24 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 15 16 Input Parameter Data Value between 0 and 255 or hexadecimal equivalents that is sent to the digital output port all 8 channels Return Result none Description The channels of the digital output port are updated with the status of the corresponding bits in the data parameter A high 1 level means that the microcontroller IC1 output is set and a low 0 level means that the output is cleared see Appendix E Implementation public void changeAllDigitalOuts int newDigitalOuts DeviceLibrary WriteAllDigital newDigitalOuts ClearDigitalChannel Declaration Syntax public static extern void ClearDigitalChannel int Channel Input Parameters Channel Value between 1 and 8 which corresponds to the output channel that is to be cleared switched OFF Return Result none Description The selected digital out channel is cleared i e switched off Implementation private bool digitalOutput new bool 9 public void setDigitalOut int digitalOutputNumber DeviceLibrary SetDigitalChannel digitalOutputNumber di
3. School of Electronic Communication and Electrical Engineering BSc Final Year Project Report APPENDICES Appendix A Ghantt Chart Task Name Duration Start Finish 1 Project Registration 1 de Thu 27 09 07 Thu 27 09 07 aa Project Title and Supervisor Allocated 1day Tue OSNOM Tue 0910 07 3 First Meeting with Project Supervisor 1day Wed 10007 Wed 104007 4 Initial Research and Feasibility Study 19 days Wed10NO00 F Sun 0411 07 sal Logbook and Draft Report VVriteup 114 days Wed 1040 07 Fri 14 03 08 6 Feasibility Study Report Preparation 5days Mon 054107 Suni141 07 PS es Development and testing of drivers 30 days Mon 1241 07 Sun 234207 8 Project Seminars Sdays Mon 102 07 Fri 1442 07 9 Code generation and testing of the control application 20 days Mon 244207 Sun 20 01 08 10 Design develop and test the web user application 30 days Mon 2140108 Sun 02 03 08 11 Final testing and enhancements to the system 5 days Mon 03 03 08 Sun 09 03 08 12 Project demonstration to supervisor 5 days Mon 10 03 08 Fri14 03 08 13 Prepare Final Report Poster and CD 21 days Mon 10 03 08 Sun 06 04 08 14 Project Submission 1 day Mon 07 04 08 Mon 07 04 08 15 Poster Presentation 5days Mon 28 04 08 Fri 02 05 08 Gantt chart Part showing the estimated start and finish dates of tasks Task Name __ Oct o Nov 0 Dec 07 Jan 08 Feb Op Ma
4. automation systems and the USB interface board VM110 is provided together with the aim and objectives of this project It also includes the highlights from the initial feasibility study for this project and an insight to the contents of this report e Chapter 2 Background Research The next chapter in this report is a detailed description and analysis of the research conducted to understand the need of home automation systems and the user requirements for everyday use of such systems in their residences e Chapter 3 Design In this chapter a set of solutions are suggested to develop a complete application to implement a Universal Home Automation Controller and then the most suitable approach is selected for the development of this project after analyzing various aspects related to each of these solutions e Chapter 4 Development The complete development process of this project is described in this chapter with prominence to the methodology used achievements and downfalls during this phase of the project e Chapter 5 Testing This chapter is a synopsis of the types testing carried out to confirm that developed system was working as required under a range of operational conditions and the debugging done to overcome the difficulties noticed SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 4 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project
5. int newDebounceTime DeviceLibrary SetCounterDebounceTime counterNumber newDebounceTime counterDT counterNumber newDebounceTime SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 30 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 5 Testing The purpose of testing a system is to verify that the all the functionalities and features of the system are working and to the required results are obtained There are mainly two types of testing techniques which are mentioned as following e White Box Testing and e Back Box Testing 5 1 White Box Testing The white box testing of the system was carried out which implies that the data and control flow output were found to be working properly 5 2 Black Box Testing The black box testing of the system was also done and the overall functionality was found to working properly 5 3 Evaluation While evaluation the overall system it was note that the system had some minor drawbacks and limitation which could not be rectified due to time constraints SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 31 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 6 Conclusion In this chapter a conclusion to the project and this report is provided After finishing all the stages of the project it can be concluded t
6. 3 public int readCounter int counterNumber counter counterNumber DeviceLibrary ReadCounter counterNumber return counter counterNumber SetCounterDebounceTime Declaration Syntax public static extern void SetCounterDebounceTime int CounterNumber int DebounceTime Input Parameters CounterNumber Integer value 1 or 2 which corresponds to the counter whose debounce time has to be set DebounceTime Debounce time for the pulse counter as an integer value The DebounceTime value corresponds to the debounce time in milliseconds ms to be set for the pulse counter The value of debounce time may vary between 0 and 5000 Return Result none SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 29 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report Description The counter inputs are debounced in the software to prevent false triggering when mechanical switches or relay inputs are used The debounce time is equal for both falling and rising edges The default debounce time is 2ms This means the counter input must be stable for at least 2ms counts before it is recognised giving the maximum count rate of about 200 counts per second If the debounce time is set to 0 then the maximum counting rate is about 2000 counts per second Implementation private int counterDT new int 3 public void setCounterDebounceTime int counterNumber
7. A high 1 means that the channel is ON and a low 0 means that the channel is OFF Description This method returns the status of all the 5 digital inputs together Implementation public int readAllDigitallns return DeviceLibrary ReadAllDigital ResetCounter Declaration Syntax public static extern void ResetCounter int CounterNumber Input Parameter CounterNumber Value 1 or 2 which corresponds to the counter to be reset Return Result none Description The selected pulse counter 1 or 2 is reset Implementation private int counter new int 3 public void resetCounter int counterNumber DeviceLibrary ResetCounter counterNumber SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 28 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 22 23 counter counterNumber 0 ReadCounter Declaration Syntax public static extern int ReadCounter int CounterNumber Input Parameter CounterNumber Value 1 or 2 which corresponds to the counter to be read Return Result int The content of the 16 bit pulse counter Description This method returns the status of the selected 16 bit pulse counter 1 or 2 The counter number 1 counts the pulses fed to the digital input 11 and the counter number 2 counts the pulses fed to the digital input 12 Implementation private int counter new int
8. Electronic Communication and Electrical Engineering BSc Final Year Project Report 4 Development This chapter of the report describes the implementation of the main methods in the control application which are an enhancement to the communication routines provided by the DLL wrapper General methods 1 OpenDevice Declaration Syntax public static extern int OpenDevice int CardAddress Input Parameter CardAddress Value between 0 and 3 which corresponds to the jumper SK5 SK6 setting on the K8055 board as shown in Table 1 0 below SK5 SK6 Card Address ON ON 0 OFF ON 1 ON OFF 2 OFF OFF 3 Table 1 Jumper SK5 SK6 Settings Return Result int If succeeded the return value will be the card address read of the connected K8055 device as an integer value between 0 and 3 Return value 1 indicates that a K8055 card with the corresponding card address was not found Description This method opens the communication link to the K8055 card Loads the drivers needed to communicate via the USB port This method should be called before any attempts to communicate with the K8055 card As an alternate to the SetCurrentDevice method this method can also be used to select the active K8055 card between O and 3 to read and write the data All the communication calls after this method is invoked are addressed to the selected card until another card is selected by using this method again or
9. e Controllers Also known as Programmable Logic Controllers PLCs is a digital computer used for automation of processes tasks and is designed for multiple digital and analogue input and output arrangements extended temperatures ranges protection from electrical noise and resistance to vibration and impact Such controllers are real time systems as output results must be performed in response to input events within a restricted time otherwise the system s reliability is at risk e Sensors It is a device which measures a physical magnitude and converts it into a signal usually electrical which can be read by another device Sensors can be of many types such as thermal electromagnetic mechanical chemical optical acoustic etc For example a thermal sensor can be used as temperature sensor to measure the temperature of the environment around it and convert the result into a digital signal e Actuators An actuator is a mechanical device for moving or controlling a mechanism or system For example an electric motor which converts electricity into mechanical motion can be used to automatically open and close the window shades SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 8 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 2 1 4 Architecture The design architecture of a home automation system depends mainly on the specific user r
10. easy to navigate simple to use graphical interface 2 2 1 Questionnaire and Interviews In order to understand the needs of the prospective users of home automation systems it was important to perform a survey which would provide a clear perceptive to the design requirements for the user interface of this system A template for this questionnaire was designed with some objective questions concerned with the layout navigation privacy and security issues within a domestic environment for a typical user see Appendix C Every candidate was interviewed for about five minutes to understand their views on and expectations from home automation systems which would be ideal for absorption in the digital lifestyle they live Based on the results obtained after the analyses of SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 9 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report this questionnaire and interviews see Appendix C the following were the suggestions for an ideal home automation system and its user interface e The navigation and layout of the interface should be very simple and easy to understand for new user to the system e The design of the web interface should be clear clutter free and very responsive providing all the information on one main page only e The current status of all the appliances in the house should be updated at
11. garagefan off 1 A EE I Creadingin bed 11 1 Mos EA hallway light 70 l i l po mn l kitchen overhead 29 1 going to sleep I l e I 1 ge 1 closet 4 L I livingarea 100 de awake yi a fis aster bedroom lamp 100 l A E EEN d master bedroom fan off 1 PSA ee 1l Gel a I 2 f iTunes Volume i f I L e office lamp 100 1 50 d L SR hal gt l 100 I wi i D Di Vi office light 100 I 1 I 1 1 I I I 1 1 1 I e master closet 100 I I I I I I I I I I I I I I I aa IK vu Lex living area sprinkler controller Y ep backyard l As J D i Keess Tun BEE E y yl stop resume e T 000008 Figure 2 Web Interface of Indigo Home Automation System The key features of the web interface of this system are marked from 1 to 5 in the figure above and explained as following 1 Current Mode used to turn all appliances on off or switch them to specific mode depending on the pre defined system states Music player controls to set the volume and change tracks using the selected player Visual floor plan A touch sensitive floor plan with a view of all the appliances in the house and these can be controlled by clicking on them and the respective appliance image changes to display its current status on off 4 Text based menu List of all the appliances in the house and their current status which can be changed by clicking on them 5 Navigation links These links can be used to view the
12. least once a minute and immediately for time critical services such alarms etc e Live video stream from a camera s installed in the house would be an ideal feature but access video output from some camera s should be restricted to specific members of the family only e Software based motion detection using output from specific cameras within the house was acceptable but sensor based motion detection was also equally preferred e Speech announcements was an acceptable option but only if this feature can be turned on or off depending on the user profile settings or completely for the whole system e Presence detection by tracking individual members mobile phone was not acceptable by the some candidates as they leave their mobile at home sometime when going out e Receiving security alerts from the system via text message service on mobile phones was an acceptable feature but the reliability of this service was a concern e t was acceptable to record the events occurring within the automated house and the communication between the appliances and the home automation controller in a database and log files could be archived for later references e H was a general opinion that the system would work ideally if a manual override for each feature was available in case of any system breakdown or maintenance e Cost of the complete system including installation and integration within the existing environment was a concern and a
13. of prospective users and case study of an existing system Finally technical backdrop of the interface board VM110 used in this project to simulate a digital home setting is also studied to design and develop the most suitable home automation controller using it SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 13 University of Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 3 System Design The most important factor to consider when designing a home automation controller is intrinsic reliability Another important issue is the speed with which the controller can deal with the requests from the user as well as the appliances A system that has a task specific integration of components and or sub components will help ensure that intrinsic reliability communication speed and compatibility with third party devices and add ons is maintained 3 1 System Structure The system structure plays a significant role in easy integration of its components with each other Thus based on the findings from the background research for this subject it would be most appropriate to implement a three tier component based centralized home automation architecture using custom developed open standards for communication with the VM110 USB interface board User _ Web Interface The user changes settings using the Rm web Interface which is passed to the control app
14. other supported functions SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 11 University of Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 2 3 Interface Board The only project specific hardware component used during the design and development of this project is a USB experimental interface board VM110 which has been discussed briefly earlier in the introduction of this report In this section the design features and functionality of this interface board will be described in detail with regards to its usage in this project The design of the VM110 is very simple as shown in Figure 3 below being an experimental interface board the board comprises of five digital input channels and eight digital output channels In addition to these there are two analogue inputs and two analogue outputs with eight bit resolution A maximum of four such boards can be connected to one system if the number of analogue or digital inputs or outputs need to be increased Two analogue inputs for temperature sensor potentiometer etc Analogue outputs Five digital inputs for push button switch relay contact etc Digital outputs Figure 3 USB Interface Board VM110 Inputs and Outputs The board is connected to the computer system using a USB Universal Serial Bus port marked as SK7 on the board which is common to find in most modern computers The communication
15. routines for reading and writing information to the board are provided by the manufacturer in a DLL file LEDs display analogue and digital output status USB connection to computer Two potentiometers to control internal voltage Jumpers to set the address of analogue inputs of the board Power LED Jumpers used to set external or internal voltage using potentiometers usage for analogue inputs Potertiomater 5 3 variable tapped resistorthat can be used as a vokage divider Figure 4 USB Interface Board VM110 Components Five push buttons for the digital inputs SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 12 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report The components of the interface board are shown in Figure 4 on the previous page which include a set of eight LEDs labelled LD1 to LD8 represent the status of the digital outputs that can either be ON 1 or OFF 0 at a given time simulate lights and alarms in this project The next set of two LEDs labelled LD9 and LD10 are the analogue outputs which imitate to be climate controls of the house heating and boiler system as the analogue output value changes between 0 and 255 Five push buttons on the other side on the interface board labelled Inp1 to Inp5 are a set of digital inputs used as manual control switched in the house The two potentiometers a tapped resistor
16. system with minimal overheads was preferred SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 10 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 2 2 2 Case Study A case study was carried out while the background research for this project was in progress and before the actual design and development phase was started It was an advantageous step to review a current system and then decide the best suitable methodologies and technologies to use in this project A home automation and control server named INDIGO developed by Perceptive Automation a US based company This system is built for the Macintosh OS X operating system environment and works with the INSTEON or X10 compatible devices Indigo s built in web server and client server architecture provides control and access to the control interface remotely from other Macs PCs internet tablets PDAs and mobile phones using internet as the communication channel office fan off spa heater on 1 j iTunes Track d we Rm I I I 1 1 I 1 l X Amount Of Words u master bedroom office 1 l connected to Indigo Sever i mo ee Qo A IITR z P e ll T T 114 aauariumnood of I A A H H LI H Current Mode i rm O ei H i back porch lights 100 e awake l X Y back porch spa heater T front porch lights 100 I allightson JI garage pr eee ZE i T H I
17. that can be used as a voltage divider marked as ATT1 and ATT2 can be used as the analogue inputs in absence of actual sensors to reproduce the output generated by a thermostat or a manual rotary temperature setter in houses Other components include a set of jumpers SK5 and SK6 to set the address of the board 0 to 3 using all possible open or close combinations of the two Two other single jumpers marked SK2 and SK3 are used to control the key in for two analogue inputs respectively from either the two potentiometers ATT1 and ATT2 when SK2 and SK3 are closed or directly from the two analogue input ports marked A1 and A2 on the board when SK2 and SK3 are in open state Lastly the power LED marked as LD11 lights up whenever the board is connected to the system and is in ON state 2 4 Chapter Summary This chapter sets the background for the upcoming chapters by providing an insight into the research and investigation carried out before the design and development phase of the project were started It includes a brief history of home automation systems the need for them various standards bridges and elements used of implementing home automation systems The three different types of home automation architectures are also discussed to provide an approach for the most suitable one to use in this project An analysis of the user requirements from a home automation system is also created by the method of questionnaires interview
18. BACHELOR OF SCIENCE DEGREE WITH HONOURS IN COMPUTER AND NETWORK TECHNOLOGY Final Year Project Report School of Electronic Communication and Electrical Engineering University of Hertfordshire UNIVERSAL HOME AUTOMATION CONTROLLER Report by SAMARTH GUPTA Supervisor Prof TALIB ALUKAIDEY Date APRIL 2008 DECLARATION STATEMENT certify that the work submitted is my own and that any material derived or quoted from the published or unpublished work of other persons has been duly acknowledged ref UPR AS C 6 1 Appendix Section 2 Section on cheating and plagiarism Student Full Name SAMARTH GUPTA Student Registration Number 04085055 A Date 11 April 2008 University of Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report ABSTRACT Home automation is a rapidly growing technology and the need for enhancement of such systems is always there to shape the new digital lifestyle we live in The report explains the various stages of work carried out to create a universal home automation controller using the VM110 USB interface board This report contains an introduction to the project home automation system and its components the technologies available to implement such systems the design and development process for the project A final evaluation of the developed system is done providing the limitations of the system it advantages disadvantages and th
19. CH cisse terni enian Eran EERE da EEEE ES AE 6 2 1 Home Automation SySteMS ooomcocccnnnccccnnonccnonnnnccnonnnnncnonnnnccnnnnnnn ene nnnn cero nadan ener NaN 6 2 1 1 A EN 6 2 1 2 Standards and BridQe s 0 cc ecceeeeseceeeeeseeceeessdeceeeeteceuereseceeeeedeccunenssceseeredendueetiae 7 2 1 3 Elements srie a diia 8 2 1 4 Lied 9 22 User REQUIFGIM GINS E 9 2 2 1 Questionnaire and Interviews nn nn nnnnnnannnnns 9 2 2 2 Case MU UE 11 2 3 Interface BOSA codicia it ded ae Niante ade ee Aa 12 2 4 Chapter SUMMANY EE 13 3 System Re EE 14 3 1 oys em TEE eeh eet AA A Ee 14 3 2 System eene CN 15 3 2 1 Re Mee ER 15 3 2 2 elle Eelere ET 15 3 2 3 Web AppliGation eiii ti aii A 16 3 3 Chapter SUMMA srai a a a a 16 A Development 17 SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER iii University of Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report O MOS WEE 31 5 1 White Box Testing oooooonoccccnnnoccccnnnocccccnnonccccnnoncn nono nn nc nano rn 31 5 2 Black Box Testmg conc tnnt nn rn nn nr r cnn rra 31 DiS EVALUATION Neige i dt a 31 O GONCIUSION EE 32 ISS SS 32 REFERENCE Suicida idad 33 BIBLIOGRAP RIY siinon a E 34 APPENDICE Sui 35 SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER iv University of Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report LIST OF FIGURES Figure 1 Universal
20. Home Automation Control 1 Figure 2 Web Interface of Indigo Home Automation Gvstem 11 Figure 3 USB Interface Board VM110 Inputs and Outputs 20 0 0 eee ee eeteeeeeeeteeeeetnteeeeeeee 12 Figure 4 USB Interface Board VM110 Component occccccococccccononcccnononcnnnononcnnnnnnnccnnnnnncccnnnns 12 Figure 5 Block diagram of the system siruchure ce eceeece cence ee eene eter teaser taeeeeetaeeeeetieeeeeeea 14 SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER vV University of Hertfordshire School of Electronic Communication and Electrical Engineering GLOSSARY AC Alternating Current ASP Active Server Pages BSR British Sound Reproduction CCTV Closed Circuit Television CEBUS Consumer Electronics Bus DLL Dynamic Link Library EIA Electronic Industries Association HVAC Heating Ventilating and Air Conditioning RF Radio Frequency PLC Power Line Control UPB Universal Powerline Bus UniHAC Universal Home Automation Controller UPnP Universal Plug and Play SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER BSc Final Year Project Report vi Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 1 INTRODUCTION Home automation is a rapidly progressing and maturing modern technology which will soon be an essential part of our digital lifestyle be it for security convenience energy saving or other reasons 1 1 Overview The pu
21. PA20 M1 5 The Complete Book of Electronic Security http books google co uk books id JTEuCu7YnKACg8pg PA1258lpg PA1258dg Standards forthome automation amp source web amp ots PHylYujR1s amp sig kQOzu1iLAr5Ru2 KwONfcOY n9c amp hl en PPA126 M1 6 HiddenWires home automation and control systems articles and whitepapers http hiddenwires co uk resources articlesautomation html 7 What is Home Automation http home automation cugr com 8 k8055 GM http www boristheengineer co uk gamemaker gm_k8055 htm 9 Velleman Inc http www vellemanusa com us enu product view id 522053 10 User Manual VM110 UK Rev2 http www vellemanusa com us enu product view id 522053 SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 33 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report BIBLIOGRAPHY 1 Paul Kimmel Advanced CH Programming 2 Herbert Schildt The Complete Reference C 2 0 3 Ben Albahari Peter Drayton Brad Merrill C Essentials 2 Edition 4 Anders Hejsberg and Scott Wiltamuth C Language Reference 5 Jeff Ferguson Brian Patterson Jason Beres Pierre Boutquin and Meeta Gupta C Bible 6 Microsoft C Programming for the Absolute Beginner 7 John Paul Mueller Visual CF NET Developer s Handbook SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 34 Universityof Hertfordshire
22. Report e Chapter 6 Conclusion Finally in this last chapter a concise summary of the complete project and this report is provided with reference of the initial aim and objectives of this project Any future developments to this project and its commercial viability are also included here 1 6 Chapter Summary This chapter introduced the concept of home automation in relationship with this project its aim and objectives It also includes a review of the key aspects determining the feasibility of this project which was carried out at the beginning of the project and an insight into the contents of the remaining chapters of this report SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 5 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 2 BACKGROUND RESEARCH The essence of any home automation system is to provide innovative and effective ways for controlling and monitoring appliances within intelligent homes This chapter is based on the research and investigation conducted about the history of home automation systems existing standards and controllers used for home automation the user requirements from such systems and the available technologies to fulfil them In doing so comparisons were made and the most suitable approaches were chosen for the design and development this project 2 1 Home Automation Systems Home automation is a branch of build
23. The technical and functional details of this interface board with reference to its requirement and usage in this project have been discussed throughout the report SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 1 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report Further in this chapter the aim objectives and initial feasibility aspects of the project are discussed together with a brief about the feasibility aspects considered at the beginning of the project to achieve its objectives and lastly the structure of the report with an overview on the organization and contents of each chapter included in this report 1 2 Aim The aim of this project was to design and develop a software system to control and manage lighting climate and security features within a typical domestic environment using the VM110 interface board and provide access to these features via graphical user interface that can be accessed via networked devices within the home as well as remotely using a standard web browser 1 3 Objectives To achieve the aim set for this project the following objectives were pursued for successful completion the project e The design of a three tier software system that integrates with the USB interface board provided as the platform for simulating the basic features in an automated home environment and provides all the necessary functionalities
24. a call to SetCurrentDevice method SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 17 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report Implementation private int cardConnected public int openDevice cardConnected DeviceLibrary OpenDevice cardAddress return cardConnected CloseDevice Declaration Syntax public static extern void CloseDevice Input Parameter none Return Result none Description A call to this method unloads the communication routines for the K8055 card and unloads the driver needed to communicate via the USB port This should usually be the last action performed by the application program before system termination Implementation public void closeDevice DeviceLibrary CloseDevice Version Declaration Syntax public static extern void Version Input Parameter none Return Result none Description This method can be used to query the current version of the DLL being used On calling this method a message box is displayed with the relevant information SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 18 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report Implementation public void version DeviceLibrary Version 4 SearchDevices Declaration Syntax public static extern int S
25. communication library file known as Dynamic Link Library DLL file that contains the communication routines for controlling the VM110 K8055 interface board Such driver DLL files are developed in low level programming languages such as C C and are also called unmanaged libraries Generally a DLL wrapper class program is written in higher level programming language like Java C Visual Basic etc which interacts with the communication routines in the driver unmanaged DLL file and the DLL wrappers can be converted into class libraries generating a DLL file which are referred to as managed DLL 3 2 2 Control Application The control application or the controller is the backbone of the home automation system which acts as the transparent link between the user interface and the interface device connecting the household appliances and other system enhancements A high level programming language such as Java C Visual Basic Perl et al can be used to develop such middleware applications The controller uses a database if system settings user information and device states need to be stored for control and logging purposes SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 15 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 3 2 3 Web Application The web application is the user interface front end generator to provide human interaction wit
26. e future developments possible with this project SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER i University of Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report ACKNOWLEDGEMENTS would like to thank everyone who have supported me through the entire duration of this project would like thank by family friends for their support and their advice am grateful to my project supervisor Prof Talib Alukaidey for helping me throughout the duration of this project and providing his guidance at all times SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER ii University of Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report TABLE OF CONTENTS DECLARATION KK MR le HEET i ABSTRAC ico id alidedeasadaancs vaancdshwand seanadeuedia vaxasuanvanaccebweannreanads i Liege Ree TE MK ii TABLE OF CONTENTS TT iii LIS T eegal TTT v GLOSSARY EE vi 1 INTRODUCTION ttr En Enare EEEE ERES RR nn EEEE ERES EEEE EEEn En nEn EEEn 1 1 1 Overvleuw 1 TA o o ta A E AEEA E 2 1 3 ObjectiVOS ooonoccconnccccconancconona nc 2 1 4 RE EE 3 1 4 1 TOCNNICAL 00 A ida 3 1 4 2 Economical moesies againna ants e aaa AA ARa ASE aaia EAA EATER 3 1 4 3 A a a EEN a a a a aa aa aana aaa aai 3 1 4 4 le Le NU 3 1 4 5 LOG UE 4 1 5 Report Structuren apaa apaa in 4 1 6 Chapter SUMMI Y eios ena Mest EPA aE E at nd 5 2 BACKGROUND RESEAR
27. earchDevices Input Parameter none Return Result int If succeeded the return a four bit value indicating which boards are present Description Implementation private int cardsConnected public int searchDevices cardsConnected DeviceLibrary SearchDevices return cardsConnected 5 SetCurrentDevice Declaration Syntax public static extern int SetCurrentDevice int CardAddress Input Parameter CardAddress Value between 0 and 3 which corresponds to the jumper SK5 SK6 setting on the K8055 board which needs to be set as the current active device for communication Return Result int If succeeded the return value will be the card address read of the connected K8055 device as an integer value between 0 and 3 Return value 1 indicates that a K8055 card with the corresponding card address was not found SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 19 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report Description This method should be preferably used to select an active K8055 card between 0 and 3 to read and write the data All the communication calls after this method is invoked are addressed to the selected card until another card is selected by using this method again or a call to OpenDevice method Implementation private int currentCard public int setCurrentDevice currentCard DeviceLibrary Se
28. equirements and installation the environment The intelligence of a home automation system resides in the type of architecture implemented which can be any one of the following three e Centralized Architecture This type of architecture supports a centralized controller which receives information from multiple sensors inputs and the user and once processed generates the appropriate instructions for the actuators outputs e Distributed Architecture The system intelligence is disseminated among all the components of the system that are the controllers sensors or actuators This is typical of the systems of wiring in bus e Mixed Architecture Such systems comprise of features from both the above mentioned types of architecture and they have several small devices mini controllers that are able to obtain and process information of multiple sensors and then transmit them to the rest of the devices spread throughout the house 2 2 User Requirements Expectations of home automation capabilities are changing but nothing is more important than the human interface be it in the form of a remote touch panel wall controller or web interface It can make or break a system s reputation The home automation systems therefore face a challenge to provide more sophisticated operation through a robust and user friendly interface The end users demands are changing and they need a reliable cost effective home automation system with an
29. face and then into X10 s long lived CP 290 unit which was replaced by the ActiveHome controller in late 1990s Many official and shareware software were developed for the CP 290 which could be used with Apple Ils Macs DOS and Windows Over the years many other standards for home automation have been developed but this technology usually attracts either computer experts or the wealthy owing to diverse reasons SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 6 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 2 1 2 Standards and Bridges Home automation systems are built to support specific standards protocols for the purpose of communicating with and controlling appliances within the home The choice of standard depends on the type of system and appliances being used the transmission medium speed and distance required regional location of system installation and many other factors The type of standard being used also affects the system cost reliability and expansion options Home automation standards are divided into two main categories as following e Common Standards These standards allow for control of most applications within a domestic environment and can be implemented in a system comprising of controllers and applications that support the specific standard Some common standards are discussed below o X10 This standard is used b
30. gitalOutput digitalOutputNumber true ClearAllDigital Declaration Syntax public static extern void ClearAllDigital SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 25 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 17 18 Input Parameter none Return Result none Description All digital outputs are cleared i e switched off Implementation private bool digitalOutput new bool 9 public void clearAllDigitalOuts DeviceLibrary ClearAllDigital for int i 1 i lt 9 i digitalOutput i false SetDigitalChannel Declaration Syntax public static extern void SetDigitalChannel int Channel Input Parameter Channel Value between 1 and 8 which corresponds to the output channel that is to be set Return Result none Description The selected digital output channel is set i e switched ON Implementation private bool digitalOutput new bool 9 public void setDigitalOut int digitalOutputNumber DeviceLibrary SetDigitalChannel digitalOutputNumber digitalOutput digitalOutputNumber true SetAllDigital Declaration Syntax SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 26 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report public static extern void SetAllDigital Input Parame
31. h the control application controller over the web or in a networked home A web application is not a static web site it is a program that runs on a web server and processes information to generates dynamic web pages or websites which are loaded on the client terminal and communicate to the program on the remote web server using web services supported by the web application that provide real time dynamic exchange and updating of information at both ends client and server Web user interface layouts see Appendix D were created initially to support various devices of different form factors extracting the results from the user requirements analysis performed earlier for this project see Appendix C 3 3 Chapter Summary The system design concepts for a home automation controller have been discussed in this chapter System design being an important phase during the development of this project the system structure and components have been chosen carefully to enable easy development and integration of each of component with the other which are the device driver library the control application the controller and the web application user interface The control application being the middle layer is bound by the device driver DLL wrapper at the base level and the web application user interface as the top level access layer SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 16 Universityof Hertfordshire School of
32. hat the overall project was a success and the aim and all the objectives of the project were completed 6 1 Future Developments The possible future developments for this project can as following e Presence detection of members using Bluetooth enabled device such as mobile phones within the premises of the house e Integration of home entertainment solutions such as media players televisions and such other devices e Alert notification by means of email text message and automated calls to users e Use of multiple cameras installed within the house for surveillance and motion detection e User profile management to enable automatic event occurrences in presence of different members SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 32 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report REFERENCES 1 Home Automation Research Issues http www mot chalmers se dept tso haddon EMTELHA pdf 2 Perceptive Automation http www perceptiveautomation com phpBB2 viewtopic php t 1477 http goprism com 8000 controlpage name 1st_floor 3 A Timeline for Home Automation http www eddriscoll com timeline htm 4 Easy X10 Projects for Creating a Smart Home http books google co uk books id lwzUuahW4c0C amp pg PA19 amp lpg PA19 amp dq the BSR S stem X10 amp source web amp ots qlgasmBIAHs amp sig 8dEWoH9BUr 8cO 1 af QHDvigGkc amp hl en P
33. ing automation specializing in the specific automation requirements for domestic environment and thus it also sometimes known as domotics derived from the words domus Latin for house and robotics automation 2 1 1 History The timeline for home automation starts from the mid 1970s when a group of engineers who owned a company called Pico Electronics based in Glenrothes Scotland developed an automatic record changer called Accutrac in partnership with BSR British Sound Reproduction which was controlled by a remote control that used ultrasonic signals The features of Accutrac inspired the company s next project using remote control for appliances and lights This concept used AC Alternating Current wiring for transmitting signals to control lights and appliances and they named this project as X10 because it was the tenth project that they had worked on After refining this new technology for few years X10 products began to appear in stores Pico Electronics in partnership with BSR formed X10 Ltd and the BSR System X10 was born This system consisted of 16 channel command console a lamp module and an appliance module Later additions to the system included a wall switch module and the first X10 timer giving it a new name X10 Powerhouse System In early 1980s X10 s first official computer interface was developed for the Mattel s short lived Aquarius computer which was later morphed into the Radio Shack Colour computer inter
34. ion and Electrical Engineering BSc Final Year Project Report Appendix D Login Page of the web user application UniHAC Sam s House Main Menu Homepage UniHAC SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 37 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report Controls for the eight Digital Outputs on the VM110 USB Interface Board UniHAC KN KN KN KO L3 l i D g Ly l tw l Controls for the two Analogue Outputs on the VM110 USB Interface Board UniHAC SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 38 University o cow IM School of Electronic Communication and Electrical Engineering BSc Final Year Project Report Security Controls Motion Detection and Smoke Alarms etc Settings page to change personal details and preferences add new members etc SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 39 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report Appendix E Logic Gates to change one digital output value Digital Ouput Data to Switch a single output ON New_Status BIN Current_ Status OR BIN 2 pow outputNumber 1 BIN Current_ Status BIN 2 pow outputNumber 1 New_Status Logic Gate to obtain digital output data to switch ON a single output Digital Ouput Data t
35. lication via the web Accessed by the user application for execution and the user from local gets action confirmation spontaneosly 8 VM110 USB a mn p Interface Board Driver Library The control File application connects to the drivers to send commands and reads This acts as the link between the e They act as the link between the H device and the z i interface board f user web back for confirmation and the OS i interface D D D D D The drivers send low level signals to the micro controller of the interface board to read or write current input or output Statuses o VM110 USB Interface Board Figure 5 Block diagram of the system structure SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 14 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report As mentioned earlier and shown in Figure 5 on the previous page the system can be divided into three components which are as following e Device Interface Board Driver Communication Routine Library e Control Application or the Controller and e Web Application generating the Web User Interface 3 2 System Components This section describes the design methodology and technologies present to develop and integrate each of the three main components of system and their individual sub components 3 2 1 Device Driver The device driver for the USB interface board is the base
36. nd Data2 Value between 0 and 255 which is to be sent to the 8 bit Digital to Analogue Converter Return Result none Description Both the 8 bit Digital to Analogue Converter channels are altered according to the new data provided This means that the data corresponds to a specific voltage as discussed for the method above Implementation private int analogOutput new int 3 public void changeAllAnalogOuts int newAnalogOut1 int newAnalogOut2 DeviceLibrary OutputAllAnalog newAnalogOut1 newAnalogOut2 analogOutput 1 newAnalogOut1 analogOutput 2 newAnalogOut2 ClearAnalogChannel Declaration Syntax public static extern void ClearAnalogChannel int Channel Input Parameter Channel Value between 1 and 2 which corresponds to the 8 bit DA channel number in which the data is to be erased or set to 0 SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 22 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 11 12 Return Result none Description The selected DA channel is set to the minimum output voltage 0 Volt Implementation private int analogOutput new int 3 public void clearAnalogOut int analogOutputNumber DeviceLibrary ClearAnalogChannel analogOutputNumber analogOutput analogOutputNumber 0 ClearAllAnalog Declaration Syntax public static extern void ClearAllAnalog Input Paramete
37. o Switch a single output OFF New Status BIN CurrentStatus AND BIN 255 2 pow outputNumber 1 N BIN Current_ Status H New_Status BIN 255 2 pow outputNumber 1 a a Logic Gate to obtain digital output data to switch OFF a single output SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 40
38. perience and knowledge of the development platform used would have been a limitation but my previous experience in similar programming languages technologies was a motivation use the Microsoft NET platform for the development of this project 1 4 2 Economical The maximum available budget for this project was 50 fifty pounds only which was more than sufficient as the only cost that would be incurred was to purchase the USB interface board VM110 but it was issued on loan from the university s final year project s lab store for the duration of this project For information only the approximate market value of this interface board is 30 only All the other hardware and software requirements were already available in the university for by all the students studying in the faculty of engineering and information sciences at no cost 1 4 3 Schedule To manage the workflow of the project efficiently and for its successful on time completion certain milestones were set at the beginning of the project with predefined timescales for the design development testing and documentation of all the stages involved during the lifecycle of this project Based on this provisional project plan a Gantt chart was produced initially see Appendix A to outline the sequence and approximate duration of each project stage 1 4 4 Operational Evaluation of the operational feasibility of this project was a key factor in deciding the methodologies used in de
39. r 08 Apr 08 May 08 24 01 08 15 22 29 05 12 19 26 J03 10 17 24 31 07 14 21 28 04 11 18 25 03 10 17 24 31 J07 14 21 28 05 12 1 Project Registration 4 27 09 2 Project Title and Supervisor Allocated gt 09 10 3 First Meeting with Project Supervisor 10 10 4 Initial Research and Feasibility Study 5 Logbook and Draft Report Writeup a 6 Feasibility Study Report Preparation 7 Development and testing of drivers p imal Project Seminars 9 Code generation and testing of the control application n 10 Design develop and test the web user application e 11 Final testing and enhancements to the system gt 12 Project demonstration to supervisor Led 13 Prepare Final Report Poster and CD o 14 Project Submission 07 04 15 Poster Presentation Gantt chart Part II showing the estimated time span for each task SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 35 Universityof Hertfordshire School of Electro nic Communication and Electrical Engineering Appendix B Project Workflow Chart Part 1 Part 2 Part 3 Initial Research Feasibility Study bra files Use change pre built deivenilibrary files for VM110 interface board Design and develop the web user interface SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER BSc Final Year Project Report 36 University a eee q Gel School of Electronic Communicat
40. r none Return Result none Description Both DA channels 1 and 2 are set to the minimum output voltage 0 Volt Implementation private int analogOutput new int 3 public void clearAllAnalogOuts DeviceLibrary ClearAllAnalog for int i 1 i lt 3 i analogOutput i 0 SetAnalogChannel Declaration Syntax public static extern void SetAnalogChannel int Channel Input Parameter Channel Value between 1 and 2 which corresponds to the 8 bit DA channel number in which the data is to set to maximum SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 23 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 13 Return Result none Description The selected 8 bit Digital to Analogue Converter channel is set to maximum output voltage Implementation private int analogOutput new int 3 public void setAnalogOut int analogOutputNumber DeviceLibrary SetAnalogChannel analogOutputNumber analogOutput analogOutputNumber 255 SetAllAnalog Declaration Syntax public static extern void SetAllAnalog Input Parameter none Return Result none Description All channels of the 8 bit Digital to Analogue Converters are set to maximum output voltage 5 Volts Implementation private int analogOutput new int 3 public void setAllAnalogOuts DeviceLibrary SetAllAnalog
41. rpose of this report is to present a comprehensive and concise description of all the phases through the lifecycle of my final year project Universal Home Automation Controller a program to enable automatic and controlled management of intelligent homes integrated with various types of sensors switches alarms lights and motion capture cameras that work in a collaborative manner when connected to a interface board or directly to a host system running this program which can be accessed from the host system ubiquitous devices within a networked home and remotely from anywhere in the world using services provided over communication channels like internet cellular and telephone networks Remote Gavices access Dea web eopicabon va intema POA Smartphone Controls Climate Lighting Controls Security Con rais WR gt l e A Host system with lt 4 y contol application RoulerModem A Figure 1 Universal Home Automation Control During the development testing and demonstration of this project a USB experimental interface board known as VM110 or K8055 designed and developed by Velleman Components N V based in Belgium was used as a key resource to simulate the variety of components present in a digital home such as temperature and motion sensors dimmers switches lights etc which can be conceptually represented by the analogue and digital inputs and outputs provided on this interface board
42. sign development and deployment of this project for it to work in a given environment After the preliminary research various proactive measures were devised in case certain elements in the initial system design were non functional then they could be SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 3 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report re worked upon or replaced with tried and test solutions depending on the time constraints which are shown in the project workflow chart see Appendix B 1 4 5 Legal The legal aspects of this project are very limited as this is an academic project with a lifespan of one academic year only but nonetheless it has been taken into account that during the course of this project any private and confidential data about a person or organization will not be stored or used in an inappropriate manner The university s codes of practice for the use of human volunteers risk and ethics have been strictly followed Any material derived or quoted from the published or unpublished work of other persons has been duly acknowledged 1 5 Report Structure This report consists of the following six chapters each of which provides a thorough and concise account of the work undertaken and learning outcomes from various stages of this project e Chapter 1 Introduction This is the current chapter in which an overview to home
43. t any message of this protocol without requiring a master controller and network supervision which eliminates the need of complex network controllers and routing tables SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 7 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report o Smart House This is one of the latest and most sophisticated standards It integrates a unique wiring system and computer chip language which enables common home appliances to communicate with each other and work together Special Smart House compatible devices must to be used with home automation system supporting this standard Other common standards are C BUS KNX PLC Power Line Control BUS System Box Universal Powerline Bus UPB UPnP Universal Plug and Play e Open Standards Many home automation systems use custom build open standards for communication with and control of devices using a preferred controller Such standards are designed in accordance with accepted standards in use in the computer industry and easily able to integrate with other applications and devices This substantially reduces the total cost of development and ownership Bridges are used to translate communication and control information from one standard protocol to another e g from X10 to INSTEON 2 1 3 Elements A home automation system is formed mainly of the following three elements
44. tCurrentDevice cardAddress return currentCard Analogue to Digital converter methods 6 ReadAnalogChannel Declaration Syntax public static extern int ReadAnalogChannel int Channel Input Parameter Channel Integer value of 1 or 2 which corresponds to the AD channel whose current status is to be read Return Result int The corresponding value of the Analogue to Digital Converter data that is read from the board Description The input voltage of the selected 8 bit Analogue to Digital Converter channel is converted to a value which lies between 0 and 255 Implementation private int analoginput new int 3 public int readAnalogIn int Al Nr analog nput Al_ Nr DeviceLibrary ReadAnalogChannel Al_Nr return analoginput Al_ Nr SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 20 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 7 ReadAllAnalog Declaration Syntax public static extern void ReadAllAnalog ref int Data1 ref int Data2 Input Parameters Data1 and Data2 Pointers to the integer variables where the data read will be stored Return Result none Description The status of both the Analogue to Digital Converters is read using this method and stored to an array of integer variables Implementation private int analoginput new int 3 public void readAllAnalog ns DeviceLibrar
45. ter none Return Result none Description All the digital output channels are set i e switched ON Implementation private bool digitalOutput new bool 9 public void setAllDigitalOuts DeviceLibrary SetAllDigital for int i 1 i lt 9 i digitalOutput i true Digital Input methods 19 ReadDigitalChannel Declaration Syntax public static extern bool ReadDigitalChannel int Channel Input Parameter Channel Value between 1 and 5 which corresponds to the digital input channel whose status is to be read Return Result Boolean A return value TRUE means that the channel has been set switched ON and FALSE means that it has been cleared switched OFF Description Using this method the status of the selected digital input channel is read Implementation private bool digitallnput new bool 6 public bool readDigitalln int digitallnNumber SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 27 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report digitallnput digitallnNumber DeviceLibrary ReadDigitalChannel digitallnNumber return digitallnput digitallnNumber 20 ReadAllDigital 21 Declaration Syntax public static extern int ReadAllDigital Input Parameter none Return Result int The 5 LSB Lease Significant Bit correspond to the status of the digital input channels
46. y ReadAllAnalog ref analogInput 1 ref analogInput 2 Digital to Analogue conversion methods 8 OutputAnalogChannel Declaration Syntax public static extern void OutputAnalogChannel int Channel int Data Input Parameters Channel Value between 1 and 2 which corresponds to the 8 bit DA channel number whose data is to be set to a new value Data Value between 0 to 255 which is to be sent to the 8 bit Digital to Analogue Converter Return Result none Description The indicated 8 bit Digital to Analogue Converter channel is altered according to the new data This means the data corresponds to a specific voltage The value O corresponds to a minimum output voltage 0 Volt and the value 255 corresponds to a maximum output voltage 5 Volts A value of Data lying in between these extremes can be translated by the following formula Data 255 x 5V SAMARTH GUPTA UNIVERSAL HOME AUTOMATION CONTROLLER 21 Universityof Hertfordshire School of Electronic Communication and Electrical Engineering BSc Final Year Project Report 10 Implementation private int analogOutput new int 3 public void changeAnalogOut int analogOutNumber int newAnalogOut DeviceLibrary OutputAnalogChannel analogOutNumber newAnalogOut analogOutput analogOutNumber newAnalogOut OutputAllAnalog Declaration Syntax public static extern void OutputAllAnalog int Data1 int Data2 Input Parameters Data a
47. y the simplest and least expensive home automation systems The X10 compatible modules need only to be plugged into any standard wall outlet and programmed to match the code of the other X10 compatible devices in the house Each module is designed to control a specific appliance only Components using X10 standard don t share memory and are sensitive to home wiring line noise o CEBus The CEBus Consumer Electronics Bus standard also known as EIA 600 was developed by the Electronic Industries Association EIA It is a set of electrical standards and communication protocols for electronic devices to transmit commands and data This standard is media independent so it can send signals over power lines coaxial cable and unshielded twisted pair UTP cable Being a proprietary standard it tends to be expensive to implement because of the license fees incurred to manufactures o LonWorks This standard is built on a protocol called Echelon developed by Echelon Corporation This is also a media independent standard and is popular for automation of various common functions within houses such as lighting and HVAC Heating Ventilating and Air Conditioning o INSTEON It is a dual band mesh topology standard using both AC power lines and radio frequency RF to control and communicate with electronic devices and appliances within the home All devices supporting this standard act as peers meaning each device can transmit receive and repea
Download Pdf Manuals
Related Search
Related Contents
Friedrich 2008 Air Conditioner User Manual ウォーターリムーバブル黒インク 1035 Samsung DVD-C601 Manuel de l'utilisateur Blue Vision II manual GB Goulds Pumps NETWORK MEDIAPLAYER 350 WLAN Philips InStyle Suspension light 40733/48/16 Melissa 740-117 User's Manual Copyright © All rights reserved.
Failed to retrieve file