text:
VIEWS: 1 PAGES: 96 POSTED ON: 5/31/2012 Public Domain
Senior Design I Group 4 Brian Krueger, Daniel Arnett, Joseph Vanciel "Smart Home" P a g e | ii Contents 1.0 Executive Summary ............................................................................................................... 1 2.0 Project Description ................................................................................................................. 2 2.1 Project Motivation and Goals ............................................................................................ 2 2.2 Objectives ............................................................................................................................ 4 2.3 Project requirements and specs ....................................................................................... 6 3.0 Research Related ................................................................................................................. 10 3.1 Existing Similar projects and products .......................................................................... 10 3.2 Relevant Technologies .................................................................................................... 12 3.3 Strategic Components ..................................................................................................... 20 3.4 Possible Architecture ....................................................................................................... 22 3.5 Future Implementation ..................................................................................................... 26 3.6 Objective Realization ....................................................................................................... 28 4.0 Project Hardware & Software Design Details................................................................... 30 4.1 Initial Design Architectures.............................................................................................. 30 4.2 Main Processor (Main Microcontroller) ......................................................................... 32 4.3 Wall Unit ............................................................................................................................. 37 4.4 Web-Based Control .......................................................................................................... 56 4.5 Electronics Control ........................................................................................................... 61 4.6 Server ................................................................................................................................. 64 5.0 Design Summary .................................................................................................................. 68 6.0 Project Prototype Construction ........................................................................................... 70 6.1 Physical Properties of Design ......................................................................................... 70 6.2 Physical Properties of Implementation .......................................................................... 71 7.0 Prototype Testing.................................................................................................................. 75 7.1 Hardware Test Environment ........................................................................................... 76 7.2 Hardware Specific Testing .............................................................................................. 77 7.3 Software Test Environment ............................................................................................. 82 7.4 Software Specific Testing ................................................................................................ 83 8.0 Administrative Content ......................................................................................................... 89 8.1 Milestone Discussion ....................................................................................................... 89 8.2 Budget and Finance ......................................................................................................... 91 Appendix A: References ............................................................................................................. iii Page |1 1.0 Executive Summary The goal of this project was to combine all of the skills that have been learned over the years studied Electrical and Computer Engineering at UCF and put them all into a practical use. The project that interested the group and gave the group an opportunity to use these skills was to design the electronics that composed a "Smart Home." Designing and building this project gave the group the opportunity to use micro-controllers, different sensors, printed circuit boards, RF communication, programming various micro-controllers, and using various components of electrical engineering to do it all. The project design is meant to first and foremost lower power consumption of the household, followed by making home electronics easier to use and better integrated into the household, and lastly to improve home security. With the current push towards energy efficiency and renewable energies due to the current political climate in the areas where the U.S. procures their oil from, the group saw this project as a very relevant idea to look to implement with the potential to be more than just a senior design project. The goal is to create a quality senior design project that when finished, the group can stop and evaluate the possibility of continuing the design into a marketable product. When considering the design, the group immediately gravitated toward using Texas Instruments micro-controllers due to their ease of use, low power consumption, which is central to the project, and the fact that they are on the cutting edge of technology. In the case of the Stellaris micro-controller that is being used in the design, the ARM processor driving the Stellaris has become the most popular processor in the industry. The majority of the major components in the design are indeed Texas Instruments components due to the fact that they have so many products geared towards low power consumption. The system is intended to have several different processors placed in strategic places around the household and control the lights, electronics and ceiling fans while tracking room occupancy and temperature. The lighting system is meant to turn on automatically as a person enters a room and turn off quickly after they leave. The electronics controlling system is meant to turn electronics off when a person leaves the room. The ceiling fan controller is meant to turn ceiling fans on after the temperature passes a certain level. With all of these different capabilities, the user is capable of controlling them via the internet. The interface that the user can access via the internet creates a very user friendly system due to the fact that if the user has a laptop, a desktop computer, a smart phone, or a tablet PC, they may immediately access the system. The plan to present the use of the system is with a small scaled version of a house, displayed through a wooden model, with various electronics plugged into different outlets in the "house" with all of the different sensors integrated into it. Also along with the live presentation that will be given, a video will be shown presenting the various features of the smart home on a larger scale within a household. The design is being supported very kindly by Workforce Central Florida, providing re- imbursement for all of the components going into the design. Also, the group is being advised by a mentor who agreed to sign onto the program along with the group, Sean Donovan. Sean is currently a Systems Engineer at Lockheed Martin Missiles and Fire Control and received both his undergraduate and Page |2 masters' degrees in Electrical Engineering from the University of Florida and is lending his expertise to help the group build the system. Finally, Dr. Richie is guiding the Senior Design program and helping the group in addition to all these other resources. 2.0 Project Description 2.1 Project Motivation and Goals Facing the ever present need to conserve energy and lower monthly bills, the main focus of the smart home being designed will be power conservation. Energy is becoming more and more costly with each day as the United States of America searches for alternative energies to help meet its growing population's demands and help reduce their dependency on foreign oil which is to some extent controlling the foreign policy. Energy savings is something that is important to all citizens also for the sake of conserving the resources that the precious earth provides. The goal for this project will be an infrastructure that can be added upon to meet any number of needs. This infrastructure is a modular system, allowing the user to have as many or as few features as they desire, depending on different factors such as price, need, etc. The group wants this infrastructure to be able to be very flexible so that it conforms to the user, and does not force the user to conform to it. This infrastructure will focus on temperature, light, fan, and outlet control. Through outlet control, the system will allow the user to control any electronic device just by having the electronic device configured as being on at all times, and then configuring the outlet on and off to turn the device on and off. This system should be able to toggle lights as people pass from room to room as well as cut power to some appliances when they are not needed. This system should account for the user's error in which they forget to turn off electronics and lights and should turn off lights when the user has left a room but without turning off the lights first. This system should also be able to monitor the temperature of individual rooms and turn the fan on should it get too hot. The desire is to find a way to do this without consuming more energy than is being saved. To eliminate the problem of systems timing out if the resident is stationary or not creating a readable sensor input, and the problem of energy consumption from taking continual readings, this system will have some kind of door sensor to alert the system that a change has occurred. The system should then turn the lights on in the adjacent room and take readings for a set period of time in both rooms to determine if someone is present; if the readings turn up nothing in the allowed time, then the lights shut off. The system will utilize the ability of the different electronics to sleep and run in very low power modes while not receiving any input, and therefore not consuming large amounts of power at all times and in essence erasing the purpose of saving power for the user. This Page |3 will be essential to the system, allowing the system to sleep and allowing interrupts to wake up the system when needed. Another goal is for this system to be accessible over the internet. The user should be able to have complete control over the system from any internet access point, being able to turn things on and off manually on an easy to use graphics interface. This interface should be able to show the status of all the rooms in the house; showing things like which outlets are on or if any fans are on as well as if any lights are on, implying that someone is present. The purpose of this is to allow the user access to their home electronics from any destination. When they are inside the house, they have the ability to control everything from one sitting position. This may seem like just for convenience, but also when the user is outside of their home they can access the same electronics and lights as well. This allows the user to not only turn off electronics that they have left on after leaving their household but also to prepare their home for their arrival home, whether that may be turning on the lights so they don't have to find them in the dark, or starting their coffee maker so their hot coffee is waiting for them already made. Once this infrastructure is in place, the desire is for a basic security system will be integrated in. Some of the features of the security design will be implemented in this phase of prototyping. For the alert modes, the system will not have them built into this phase, unless time and resources allow it. These features will most likely be built into the next phase. These features will allow the user to be able to set the home to "vacant mode" on the internet interface. Once in this mode, whenever someone crosses over a doorway, the system will not turn on any lights but instead go into an alert mode and will still take measurements to see if someone is in the rooms. Should the sensor readings come back positive it will mean that someone is in the house when they are not supposed to be. The system should then be able to alert the user of the unwanted intrusion. The user also will be alerted of anyone who is detected to be at the doorway for a preset amount of time, which will in turn allow the user to pre-emptively prevent a break- in. The user will be alerted not only through the website but also via email and/or cell phone text messaging service. This can all be configured by the user. The system can also be enabled to alert/message 911 if the user does not respond or turn off the alarms within a set amount of time. However, this will be not set by default, so if the user is not familiar to the system they can keep themselves from having the police unnecessarily show up repeatedly at their place when they are not needed. Two additional features of this system will be surveillance and automatic locks. The front door of the house should have a camera that takes a picture of everyone coming in; it should then store the picture in an archive with the time and date it was taken and make it available to be viewed online. The front door may or may not also be outfitted with a camera, allowing the user to have a live feed at any time of any individual that may be outside the doorway. This camera Page |4 will be in a sleep state until triggered by another sensor that will trip the camera to turn on. The camera will also be triggered on if the user, through the interface, requests to see the feed. Another feature would be electronic locks. Of all the security requirements, this feature is the only one that will be guaranteed to be included in this phase of prototyping. The system will have a keypad outside of whatever doors, inside or out, that the user chooses. The code to unlock it should be programmable and be of variable length; additionally, the user will have the option of unlocking any of the doors through the internet interface. Through this, the user shall prevent someone from being locked out. In a situation where someone who is not a member of the household, and they do not want privy to the combination to get in, can be let into the house without having to give away to combination to the household which would compromise security. Through the use of a combination period, this will help prevent lockouts in the situation that a member of a household has misplaced a key or forgotten them in one place or another. 2.2 Objectives The senior design project is often a rite of passage for many engineering students. For the project, the group would like to make the most of the senior design project and accomplish several different objectives through it. This project is not only a project for the group to build a prototype, but also a project that could eventually become a marketable product. The group wants to go through the complex build process that comes with building a marketable product, even though the group does recognize that the project is only a prototype and not an end product. The project will also serve as a learning experience for the group with practical experience with some components of what is popular in the world of electrical engineering. The group wants to build on these practical skills using the theoretical skills that have developed through the classes at the university. It was also desired to make a positive impact on the world by using engineering ingenuity to help people conserve much more energy. This project is something that is not a new creation, but rather an opportunity to improve upon existing technologies that are already available to many consumers. The group would like to make the existing services offered to consumers to upgrade to a smart, automated house affordable so that it is something that most consumers can afford and therefore will be more likely for the consumer to go out and purchase. What is being built is a prototype, and not an end user system. However, with this prototype, the group can look to develop it into a highly marketable product, with the prototype serving as a starting point that can be marketed to those that can back the project financially. Going through the process of just building a prototype, the group will still learn the business structure of developing requirements, creating a design, building the design and then testing that design to verify that it meets the original requirements. Also, another facet the objective of product improvement is not Page |5 just to make the product more affordable for those who are interested in upgrading their home to a smart house, but also allow consumers to do it themselves. This method allows the project to greatly reduce cost and make it more appealing to "Do-It-Yourself"-ers as well as make it more widely available so that those who are interested do not have to immediately convert to a smart home, but rather do it in modules, choosing the features that are most affordable for them as well as appealing. Another objective of this project is for the group to get some practical experience and learn more about the technologies that are popular and on the cutting edge. In the project, the group will be working with some of Texas Instrument's most cutting edge microcontrollers in the Stellaris and the MSP430, digital signal processing, touch screen controllers, and IR sensors. Not only will the group need to design, wire, and debug the hardware, the group will also get to work with the software aspects of this hardware. The group will get to work with a RTOS that is common in microcontrollers, building an interrupt system, as well as writing more scaled back code for the microcontrollers in which the project is looking to handle simple signal input and output. Programming skills are invaluable today for electrical engineers, as being able to interface hardware to software is vital and for those who have a strong grasp of what their hardware is doing, they will know how to get the best out of their hardware through their software. Also, in the ever growing popularity of digital signals versus analog signals, gaining experience working with digital signals is very important before getting out into the electrical engineering world. Working with both microcontrollers, and getting experience programming and debugging them is invaluable when considering with all the class work that has been done it is a rare case to get to work with hardware that is on the cutting edge. In class, what is learned is all the theory behind what is driving the hardware to do what it is doing. It is important to know why the hardware is working how it is, rather than knowing that it is just working. However, building practical skills by working with the hardware is vital to because despite knowing how everything is supposed to work and why it does, knowing how it works in real life conditions is very vital as well. Energy conservation is imperative in this day and age, with the deterioration of the planet. Most would like to make a positive impact on the world and leave it a better place than they found it. In this project, the skills that have been learned by the group are being put to use to do this. Through this project, a system can be built that will help people to save energy. For most, this might be taken at face value as an opportunity to save them money when it comes to their energy costs. For the project, it is a gateway to helping the planet through the group's skill set and ingenuity. If a system can be built that people like, the more that use it the more energy of the planet can be saved. Also, depending on the user, it may save more energy for some than it does for others. The key to this system is that through all the peripherals, whatever the user has set up, that the system is saving the user energy no matter what setup they have or prefer. As this is a Page |6 prototype, the efficiency of the system will most likely not be at its best; with analysis and modification to this prototype being built, future builds can look to increase efficiency even more. 2.3 Project requirements and specs Main Processor Requirements following are applied to the Stellaris micro- controller carrying out the majority of the system's processing: <PRS 1.>The Main Processor shall send output to all lighting and power controllers and receive input from all sensor and camera inputs. <PRS 2.>The Main Processor shall send output and receive input through the use of an RF Communication. <PRS 3.>The Main Processor shall allow for user access via the universal control and the internet interface. <PRS 4.>The Main Processor shall utilize RTOS to handle interrupts and events within the processor. <PRS 5.>The Main Processor shall be in sleep mode when no signals are being sent to it or from it. <PRS 6.>The Main Processor shall have an external crystal oscillator to control its clocking. <PRS 7.>All devices that are hardwired to the Main Processor will be connected to the same crystal oscillator as the Main Processor for all of their clocking. <PRS 8.>The Main Processor shall be connected to a 10/100 Base-TX Ethernet Jack in order to interface with the router. <PRS 9.>The Main Processor will operate as the master of this system with I 2C protocols, functioning as the slaves of this system. <PRS 10.>The Main Processor will use a lithium-ion battery to power the processor when it is in a hibernate state. The Motion Requirements are meant to govern the processors that are connected to the motion sensors within the system. The requirements are as follows: <PRS 11.>The motion processor shall be able to wake up upon receiving a signal from the door sensor and pass on the signal to turn the lights on in less than 10ms. <PRS 12.> The motion processor shall sample the incoming audio signal at 32KHz. <PRS 13.> The motion processor shall draw no more than 20µA. <PRS 14.>The motion processor shall spend 95% of its time in sleep mode. <PRS 15.>The IR Sensor shall operate at a max current of 6µA. <PRS 16.>The IR Sensor shall be used to detect movement in any given room up to 20 ft. Page |7 The Lighting/Electronic Controllers' Requirements are the set of requirements concerning those controllers that are configured to control the lights or the electronics. Because both will be built to the same design and handle the same functionality, they also share the same set of requirements. The requirements are as follows: <PRS 17.>The Lighting Controllers shall only receive input from the Main Processor. <PRS 18.>The Lighting Controllers shall be set to either active high (On) or active low (Off). <PRS 19.>The Lighting Controllers will be configured to daytime mode where the lights do not turn on automatically. <PRS 20.>The Power Controllers shall be configured but not limited to control the power input to the following devices: a. Television b. Cable Box c. DVD Player d. Gaming Consoles e. Stereo/Audio System The Temperature Controllers' Requirements are meant for the building of all sensors using temperature control: Both those with and without the digital display. The requirements for this set of controllers are as follows: <PRS 21.>The processor should wake up once every 5 minute to check the temperature. <PRS 22.>The processor should be able to take the measurements, complete the required logic, and send the appropriate signals in less than 1s. <PRS 23.>The processor should be able to send the signals for displaying any given number to the display in less than 2ms. <PRS 24.>The Controller will have a digital display containing the current temperature of the household. <PRS 25.>The Controller will use hysteresis to prevent the system from constantly being configured to be on and off, therefore negating the effectiveness of the system. <PRS 26.>The User shall set the threshold temperature level of the system. <PRS 27.>Each room will have its own threshold temperature setting. <PRS 28.>The Controller shall signal the Main Processor when the system is more than 5 degrees above the threshold temperature. The following requirements below are strictly for the different interfaces of the system. These requirements are designed to provide an efficient, effective, user- friendly system that interfaces all of the designs of the system together. The requirements of the different user interfaces are as follows: <PRS 29.>The Universal Control will be battery operated and or wall mounted Page |8 <PRS 30.>The Universal Control will be touch enabled through the use of capacitive touch <PRS 31.>The Universal Control will allow the user to view who is outside of the apartment at any time <PRS 32.>The Universal Control will ring when a person is detected to be outside the front door for more than 30 seconds <PRS 33.>The Universal Control will be able to view a live feed from the surveillance camera at any time <PRS 34.>The Universal Control shall be able to configure any connected light switch as on or off at any given time. <PRS 35.>The Universal Control shall be able to configure any electrical device to turn on or off at any given time. <PRS 36.>The Internet Interface shall prompt the user to login <PRS 37.>The Internet Interface shall allow the user to turn all lights and/or electronics on and off <PRS 38.>The Internet Interface shall allow the user to see a log of who has entered <PRS 39.>The Internet Interface will allow the user to see a live feed of any camera <PRS 40.>The Internet Interface shall be accessible at all time <PRS 41.>The Internet Interface shall use a user-friendly layout <PRS 42.>The Internet Interface shall be broadcast via router <PRS 43.>The Internet Interface shall use a MySql Server to store user login information <PRS 44.>The Internet Interface shall be passed from the processor to the router via a wired Ethernet connection. The following set of requirements has been designated to govern processor to processor communication, via the RF network. The system will be hardwired, effectively overriding the RF network for the testing purposes. The final system will be configured to run via the RF network, configured to the following requirements: <PRS 45.>The devices used by the system shall use radio frequency for communication <PRS 46.>The devices shall use at least a 4 channel device to find the best channel to send signals <PRS 47.>The devices shall communicate over a 902 or 400 MHz frequency <PRS 48.>The Transmission shall consist of 1 start bit, 3 digital handshake bits, 1 parity bit, and 10 data bits. <PRS 49.>The Digital Handshake bits shall alert the receiver whether the transmission is intended for their use or another device. The Security features of the system were originally intended to all be hard requirements, but after researching the requirements, many have been decided Page |9 to be implemented as nice-to-haves rather than hard requirements of the system. The security requirements are as follows: <PRS 50.>The electronic door lock shall allow the user to unlock the door through a 12 keypad interface <PRS 51.>The electronic door combination shall be a 9 number combination <PRS 52.>The electronic door lock shall allow the user to control it from the user interface, locking and unlocking it within 1s <PRS 53.>One camera will be placed above the main entrance of the household with a clear view of any person standing in front of the main entrance <PRS 54.>Using blob detection, if an object is detected in front of the main entrance for more than 5 seconds consecutively, then the camera will handle that as a "Outside Visitor" event <PRS 55.>The cameras will be in sleep mode until triggered by another sensor to wake up <PRS 56.>In the case of an "Outside Visitor" event: a. If the User has away mode set, the user will be alerted immediately inside through the use of the touchpad controller, as well as externally through text message b. If the User has normal mode set, the user will be alerted immediately inside through the touchpad controller c. If the User has low security mode set, only a log will be created of the event. <PRS 57.>At any time, the user will wake up the camera in front of the household and receive a live feed through either the touchpad controller or the web interface The status log of the system has been created to keep the user abreast of what is going on within the household on a daily basis and allow the user to check various past events in the case of a break-in or an event where having access to past occupancy records are important for the user. The Status Log requirements are as follows: <PRS 58.>The Status log shall log all of the following events: a. An "Outside Visitor" event b. An "Entrance" event c. An "Exit" event d. A "Message" event <PRS 59.>The Status log shall report the following information on each logged event: a. Date b. Time <PRS 60.>The current status shall display: a. The number of occurrences of each event b. The current mode of the system P a g e | 10 The following set of requirements are meant to govern the design of the printed circuit boards that will be built to route the different signals of the different IC's that will be interfacing with each other. This set of requirements is intended to help prevent any issues arising from using a poor printed circuit board layout and causing intermittent issues when verifying the requirements and validating the system through system testing. The requirements are as follows: <PRS 61.>The Printed Circuit Board shall be composed of 6 layers, with layers 3 and 5 used for high power and heat dissipation, layers 2 and 4 for signal traces, and layers 1 and 6 for components and traces if needed. <PRS 62.>Components will be laid in a way to reduce trace length whenever possible. <PRS 63.>Differential Pairing, Tuning, and trace keep outs will be used as needed to reduce the noise in the system. The following requirements have been written to increase the functionality and use of the system, make the system significantly more user-friendly, and to catch all of the requirements that need to be satisfied but cannot be satisfied at a functional level. The non-functional requirements of the system are listed below as follows: <PRS 64.>The system shall be set to use as little power as possible at all times <PRS 65.>The system devices shall use sleep settings to conserve power <PRS 66.>The system shall use a system of interrupts to wake the devices out of sleep mode <PRS 67.>The system shall use any techniques whenever possible to reduce noise. 3.0 Research Related 3.1 Existing Similar projects and products There is a mix of existing projects and products in home automation and efficiency being researched as well as sold to the public. One large scale research project is Project Jarvis. Project Jarvis was created to be a "Digital Life Assistant," which entailed not only home appliance control but also allowing the use constant updates from social networking, Netflix, and other services the user subscribes to. The approach he uses for communication between the user and his apartment is twitter, instant messaging and voice commands. Using twitter or an already created media is an approach the group could take instead of creating a web service as the primary communication method. Also, Jarvis coordinates many of its home automation tasks through the use of the GPS system most smart phones now have. The complete synchronization of the user and the home is a very interesting aspect of Jarvis. The approach to this project was in terms of improving energy efficiency, with the side goals being improved home security and automated, synchronized electronics. Jarvis took the approach of P a g e | 11 complete automation, with different aspects of his design to do the thinking for the user. The GPS aspect of this allows the home to "prepare" for the user to come home, which is a nice feature. However, with the goals of the senior design project in mind, preparing the home for the user to arrive could potentially lead to more power usage through turning on lights and electronics pre- emptively. It is a possible side project to be explored beyond the design of the prototype, to see if the extra power consumed through this prepping is minute enough to be considered negligible in the scope of the senior design project's goal to minimize power consumption. Both of these technologies are very useful to this objective and may assist in finding the optimal and most efficient design.[4] Another similar product is the home automation offered by Home Automation, Inc. . Their main features mostly match that of the projects, with theirs being: Security, Surveillance, Lighting, Energy Management, Access Control, Entertainment, Interfaces and Software, and Voice Intercom. The senior design system will look to implement all of these features but the Entertainment and Voice control are two features that are desired down the line but will most likely not be incorporated into the current build. The Home Automation, Inc. home automation services are not sold to users to be installed by themselves; these services are installed by Home Automation, Inc. and cater to each individual's needs and monetary constraints. The group would like the system to be, even though it will be a prototype as opposed to a marketable product, a simple system where the average homeowner could install the system's tools and set up the home automation themselves. Home Automation, Inc. offers phone applications, control via internet, and touch screen control inside the abode. All of these features are also features the group would like to implement, with the internet connectivity being a hard requirement and the phone application and touch screen control being a "nice to have." The mood control features, including playing music into various rooms, different lighting settings depending on the occasion, etc. are features that Home Automation, Inc. has in their system, but are not key features to the senior design system as the design is looking more into efficiency and security and are less focused on those features that are more geared toward a marketable product. For their interface, they have a multitude of ways they interface their features to their user. Home Automation, Inc. uses a thumb drive that when plugged into a laptop will interface the user to the system. An application can be installed on most smart phones that provides the user a graphical control from anywhere with their phone. A home PC can be set up to control the system, with windows media player configured to control music choices being played in multiple rooms. A windows home server may be installed for advanced users, as well as various touch screen controls anywhere in the home. The portability and interfacing options given to the user makes this system very desirable for those who can afford it. However, as their products are not offered to be installed by the consumer themselves, using their system can be very costly. The portability is not a main goal of the project, and is not stressed in the design. The aforementioned features however could be P a g e | 12 implemented in future design, as can be seen in Section 3.5: Future Implementation.[6] Control 4 is another company offering residential products as well as commercial, with their services differing from Home Automation, Inc. in that they are made to be sold as an end product and the buyer install themselves. This is similar to what the project will do, with potentially creating a system with low complexity for those buying it but with high capability. Control 4 offers a control center which is integrated with all of their hardware. It is essentially a modular system in which the consumer can purchase whichever pieces they like or are within your budget. They offer mobile apps, different interfaces, lighting controls, audio/video input and output, climate control, and security features. This, similar to Home Automation, Inc. , covers the breadth of what the project is looking to accomplish when it comes to the lighting control, use of different interfaces and web control, and the security features. This is most like the group's design, in both its modularity and ease of user installation. Affordability is extremely important for an end user product of the prototype. The only issue that arises with a system which is driven by user installation and not an installation by the creator is the lack of user customization. This system is a system where the more customized to the user's home and needs, the better the system will work. With the system's use of different sensors to detect where in the household an occupant is and where he/she came from, fine tuning the system specific to different household's is vital. Using a broad software implementation leaves for more bugs due to variability in the user's household, number and size of occupants, habits and lifestyle, and so on. There are many variables that can create bugs if not planned for; however, the scope of where the system will be implemented is much needed to do this.[4] Both Home Automation, Inc. and Control 4 use a lot of aftermarket products rather than their own to implement their smart homes. The brand they use is ZigBee. Within the different Zigbee products, there are a broad range of products which the project is going to create, and is looking to improve upon. Within ZigBee's product line, many of their products are actually "ZigBee approved" products rather than actual ZigBee products, meaning ZigBee distributes them but do not manufacture them. Some of the products comparable to what the project is creating including the 2D2C Safeplug 1203, the AlertMe Occupancy Sensor, the Baldwin Smart Lock, Centralight's ON/OFF Light, and the Control 4 HC300/500. These various sets of home automation tools are created to be able to interface to each other. However, creating all of the tools being used ourselves allows for more control over the interface of all of the components. Like it was stated before, being able to customize the design and tailor it as much as possible to a specific environment will allow it to operate at its best. [4] [6] 3.2 Relevant Technologies P a g e | 13 There are four major types of microphones: dynamic, ribbon, piezoelectric, and electrostatic. Ribbon and dynamic microphones use the concept of inductance and are capable of the highest quality amongst the four. These types of microphones tend to be on the expensive and large side; and as size and price are of high concern in this project, they will not be used. Piezoelectric microphones are smaller and cost less. They use the properties of some materials to produce a voltage when applied with pressure. These microphones have very high impedance which leads to high distortion when used for picking up sound waves in the air. Distortion is not a big concern in this project though because the sound intensity is what will be measured, so these types of microphones will be sufficient for satisfying the requirements of the project. The last major type is the electrostatic microphone. This type uses the concept of capacitance and its one major drawback is the constant need of a supply voltage to work. This is overcome though by a subclass called electret microphones. These microphones are made with a material between the capacitive plates that help maintain the bias, lowering the current needed from a source down to about 1mA. These microphones are small, cheap, have a very wide frequency response range, and are used in thousands of commercial products today; making them the extremely viable and first choice of sound sensing technologies to be used. Motion sensors have a very vast variety of types and constructions all depending on what kind of motion is to be detected. The desire to detect the movement of people in a room pretty well narrows that list down to optic sensors. In the optics department there are two ranges of light that are most commonly used: visible and infrared. Regardless of which is picked, both require additional processing to determine if motion is present. For the sensors working in the visible light range, a fairly high pixel count is needed as well as a processor to determine the differential between the images captured. All in all it is a bit of a pricey endeavor if purchasing a premade sensor and a headache if trying to code the processor from scratch. As with audio, not a lot of resolution is needed because no recording or playback is required. With this in mind, a much more plausible rout is found in the infrared spectrum. A sensor can be combined with a processor to watch for the change in infrared intensity, and as both can be had fairly cheap, this is the ideal motion sensor for this project. With any project that requires analog inputs, a decision needs to be made about the conversion to a digital signal. Many passive infrared sensors can be purchased in a package that includes analog to digital processing built in; as well as methods to determine if there is movement. When available, premade circuits that accomplish all the needed processing and simply output a digital signal will be the desired choice. Audio on the other hand is overall left to the designer to convert and process how they choose. This brings up the need for analog to digital converters. Aside from how many output bits are included there is not too much variance from one converter to another. However, there are microprocessors that have analog to digital converters built in, which would P a g e | 14 eliminate the hassle of more external chips. This will be desirable should a processor be found that meets all the other specifications. The temperature sensor is another input that needs the consideration of an analog to digital converter. A thermometer that outputs an analog voltage can be had very inexpensively; the analog signal could then be converted to digital and fed into a microprocessor for decision making. As with all the other analog signals, this would require a lot of input pins. The easiest option would be to use an analog thermometer and a Schmitt Trigger set to go off at a preset temperature; the only drawback being that the user would have no way to change the threshold value once set. Another option is to buy a sensor that takes a reading, converts it to digital data, and outputs a signal over one pin that is to be read in by the processor. These sensors become much more expensive than the other, but are already designed to be very power efficient. Some of these sensors even have the ability to communicate over a bus, which would be extremely desirable if something like I2C is used to connect all the processors together. There are enough microprocessors available today to fill the Grand Canyon. With each manufacturer having a long list of models followed by an even longer list of families, it is very easy to get lost trying to decide which choice to make. By requiring an internal analog to digital converter, the list became more manageable and was narrowed down to three manufacturers: Arduino, Atmel, and Texas Instruments. The arduino seems to be the microprocessor of choice for hobbyists and for good reason; it is an open source processor, the development board for most models is cheap, they have a high number of I/O pins, and they are programmed in the mid level language of C++. Arduino only has about ten different models that all generally have the same features, just different form factors. The average number of pins per model is twenty eight; which is more than enough for this projects requirements. Fourteen of these pins are digital I/O and six of them are analog. Depending on if analog to digital converters are needed for the motion sensors, only two digital pins and one analog is needed for inputs. The arduino has a sleep mode but overall it is a bit of a power hog when not in it. Atmel is a larger company with more modals then can be mentioned here, so only the eight-bit AVR XMEGA will be considered. This chip was chosen because it is their most power efficient processor, boasting only a nine nano-amp drain in sleep mode. Considering the majority of the day this processor with be sleeping and the entire point of this project is power saving, this is a very important feature. The smallest package however is forty-four pins with a max of only two analog inputs. Once again, as only three pins is the desired input amount, there would be a lot of wasted pins. This processor uses an "event system" which uses inter peripheral signaling to bypass the CPU as much as possible. This allows for the processor to not be tied up with routing signals when it could be doing other things; this feature makes this processor extremely P a g e | 15 efficient for real time control systems. This feature would not be used in this project however and would be a bit of a waste. A feature that is useful is the direct memory accessing. This processor allows peripherals to access and manipulate memory without turning on the CPU; this would allow for much faster service routine run times and thus more time spent in sleep mode. Texas Instruments is another huge company, so their power saving MSP430 family is what will be considered here. They boast that this processor had power saving as a number one objective when designing it. During sleep mode this processor also has a current drain down in the nano-amperes, as well as a wake up time clocking in at a micro-second. This fast wake up time is not particularly needed in this project, but is a nice feature none the less. The feature of most impotence is the low power consumption; although the Atmel's processor has slightly lower consumption in one situation, the MSP430 brags the lowest overall power consumption for a microprocessor in the world. Because power consumption was the main concern, this is a much smaller and simpler processor then the previous two; having only seven digital I/O ports on their basic model with one of them doubling as the analog input. This might not be quite enough to service all the needs of the project, but they also offer a slightly larger chip in the family with six additional pins. When trying to turn outlets on and off, there are many techniques that can be used. The most important thing though is to try to alter the magnitude and phase of the power coming through the house as little as possible. The types of switches that least effect a circuit are relays and contactors. Relays use an inductor to mechanically open and close a circuit; because it consists of just a strip of metal, the signal proceeds unmolested. Relays range in size and specifications but are usually not used for high power and current applications. Contactors pick up where relays leave off. They work the same way a relay does but with a few extra features. When switching high power devices, arcing occurs and damages the contacts of the relay. This ultimately lowers their lifespan and their effectiveness. Contactors are built to try and minimize arcing; this is usually accomplished by placing the contacts in a sealed environment and filling it with a gas or compressed air. This increases the resistivity of the material between the contacts and thus reduces the risk of arcing. This project is only trying to regulate wall outlets and fans, so both relays and contactors will get the job done. However, arcing may become an issue in the long term, so contractors seem more appealing. Outside of needing a microprocessor, there are many different ways of implementing an electronic door lock depending on how complicated, expensive, and secure one wants it to be. Starting with the interface, key cards could be used as the method for unlocking the door. This has the advantage of a code not needing to be remembered as well as removing the ability of some random person being able to punch codes in until the door unlocks. It also has a few drawbacks though; first of which the card has the chance of being erased in the P a g e | 16 presents of a magnet. The other is it will be much harder to change the code, should the need arise. The second problem could be remedied at the expense of longer code, some hardware, and tedious actions. The microcontroller could be programmed to except a predefined code that tells the system to go into program mode. From there the system will except and store the code on the next card that is entered. If the user had the hardware to program keycards, he could then swipe the card with the new code. Another method would be through a keypad and code. This would have the advantage of being easily reprogrammed as well as being the easiest to implement. There is however the problem of, given that someone has a lot of patients, someone systematically going through and finding the code. There may be somewhat of a solution to that problem by making the code a strange length and not indicating if that length is reached or not. For example, if the length of the code is 9 numbers, the system could except input based on a timer. A user could then push as many buttons as he likes, the system will never give any indication that the correct number of inputs has been reached. As far as the microprocessor goes, there are several ways the code could be implemented to accomplish the goal. A system that continually scans the input for any signs of activity could be used. This system would need about 12 buttons; 10 for the digits and 2 for a reset and a lock button. This would probably provide the simplest user interface out of all the options as the user will just be required to punch in a code at any time and any speed. A little bit more complicated route would be through an interrupt system. The processor could be silent until an additional button is pressed. Then it will begin scanning the inputs for the entered code for a set period of time; if the correct code is read in it unlocks, otherwise it returns to its previous state. This would use the same number of buttons as before, except this would have an interrupt instead of a reset button. Since this project requires that a user is able to control the prototype over the internet, and also view the status of whether different appliances are on or off over the internet, a server is needed for the project. There are different ways to design the project with a server. One way would be to have a dedicated server on a nearby computer, and either connects the prototype wirelessly, or wired. This would require a computer nearby, and on at all times, thereby increasing power consumption. It would also increase cost since that would require a standalone server. An alternative method would be to embed the server on one of the microcontrollers. The microcontroller would need specific capabilities to accomplish this. For this project, an embedded web server is a great way to provide status, operation, production, and maintenance information about an embedded control system to an operator that is standing at the equipment or a thousand miles away. The system can be adjusted, reconfigured, and controlled using the same, familiar, Web-based interface. The detail and display of the information provided P a g e | 17 can be as rich as desired, yet the interface is largely the same and adds almost nothing to the cost of the equipment. Web servers are a bonus to applications that are already taking advantage of being networked, perhaps for coordination between machines, factories, or the front office. And access to the Internet can expand options that would be unfathomable in other scenarios. It was discovered that Texas Instruments' Stellaris microcontrollers offering Ethernet connectivity provides an excellent solution for intranet and internet control of embedded applications. In many circumstances, basic TCP/IP or HTTP protocols are adequate for control and status communication but in security- conscious applications, the additional protection offered by industry-standard Secure Sockets Layer (SSL) or its successor, Transport Layer Security (TLS) is desirable. In a commercial version of this project, since the nature of this project includes appliance control (which one would not want to fall in the wrong hands), maintaining a secure server would be extremely important. Since the Stellaris microcontrollers offer the ability to embed a web server, and also give the option to secure the web server, the Stellaris is an extremely viable candidate to act as the embedded web server. An alternative to Texas Instruments' Stellaris microcontroller is Atmel's' AVR 460. It has an embedded web server design that includes a complete web server with TCP/IP support and Ethernet interface. It also includes support for sending mail, and software for automatic configuration of the web server in the network. The AVR embedded web server can be plugged into any Ethernet interface and communicate with a standard web browser. [13] An embedded web server serves up a graphical user interface that allows a user to view and control multiple outlets, fans, and appliances, and that microcontroller is the main hub for the smart home project. The microcontroller is connected to the local internet connection via a router. The smart home hardware computer located at home as on Figure 1 controls all devices and can receive requests from any logged in user that can access the internet via any web browser. The web server is identified by its unique IP address and can be controlled remotely from anywhere in the world as long as the authorization is in order, and the user has a web connection. The router will have to be properly configured to properly allow users access the server inside the local internet connection. Another strategic component of the system is the RF communication components. For this project, the design will be using Radio Frequency to communicate from the sensors and light/electronics controllers to the main processor. The design will need to use an RF receiver and an RF transmitter, as well as the correct frequency. For the project, the design will be sending digital output from the sensors to the main processor, and the main processor will be sending digital output to the light P a g e | 18 and electronic controllers. A half duplex system could be useful because the design will both transmit and receive with the main processor, but neither at the same time. However, for allowing the system to operate with more speed and efficiency, the design could implement a full duplex system to allow it to send and Figure 1: Monitoring Home Equipment from the Office receive signals simultaneously. This can be accomplished through the use of two different bands for transmitting and receiving. However, due to the limitations of the unlicensed spectrum care should be taken to use two frequencies that are far enough apart in order to not interfere with one another. When sending signals, the design will have to use digital modulation and then analog modulation to send out radio signals. Out of the different of methods of digital modulation, which are amplitude shift keying, frequency shift keying, and phase shift keying, amplitude and frequency shift keying are most likely to be used. Due to phase shift keying requiring a little more complexity, unless the noise reduction is drastic enough for the need to be there, the focus will be on using the most effective system that is the most simplistic for the implementation of the project. For the low carrier frequency, the project will look to use a low P a g e | 19 power crystal, as low power is a central theme of the system. This crystal will most likely be used for multiple chips in the design, in order to allow the design to synchronize the system to the same clocking. In terms of the antenna, between using a whip, chip or board mount antenna, board mount antenna seems to be a most likely option. The cost for this is pretty low and for the design's use it should be sufficient. The size of the antenna is an issue, as a small scale application is desired and using a board mount antenna is as small as it gets. If another option is explored instead, a coiled antenna may be a practical solution. For a quarter wave antenna, Texas Instruments suggests using a 16.5 cm wire for 433 MHz signal, or an 8.2 cm for an 868 MHz signal. With the design's signal most likely to be in the 900-928 MHz range of the unlicensed spectrum, the length needed for the wire should be less than 8 cm. When coiled, this size can be reduced even more to make it practical to use. In this application, range should not be issue. If it is, the range can be increased through either increasing the output power, increasing the sensitivity, or both. Also, if working with a 900 MHz frequency does not supply the adequate range needed, dropping to the 400MHz range should supply at least double that range and give the range necessary. Texas Instruments suggests when choosing the frequency that using a spread spectrum system is great for helping prevent noise, as many channels are very crowded and especially in the household with microwaves, Bluetooth devices, etc. When it comes to choosing the frequency, testing out which frequency works best for the system will be an important component of one RF scheme that will ultimately be used. A big factor in what frequency and protocol used is noise, as so many appliances in the household use wireless networking, making the selection of what frequencies to use narrowed and interference from other devices a real issue for the system.[9] The issue of noise will also arise regardless of what band is chosen because the design will be using one of the bands from the unlicensed spectrum, as the cost of purchasing an RF band is way beyond the scope of the cost of the project. The various free bands that can be used unlicensed are displayed below in Table 1: Frequency (MHz) FCC Legality 260-470 (FCC Part 15.231; 15.205) 902-928 (FCC Part 15.247; 15.249) 2400-2483.5 (FCC Part 15.247; 15.249) Table 1: Unlicensed ISM/SRD Bands in USA/Canada The devices, per FCC rule, are not allowed to cause interference with licensed products using adjacent frequencies, so choosing the frequency and making sure to stay within the bounds is very important. The unlicensed spectrum is used by a broad number of devices, many of the consumer products operating on the 2.4 GHz spectrum. Therefore, the design needs to be sure that the equipment is designed to shield noise as effectively as possible due to different environments causing different levels of noise on different frequencies. [9] P a g e | 20 The other half of this setup is the RF receiver. The major concerns on this end are demodulation. Most of the work lies in how the signal is sent and how to adapt the receiver to take in the signal. The selection of the RF receiver relies mostly on what kind of RF transmitter chosen. The system will be utilizing an Ethernet connection in order to send the signal from the processor to the router. The design will follow protocols compatible with the IEEE 802.3 Standard. A point to point connection is what the design will be using, as it is the simplest design and only communication between two network units will be done. The processor will function as Data Terminal Equipment, or DTE, and the router as Data Communication Equipment, or DCE. The data transmission will need to follow the following protocol in Figure 2:[5] Transmission order from left to right PRE SFD DA SA Length/Type Data Pad FCS 7 1 6 6 4 | 46-1500 | 4 Field length (bytes) Key: PRE: Preamble SA: Source Address SFD: State-of-frame delimiter FCS: Frame Check Sequence DA: Destination Address Figure 2: IEEE 802.3 Standard Transmission Protocol 3.3 Strategic Components Texas Instruments MSP430: This component will be used within all the processors except for the main processor. This component was the choice due to the low power consumption, affordability and built in features. The design will utilize the internal analog-to-digital converter and simple implementation. The design is not meant to be a complex design with regards to the different controllers that are either using sensors or controlling different aspects of the household. There an 8-16 pin chip is all that is desired. Also, the chip boasts not only the lowest power consumption on the market, but also a micro-second wakeup clock. Using the chip's built in sleep mode will be a major part of the project and is therefore a major reason why the group had decided to use the MSP430. Texas Instruments Stellaris: This component was the final choice to be used as the main processor, for many of the same reasons as to why the MSP430 was chosen. However, this chip has much more complexity, with a one hundred pins and a large number of input output pins. The main features of this chip that contributed to the group choosing to use it as the workforce of the system P a g e | 21 includes its many built in features, its low power consumption, and its hibernation scheme. The chip's built in features include its built in analog to digital convertor, it's I 2C peripherals, its built in web interface, and its Ethernet output pins. The design will not look to have any analog inputs to the main processor; however, in the event that the group needs to hardwire different components of the system as the design gets into the build phase, having the analog-to-digital convertor could end up being used in the design. The I2C peripherals are what the group plans to use to send the signals back and forth between the main processor (Master) and the different MSP430's (Slaves) reading input and controlling electronics. Having these peripherals built in makes implementing the system much easier. The build in web interface is a very useful feature, as the group will look to use this feature in order to broadcast the status to the internet, as well as allow the user to control the system. The Stellaris will effectively act as a server, only broadcasting when not in hibernation and the user is trying to access the system. Finally, the Ethernet pins creates an easy implementation of hard wiring the processor to an Ethernet jack in order to send a signal to a router and broadcast it to the internet. Texas Instruments has an Ethernet jack on their evaluation board, as well as a detailed technical explanation and schematic of how it was implemented, which allowed the group to follow their design when implementing the Ethernet to router setup.[10] The Stellaris' main appeal, similar to the MSP430, is their ultra low power consumption. They offer a chip designed to be put into lower power consumption through the use of their hibernation scheme. The system can be configured to allow a system of interrupts to drive the system and place it back into hibernate when it is done executing instructions. This is ideal for the design, as it should consume as little power as possible, therefore placing the processor in hibernate as much as possible. When the processor is in hibernate, if hooked up to a lithium ion battery can run for years on sleep mode without running out of battery, therefore avoiding drawing any power while in hibernate and also not forcing the user to consume any power while in sleep mode. The low power features are the basis of the group's decision of using the Stellaris. Printed Circuit Board: The printed circuit board will be designed during the build phase. The reason for this is the need to verify the validity of the design before building the PCB. However, it is known by the group what are the designs basics. The group will look to build a simple board, either four or six layers, depending on the needs of the project. A six layer board is preferred because the group will look to create a grounding plane to dissipate any heat, as well as a high power plane for any high power lines that are needed when conducting the electronics control. In the design thermal vias will also be used when needed to help with heat dissipation. The board will use differential pairs to help reduce noise on the lines that are sending similar signals. The board will have horizontal and vertical routing layers to also help prevent noise. The board will avoid any P a g e | 22 obvious issues through the use of using arched traces instead of "T" shaped traces whenever possible, not making any trace bends less than 90º, and reducing as many irregularities and trace length whenever possible.[7] RF Transmitter: For the RF transmission, the design will be using the Texas Instruments CC1150. It is perfect for the design's application for several reasons: it is lower power, it is within the frequency range that is desired, and not many external features are needed. The current consumption by this component is typically under 16 mA, depending on frequency of the signal. However, no current greater than 16 mA is needed for any broadcast frequency. Both the 400-470 and 902-928 MHz frequency range can be used for these chips. Finally, the transmitter needs no external filters to use the chip, only an antenna to send the signal. RF Receiver: The Texas Instruments CC113L is very similar to the Texas Instruments CC1150. It is a value line, low power RF receiver, which also operates in a similar frequency range. It offers the same features desired by the project in regards to its lower current consumption, its frequency, and its simplicity. The current consumption by this component is typically under 18 mA, depending on frequency of the signal. However, no current greater than 18 mA is needed for any frequency it will be sampling. 3.4 Possible Architecture Three major schematics can be used to accomplish the desired sensor input and processing. The first, Figure 3 (a), is accomplished with a generic microprocessor with enough pins to handle the inputs of four analog to digital converters. This setup will require more power to drive all the converters but will allow for a less powerful microprocessor to be used. Another plus with this setup will be that all the sensor hardware will be the cheapest amongst the three; as all of the decision making will be done by the microprocessor. This setup will also cause some trouble when it comes to the converters drawing power when no sensor input is needed. The second design, Figure 3 (b), uses a prebuilt passive infrared and temperature sensors in place of more converters. Many packages can be purchased that have all the required converting and logic worked out, so all that is required of the microprocessor is to read one incoming logic bit. There are several benefits and drawbacks to using prebuilt sensors. The biggest benefit is that they can come with lenses for detecting a wider range. Another is that because it is a pre-built product, most if not all of the bugs will have already been worked out. The significant drawback is that the specifications of the product are set in stone; if a sensor is not found that matches the requirements exactly, then cutting corners or going back to the previous design would end up being the only options. P a g e | 23 The last layout, Figure 3 (c), uses a class of microprocessors that come with a built in analog to digital converter. This design, assuming that prebuilt infrared sensors can be found to match specifications, will not require any fooling around with external converters. This setup will require a specific kind of microprocessor, but the number of input pins is reduced drastically from the previous designs. If possible, this setup would be ideal due to the reduced number of external chips required to connect and debug. a) Micrprocessor A/D converter A/D converter A/D converter A/D converter Amplifier Amplifier Amplifier Amplifier Room PIR Door PIR microphone Thermometer b) c) Micrprocessor Micrprocessor With built in A/D Prebuilt Prebuilt Room PIR Room PIR Amplifier A/D converter Prebuilt Prebuilt Prebuilt Prebuilt microphone Door PIR Amplifier Door PIR Thermometer Thermometer microphone Figure 3: Possible Sensor Processing Designs In the first Main Processor Design, Figure 4, the Processor will read in input and send output through the same transceiver. Using this design, the RF transmitter and receiver are condensed into one, making the need for less electronics. However, with this design, there is the possibility of signals being crossed in the transceiver. Also, in the event that the transceiver is trying to transmit and receive at the same time, complications can arise. For the prototype, the group finds the design in Figure 5 more ideal, utilizing the use of an RF transmitter and an RF receiver. P a g e | 24 Router Connection (To Internet Interface) Main Processor Input Output RF Transciever Figure 4: RF Transceiver Design Getting to the design in Figure 5, this is the design desired. Through this, the design can separate the input and output signals. Despite the decrease in components in combining the two, it would be better to keep out signals separate and even on different frequencies for the sake of not misinterpreting the signals. The design is an overall design, with the RF communication handling the input and output signals and a hardwired line to a router, broadcasting the signal to the internet. Here in Figure 5, with a more detailed design from Figure 6 can be seen. Router Connection (To Internet Interface) Main Processor Input Output RF Reciever RF Transmitter (From Sensor-Processors) (To Light/Electronic Controllers) Figure 5: Main Processor Design with RF Transmitter & Receiver With the design, to help reduce noise an RLC band pass filter will be applied which will filter out any signals that should not be received by the processor. Also, a digital signal conditioner will be used to process the digital signal being sent out by the processor and translate it into an Ethernet signal that in turn can be processed and broadcasted to the internet by the router. This design can be seen below in Figure 6: P a g e | 25 Router Connection (To Internet Interface) Main Processor Digital Digital Digital Signal Input Output Conditioner (To ethernet) RF Transmitter RLC (To Light/Electronic Filter Controllers) RF Receiver (From Sensor-Processors) Figure 6: Possible Main Processor Designs Even though relays and contactors are simple to use, the implementation into this project may be more difficult. If the number of rooms, and subsequently the number of outlets, is low it is possible to assign each to a pin on the brain. However, because the large number of pins needed to control each and every outlet or fan may not be available, a method to retain the desired signal is necessary. The first method considered was with the use of logic gates. Figure 7a is a general schematic of the circuit using a simple D flip-flop; from which it can be seen that it would be able to retain the desired signal whenever a pulse is sent from the brain. Figure 7a: D Flip-Flop Design Another method would be to use a microprocessor. Even though implementing another microprocessor just to retain a signal is overkill, they are usually designed specifically for low power consumption and are therefore a viable route. This would allow a second signal to be sent to the outlet: one to tell the microprocessor that the state of the outlet needs to be changed, and another to tell the microprocessor what state to set the outlet to. Figure 7b shows a general structure schematic that could be used to accomplish the projects goals. P a g e | 26 Figure 7b: Microprocessor Design 3.5 Future Implementation There are many possible future implementations for the project, with some being extra features for the user, others being ways to improve efficiency, and others better ways to interface the system, to its individual components and to the user. Some of these future implementations include heightened security features, "smart" control for high energy devices, phone applications, audio/video features, touch screen control, and simpler user installation. Given more time and money, more sensors to determine if there is a person in the room would always be a good addition. An option for expanding on what is already there is to add the ability to record the information coming in from the microphone. Additionally, video cameras could be placed in all the rooms to add to the security side of the system. The server would then have to be upgraded to allow mass storage and streaming of the audio and video. Another infrared motion sensor on an adjacent wall would increase the chances of detection. Light sensors could be added to monitor the light intensity throughout the day and adjust the lights in the room accordingly. A sensor could watch for when the sun is shining through a window and close the blinds when it is. This would lower the incoming heat and thus would lower the power cost of the air conditioner. With more money, the group can always add more modules to give users more feature sets. The sensors are what drives the system, so with more sensors, more input can be received. The more input the system can receive to track what is going on in the household, the more the design can allow the system to adjust to the current condition of the household and react to these changes. When outside lights being used are reaching the point where it equates to the same amount of light being generated by the electric lights, why not ensure these lights are not being used when they are not needed? The system should take advantage of the natural energies the earth provides. The system should react to outside temperatures, using the cooler air from the outside to cool the household when the weather is cooler rather than relying on the AC when it is not needed. The end game of these sensor inputs is to function seamlessly with both the user and nature to benefit the user and to use all natural resources in the most efficient way P a g e | 27 Another large addition that could be made is a graphics based user interface panel in the house. As of now the only way to change the settings or monitor the system is via the internet; even though that meets all of a user's needs, it would still be useful and handy to be able to access it without a computer. Along this line, the next thing to be added would be a smart phone app. Everything seems to be moving in the direction of mobile devices, so it is only logical that this project would as well. The user interface is a key portion of the project, developing more improved user interfaces that cater more to the user is a natural improvement of the prototype. The user should be able to customize the system to allow the system to adapt to the user, rather than forcing the user to adapt to the system. One main context of the project is the use of a smart home to allow improved home security through modern technologies. The current feature sets include an automated lock, a security camera to monitor the entrance, and a log of when someone has entered and exited the household, what time, and if anyone is currently present in the household or isn't. Security features for the project will be prototyped with a lot of nice to have features left off. Implementing surveillance cameras around the residence in different strategic places around the outside of the home is a big piece of the surveillance. With these cameras, they can be automated to alert the user when someone is detected in an area, and notify the user via text message or anyway else. All the cameras can be set to only activate upon another sensor being tripped in order to keep cameras in a "sleep mode" in order to conserve energy and keep the cameras from eating up extraneous amounts of power to observe nothing of value. Another security feature to implement with these cameras is to be able to wake them up and view them from a central control location as well as the touchpad controller. The group would like to make these features to create an environment that can replace the common alarm system most households have. With creating an away mode, it would even be able to be configured to have the household call 9- 1-1 if the away mode is not deactivated within a certain threshold of time when someone enters then house, and alert all household residents via cell phone when someone enters the house; someone is detected around the house, climbing in windows, etc. One area the group would like to enter into, given more time and funding, would be audio/video features. One feature would be to set up an audio system that allows the user to play different audio in different rooms. This would be a very desirable feature for those with large households who like to hold parties and "get- togethers" at their household and would like to provide different mood music depending on the room. Another feature would be to allow the user to play music from a portable device, like a phone or an iPod, from the main control center, as well as conventional audio like CD's and radio. Room to room two way communications is a nice feature that many households have that could be incorporated into the system as well. A difficult but future audio design would be P a g e | 28 to set up a control system to change the volume level of different devices based on the background noise in the room. This would have an algorithm that would not only adjust the audio so that it would play louder if external noise in the room requires it, but also to recognize when the volume should be turned down because conversation is taking place in the same room as a device with audio and instead of the user having to turn the volume up and down when conversation is taking place, the audio would change seamlessly. 3.6 Objective Realization In working on this project, the prototype has three main objectives. The first main objective is to reduce energy consumption in the household which is important for many reasons. The second main objective is to make it easier to use of consumer electronics in the household. The third and final main objective is to improve security in the household. In reducing energy consumption, the major problem is to implement a system to save energy but to not let it be so cumbersome as to actually increase energy use. To this degree, the group has decided to use components that consume as little power as possible in order to run in order to not negate the energy savings by these electronics' power consumptions. The average household, according to the U.S. Department of Energy in 2001, use 29.2 kWh per day. Per the department of energy, here is a breakdown of what different household electrical devices consumed what percentage of the household's power, as can be seen in Figure 8. Figure 8: Percentage of Electricity Consumed The components consuming energy in the household the project would like to impact are air conditioning, lighting and home electronics. Even though kitchen P a g e | 29 appliances have the largest percentage of household usage, lowering energy use with these devices requires smart energy usage rather than cutting energy usage through turning appliances off when they are not in use. Lowering energy uses through smart energy uses requires another project in itself and is a future exploration of the prototype but is not the current object. However, the uses the project is looking to decrease account for a total of 32% of household energy, using the system to cut down on time when electronics are not in use but consuming energy. Considering the average household uses 29.2 kWh per day, the percentage the system is trying to decrease uses 9.34 kWh per day. Progress Energy, a common energy provider here in Florida, charges Orlando users 10.76 cents per kWh. If the system can lower this amount by a net value of 3 kWh, then the system saves the user $9.68 a month. If the system can cut this value in half, then the system can save the user $15.08 a month. These figures do not take into account the price of energy when the user goes over a certain threshold and is charged more per that threshold. For Progress Energy, their threshold is at 1000 kWh per month. For the summer months, it is not uncommon for a household to go over their threshold and with Progress Energy a household would pay 12.85 cents per kWh. For a household where, during a summer month, the household consumes 1300 kWh of energy for the month, 416 kWh are used by the devices the design is looking to lower their usage. If the system cuts this value in half, the system saves the user $26.73 per month. So it can clearly be seen that if the group can meet the objectives of cutting down energy uses in these strategic devices, extrapolating out these value the group has cut out, even with a meager savings of $9.68 a month, the system can save the user $116.16. The group will look to view the energy uses and compare based on real values to demonstrate that the system can save the user even more. These energy uses numbers from the department of energy the in fact 10 years old, so using real data will help display more realistic results expected from using the system. But even with the lowest estimates, it can still be seen that the user can save a considerable amount of money. [1] [11] Another objective the project looks to address is easy user use of various electronics within the household. It is very common today to see a home entertainment unit consisting of several different components that require several different controllers to turn on. However, with the system, the user will be able to, using their touchpad remote, turn on all their different electronic devices from one source. This will makes using home electronics simpler and more convenient. But the system is not meant to be a replacement for a universal remote, because those already exist and the group would not spend countless hours on looking how to devise a universal remote. With the system, any electronic device can be configured on or off, all it needs to be controlled is to be plugged into one of the system's outlets, and configured so that the user has named the outlet on the interfacing end so the user knows what they are controlling. Now in addition to this, the user has even more ease in the sense that the user can turn lights on and off within the household as long as the user has the remote in their hands. Now, if the user is not home but would like to turn P a g e | 30 on a device in preparation of their arrival home, whether it is a door light or the coffee maker, the user has the convenience of logging onto the website and configuring any device they choose. The only sense the user needs in the system is whatever he or she decides to name their devices, as all of the outlets are already configured to be controlled from the main controller and viewed from the website's interface. Through all these different methods of access, the system creates a huge interface of electronics within the home, making control of electronic devices within the home very easy, very simple, and much more efficient. The third approach of the system is to help increase security for the user. In the present day and time, home security is always needed no matter where you are. For some, a simple alarm system is sufficient. For others, they are not happy until their house is safer and better secured than the oval office. The system provides security for both those interested in a simple security setup, to those looking for more can have heightened security measures. Through the use of video surveillance, the user will be able to see who is at their front door, as well as be alerted if someone is standing out in front of the door. The system can alert the user via the touchpad, when the user is inside the home. The user can configure the system, whether they wish to set it to be armed in an away mode, a normal mode or a low security mode. In addition to sending alerts to the user via the touchpad, the system can be configured to alert the user via text message if the user would like. The user can also configure the system to alert 9-1-1 when the system is away mode and an intrusion into the household has been encountered. Whatever the user would like is up to them. On top of all this, the user can view a status of the household, a log of comings and goings, and a live feed of the camera at the front door. With all of these features at the user's disposal, the group feels like more than adequate security is being provided to those using the system. 4.0 Project Hardware & Software Design Details 4.1 Initial Design Architectures There were multiple design architectures that were considered for this project. One of the main objectives of this project was to reduce energy consumption by automatically turning off non-essential appliances when the room that those appliances were located in was not occupied. A simple motion sensor in each room would not work because a motion sensor would not register any activity in a room after someone stops moving, for example if someone entered a room and laid down to watch TV. One could mark that room as occupied once a motion sensor gets activated, but if someone leaves that room and enters another room, the motion sensors in both rooms would be activated, and it would be difficult to determine which room was occupied. This fact dictated that a legitimate process for determining if a room was occupied or not had to be created. P a g e | 31 The first design architecture included keeping a count of number of occupiers in each room by monitoring the number of people crossing through each doorway. Sensors would be placed on the outer edge of both sides of each doorway, so if the doorway sensor was activated on one side of a doorway and then the sensor was activated on the other side of the doorway, then it would be deduced that a person was leaving the room where the first sensor was activated, and entering the room where the second sensor was activated. This process, if implemented correctly, could produce an accurate room count for each room. The problem with this architecture was that after further analysis, it was decided that trying to keep a room count over a long period of time would leave the process open to large errors. Even rare errors could build up over time to produce room counts that were extremely erroneous. After more consideration, determining whether a room was occupied based on the most recent sensor input data proved to be a more feasible architecture. There is a motion sensor set up in each doorway, so if someone goes through a doorway, the doorway sensor is tripped, and the data signal is sent to the main microcontroller. Once this occurs, the main microcontroller waits for sensor input activation from both of the rooms that share that doorway. Once one of the rooms sensors are activated, that room's lights are turned on, and the other's is turned off. If at any time the sensors of a room are activated, that room's lights will turn on, and stay on until one of that rooms' exit door sensors is tripped, and no activity is registered from that room. The other method of reduction of energy consumption is turning fans on instead of the more costly alternative of air conditioning. The design architecture has never changed as it is an easier concept to implement. In each room, there is a temperature sensor, and if the temperature goes above the desired threshold, the fan will turn on. Once the temperature drops below the threshold, the fan will turn off. The only design consideration was where to be able to control the temperature threshold. Since the main control was initially going to be set in a graphical user interface residing on the main microcontroller that would be accessible via the internet, it was first decided that the temperature control threshold would be available only through the internet. After further consideration, it was decided that there would be a temperature display in each room where the user could view and adjust the temperature setting for the room specified. There were multiple architectures considered to turn the outlets on and off. The design architecture that was settled on included connecting the microcontroller to a relay which, which is then connected to the outlet. This proved to be the safest, most effective, and most energy efficient architecture to control the state of the outlets. P a g e | 32 4.2 Main Processor (Main Microcontroller) The main processing unit of the system will be the Stellaris® LM3S8962 Microcontroller, which will be located within the main processor and handle the majority of the system's "thinking" and execution. The Stellaris model the group has chosen is ideal for the system to do its low power capabilities, with the processor having the ability to be put into a sleep mode and can run in sleep mode for up to three years continuously off the battery power of a watch battery. The controller also implements a nested vectored interrupt controller, which is ideal for the system. With this processor, keeping it in sleep mode as often as possible is very important and uses an interrupt system to pull it out of sleep mode when it is needed to execute instructions as transmitted by the sensor controllers and then process these and send instructions to the lighting and power controllers. When all of this has been handled, the design will want to quickly and efficiently put the processor back into sleep mode after it posts any necessary information to the internet interface via the router. The system comes equipped with two watchdog timers, which the design can use to prevent any safety issues when handling the outlet power control. It also comes equipped with both I2C peripherals and UART. An overall glance at the system can be seen in Figure 9. Here the design is utilizing several of the key features, with many of the features that are outlined above but haven't been implemented to be set up later down the line in the project, time permitting. The schematic utilized the use of a 32.768 KHz crystal oscillator to perform the system clocking for many of the IC's being used in the system. The group wanted to use the same clocking for as many different IC's as possible and using the same external crystal oscillator for these different systems will allow the design to synchronize the timing between hard wired chips. Below the different feature sets will be zoomed on and explained in more depth. The main systems configured in this setup is the configuration of the Ethernet jack circuit, taking advantage of the external peripherals built in for an Ethernet connection; the RF transmitter, transmitting the signals over the I2C protocol and connected to the 32.768 KHz crystal oscillator for its external clock; the RF receiver, configured in a similar manner as the RF transmitter; and the hibernate configuration, utilizing an external battery source when it is in sleep mode and an open drain circuit to allow external wakeups to be called. Seen below in Figure 10 is a setup for a 10/100BASE-T Ethernet Jack, which was the recommended setup by the Stellaris datasheet. This interfaces 6 data lines, and 2 LED lines, with the data lines functioning as a transceiver. The part itself also is set up to filter out noise, as well as the data lines are set up with RC filters to reduce noise as well. This setup is a must have for the processor for the prototype to broadcast the server created by the processor to the internet to allow for access from anywhere at any time. What is not shown in the schematic is that the jack will be wired with an Ethernet cable to a router to broadcast the IP P a g e | 33 address. VCC will be shorted to one source, as well as all grounds will be shorted to one ground. Figure 9: Main Processor Schematic Overview Figure 10: Main Processor Ethernet Jack Schematic P a g e | 34 The signal will need external data to trigger a wake up, and from there will follow through a series of If statements to determine what to define the parameters as. From there, the code source will create an event that will call a specific interrupt routine after being interpreted by the interrupt handler. The pseudo code for sending out the IP address can be seen in Figure 11 below: Figure 11: Router Signal Flow Next, observe the configuration of the hibernation module of the Stellaris in Figure 12. Here, the hibernate pin will be driven by a simple voltage regulator. When the voltage regulator is active, it will drive the hibernation pin to active low, causing a system wake-up. The wakeup pin will be configured to an open drain circuit, allowing a high signal to hibernate to wake up the system. The clock will be driven by a 32.768-kHz external crystal oscillator, with this same clock driving multiple components of the system. The crystal oscillator will also function as the clock for the RF transmitter and RF receiver, allowing them to be driven by the same clock cycle. For power savings, the design will configure the processor to run off a small lithium-ion battery when it is in hibernate. Because of its low current draw, this is ideal and the processor could run continuously in hibernate off of the battery for 3 years, so considering the processor won't be continuously in hibernate but as much as often, running off of battery will be ideal and not lead to a constant need to replace the battery. P a g e | 35 Figure 12: Stellaris Hibernate Module Schematic Below can be seen the flow of the interrupt system in Figure 13. The interrupt routine will do the main work of the system. It will take in the different interrupt calls, whether they are external or internal, process what instruction needs to be conducted, pull that instruction set from the memory, and then execute those instructions. The Interrupt Handler will execute all instructions until the Interrupt Handler has no more interrupts to service. Once all interrupts have been serviced, the system will them update the status data, internally and externally as needed, and then place the system back in hibernate. The more efficiently the system can execute its instructions, the sooner the system can return to sleep. The systems efficiently should lie in how quickly it can execute these instructions and then quickly place the processor back into sleep mode in order to save power consumption. The flow of the interrupt handling system can be seen below: P a g e | 36 Figure 13: Interrupt Routine Flowchart The other main aspect of this system is the RF communication system. When the group is building the system, the group will first test and debug the system as a wired system and then ultimately unveil the wireless system of communication, which will follow the design below in Figure 14: Here is the RF receiver, which will be built from Texas Instruments' CC1130 and a solder mount antenna from Vishay. The part is made to send signals with the 400-900 MHz frequency range. These is ideal for the system, as the system will be sending simple signals and want a part that will be consuming a low amount of power. Texas Instruments' value line RF receivers and transmitters are great for low power applications such as the groups. The design will use a frequency of approximate 400 MHz or 902 MHZ, with the first three bits being used for a P a g e | 37 digital handshake to confirm the receiving of the signal and then 10 data bits following and a parity bit. [2] Figure 14: Main Processor Wireless Transmission Schematic Below can seen the design behind the RF transmitter, running on the same external crystal oscillator as is being used throughout the system and implementing a similar design as the RF receiver. Viewing the schematic below in Figure 15, the design strategy employed in the RF transmitter being employed again can be seen: Here can be seen the RF transmitter. This setup is very similar to the receiver, only it will have additional filters for the outgoing signal. The component used will be the Texas Instruments CC1150. The antenna will be the same as the receiver, using a Vishay solder mount antenna. [3] 4.3 Wall Unit Sensors: It was determined that the Panasonic NaPiOn series passive infrared motions sensor would be used for the doorway. Table 2 has a list of the specifications for this series that made it the sensor of choice for continues operation. P a g e | 38 Figure 15: Main Processor RF Transmitter Minimum 3.0V DC (2.2V DC) Rated operating voltage Maximum 6.0V DC (3.0V DC) Rated current Typical 170µA (46µA) consumption (standby) Maximum 300µA (60µA) Output current (when Max 100µA detecting) Typical 7s Time till stable output Maximum 30s Table 2: Sensor Specifications The values in parenthesis are the low current type; so it is easy to see that these sensors are built for low power consumption. The spot detection model has a very narrow scope and was therefore determined to be the best model of the series to be used. This model has a scope that is about twenty degrees away from where it is pointing. Despite this being one of the narrowest options available as it is, the package it comes in is shaped to be easily mounted deep within something else, making the range even smaller; perfect for what is required in this project. Another useful advantage to this series is that the minimum temperature difference required between a person and the surroundings is only four degrees Celsius; which allows accurate readings even in the summer. The motion sensor chosen for the room is also from the NaPiOn series. This sensor needed to have a much wider detection angle, a much longer detection range, and have a very quick settling time [14]. With those requirements in mind the model that fits the best is the 10m detection type. The desired angle for P a g e | 39 detection would be a full 180 degrees; however, no one sensor can accomplish this, so two sensors will be used. Figure 16 a) shows the angle of detection for one sensor, while Figure 16 b) shows two sensors used together to form a complete view of a room. When using two sensors together it does create some overlap and there is a small blind spot directly in front of the sensors, but this is a much more desirable outcome then not getting the full room in its scope. Unlike the other sensor which just has to detect the short range across a doorway, this sensor will need to be able to span great distances if it were installed in a family room. As the name implies, the range on this model is 10 meters; which is more than enough to cover any reasonable size rooms. The last important specification is the settling time. The room sensors are only going to be turned on when someone trips the door sensor. With this being the case it is extremely important that the sensor can turn on quick to begin reading for signs of motion. Figure 16: Motion Sensor Viewing Radius To avoid lengthy code and the hassle of programming protocols for communication between a digital thermometer and the microprocessor, it was decided that an analog sensor would be used. The TMP36 was the sensor chosen to be implemented. This sensor operates on 3 to 5 volts, making it ideal for usage alongside the other voltage peripherals. The TMP36 outputs a voltage that is linear to the centigrade input. The range of temperatures expected to be encountered are between about 60 and 105 degrees Fahrenheit, which can easily be converted over to centigrade to give about 15 to 40 degrees. This range of temperature inputs translates to an output voltage range of about 0.60 to 0.90 volts, which is more than good enough for the input to the MSP430's analog to digital converter. The expected range was pulled out, focused in, and displayed on the graph in Figure 17. [1] P a g e | 40 An electret microphone was picked to fulfill the needs of the project due to its size, simplicity, and cost. The microphone chosen was the CMA-4544PF-W by CUI INC. The microphone operates on a source of 3 to 10 volts, which fits perfect into the low voltage circuit being designed. This microphone has signal- to-noise ratio; reaching as high as 60dBA at 1 KHz operation. The microphone also has a frequency response range matching that of the average human hearing: 20 to 20,000 Hz. Figure 18 shows the schematic for the microphone that will be used. Figure 17: Temperature vs. Output Voltage Amplifier: A simple two stage amplifier is shown in Figure 19. The final output amplitude of the microphone will determine how much amplification is needed and the exact values of the parts. The resistors and capacitor being generic parts will be picked based on the standard values for power and tolerance. The OPAMP however will be the Texas Instruments OPA2363AIDGSR. This OPAMP is a low power chip that operates down to 1.8 volts and draws around 10mA. It also has a typical CMRR of 90dB, advertised specifically for driving analog to digital converters. P a g e | 41 Figure 18: Electret Microphone Figure 19: Amplifier Circuit Microchip peripherals: The MSP430 is the most power efficient processor ever built, however, this does cause an inability to provide enough current to be able to drive anything. To save power, many of the peripherals will normally be off when not in use and then turned on when they are needed. Pins on the MSP430 will provide the appropriate logic voltage for things that need to be turned on, but they will not be able to power things by themselves. Therefore a buffer will need to be used. The SN54HCT541 by Texas Instruments will be used. This buffer can operate at the required low voltage and draws 80µA max even when driving peripherals. The input only needs 1µA of current which is perfect for the P a g e | 42 microcontroller. There are eight signals that will need additional driving power: the amplifier for the microphone, the motion sensor for the room, the thermometer, the two shift register chips, and the three output signals to the brain to turn things on or off. This is accommodated perfectly by the eight buffers on the one Texas Instruments chip. The addition of any display skyrockets the number of I/O pins needed, and as the MSP430 has fewer pins then most microcontrollers, this posed a large problem. The desire is to display two decimal digits to indicate the reference temperature that the room temperature is compared with to turn on the fans. The smallest number of pins needed to brute force such a task was found to be about fourteen. A method was found however to do the same job with less than half that number of pins. That method is to use two 8bit shift registers; with each chip connected to one of the display digits. There is a cost for saving pins and it is at the expense of a more complex code; a protocol will have to be written to interface the MSP430 with the shift registers to display the desired output. The CD54HC164 is one of Texas Instruments' 8bit shift register that is designed to be low power and operate down to 2 volts. Another valued specification is the high speed. Even though the specifications far exceed what is needed for this project, this chip is able to be run at speeds up to 4MHz. Hardware peripherals: The desire is to be able to display the temperature that the MSP430 uses as the threshold value when deciding if the fan should be turn on or off. This requires that two integer values be available to allow an output of 00 to 99. There should never be a time when the user will need a range outside of 60 to 80 degrees Fahrenheit, however, should the user decide they want the fan permanently on or off all they would have to do is drive the value to an extreme. In the interest of power efficiency a LCD display will be used. Displaying graphics on a LCD screen requires a very expensive display and a lot of advanced protocols like I2C and would pretty much be overkill for this project; instead, a simple two digit seven segment display will be used. Each of the two seven bit numbers will be connected to the outputs of the shift registers. To turn on any segment, all the segments before it would have to be switched on in turn as the logic signal propagates through the shift register. The ideal will be that the MSP430 can load the shift register will the code corresponding to the numbers 0 through 9 faster than can be seen. Two buttons will be used to allow input from the user: one to turn the threshold temperature up, and the other to turn it down. The MSP430 happens to have a vast library for capacitive touch interfacing, so it was decided to go this route. Capacitive buttons remove the need for moving mechanical parts thus leading to a much longer life. Operations of the MSP430: To allow parallel processing of the temperature and occupancy detection and to allow the user input and display of the threshold P a g e | 43 value, two MSP430s will be used. The first MSP430 will be in charge of monitoring the doorway, and determining if someone is in the room when the doorway sensor is tripped. It will also have two output signals: one to tell the main processor whether to turn the lights on or off, and one to use as an interrupt to tell the main processor that the state of the room has changed. Figure 20 shows a general schematic of the microprocessor and the peripherals that were explained in more detail earlier. Following Figure 20 is the flow charts and their explanation for the operations of the occupancy MSP430. As can be seen in Figure 21 a), the main body will not have much code in it; to improve the power efficiency, most actions will occur in hardware interrupt routines. On startup the MSP430 will define a variable that will be use in the interrupt routine and then runs a function to initialize the directions and purposes of all the I/O pins. It will then run the interrupt routine to determine if anyone is initially in the room. Interrupts will be enabled so the door sensor can pull it out of sleep and start the routine. And finally the MSP430 will go into a power saving sleep mode until something happens. Figure 20: MSP430 Audio/PIR Sensor P a g e | 44 The function Initialize pins does all the necessary set up work of the MSP430 before it can do anything. All the input pins for the sensors are set up as well as all the output pins for turning things on and sending signals to the main processor. This can be seen in Figure 21 b). The interrupt routine 1 encompasses the main function of the occupancy MSP430. When the door sensor is tripped it means that the status of at least one adjoining room has changed. Therefore, this code will be run through twice, one in each room, for each door sensor that goes off. The first thing the MSP430 does is send a signal to the main processor to turn on the lights. Next, it will turn on all the sensors, giving appropriate time for everything to settle. Just before it heads into the loop, the occupied variable is set to 0. The MSP430 will then set the variable i to a high enough number that it spends 5 minutes trying to determine if there is someone in the room. If the motion sensor goes high, or if the microphone input reaches a set threshold, the occupied variable is set to 1 and the looping is terminated; otherwise the value of occupied remains 0 and the loop is terminated after the specified time. The MSP430 then checks the value of occupied. If the value is 1, it continues on to the final bit of code. If the value is 0, that means that no one was found to be in the room, so the appropriate signals are sent to the main processor to turn off the lights. The last bit of code is there to turn all the sensors off and return to the main body of code, where it goes back to sleep until interrupted again. All this can be seen in Figure 22. The temperature MSP430 will turn on every few minutes and read the temperature of the room. If the measured temperature is above a set threshold it will send a signal to the main processor to turn the fan on. The user will have the ability through the use of two buttons to change that threshold value. This MSP430 will also be in charge of interfacing with the shift registers to output the threshold values to a screen for feedback to the user. Figure 23 is the schematic of the temperature MSP430, and following it is the flow charts for its operations' interrupts and the counter is started before it goes into an infinite loop and goes to sleep. Once again a function needs to be called to initialize all the pins of the MSP430. The A/D converter needs to be set as an input along with two capacitive buttons. Once again two output pins are needed for sending signals to the main processor. Two pins need to be set as output to toggle the clock on the shift registers. One or two pins, depending on if it can update the screen fast enough, need to be set as outputs to clear the shift registers whenever they need updating. Lastly, two pins need to be set as output to serve as the data lines to the shift registers. This can be seen in Figure 24 b). As can be seen in the flowchart of Figure 24 a), the main body of the code is very P a g e | 45 a) Start main b) Initialize pins Set the Initialize direction of pins pins Initialize Interrupt inputs routine 1 Start sleep Initialize mode outputs Allow pins to start interrupts Return Figure 21: Sensor Flow Diagram scarce, as most of the actions occur in interrupt routines. Along with calling a function to initialize the pins for the processor, a variable is created to store the threshold value of the temperature. That variable is set to 75, which is a pleasant temperature for a room. One of the routines will need to be run every few minutes so a function is called to initialize a counter. The MSP430 is set to allow interrupts and the counter is started before it goes into an infinite loop and goes to sleep. Unlike before, where the only time the MSP430 does something is when the door P a g e | 46 sensor is tripped, this MSP430 runs a routine based on a timer. As such a function is needed to set up the clock, set what time it counts to, and allows it to trigger interrupts. This can be seen in Figure 24 c). Interrupt A B routine 1 i = a very large NO Signal out: Occupied = 0? number lights on YES Signal out: Signal In: Signal out: change motion sensor lights off status YES Signal out: Turn on Input = 1? change external status peripherals NO Turn off Signal In: external Occupied = 0 microphone peripherals YES Return A Input higher then Occupied = 1 threshold? NO i = i -1 NO i = 0? YES B Figure 22: Temperate Code Flow Diagram P a g e | 47 Figure 23: Temperature Controller Every few minutes the counter will reach the set value and activate the routine in Figure 25. The first thing the MSP430 does is stops and resets the counter to 0. It then turns on the analog to digital converter and gives it appropriate time to settle. The value of the temperature is read in, converted to Fahrenheit, and compared to the threshold value set by the user. In order for continual oscillations in turning the fan on and off it the threshold is close to the room temperature, hysteresis will be used. If the fan is on the threshold value will be a few degrees below the value the display shows, and if the fan is off the threshold will be a few degrees above. The MSP430 will first check to see if the fan is on. If the fan was off and the measured value is higher than the hysteresis threshold, the MSP430 will send the signal to turn on the fan; otherwise it continues to the end of the code. If the fan was on and the temperature is below the hysteresis threshold, the MSP430 will send the signal to turn the fan off; otherwise it continues to the end of the code. At the end, the converter is turned off, the counter started again, and the MSP430 goes back to sleep. P a g e | 48 Initialize Initialize a) Start main b) c) pins counter Set the Select clock Initialize direction of for counter pins pins to read from Initialize Initialize Set value to counter inputs count to Initialize Allow counter start counter outputs to start interrupts Start sleep Allow pins to Return mode start interrupts Return Figure 24: Temperature Control Code Flow Diagram The routine in Figure 26 is run through whenever one of the two buttons is pressed. Interrupts are first turned off so the counter cannot break the MSP430 out of this routine, and then the output function that contains the protocol for communicating with the shift register is called. Once the current value of the threshold is displayed the MSP430 set i equal to a value that will make it loop for about 20 seconds, allowing changes to be made to the threshold. If button one is pressed the value of the threshold is increased, and the new value is displayed with the output function. A delay of a few milliseconds is added so just increasing one or two degrees will be easy. Otherwise if the button is held down, the threshold value is free to increase as fast as the MSP430 can run through the output function plus the short delay. In the same way, if the second button is pushed during the 20 seconds, the threshold value is decreased. After breaking out of the loop the final value of the threshold is held for 1 second before the P a g e | 49 display is turned off. Because altering the threshold value may have placed it under or above the current temperature of the room, the MSP430 sets the counter interrupt to start as soon as this interrupt ends. The MSP430 then returns to the main to continue from there. Interrupt routine: A counter NO YES Is fan on? Stop counter YES Is temp > NO NO Is temp < YES Reset counter threshold? threshold? Signal out: Signal out: Fan on Fan off Turn on A/D converter Signal out: Signal out: change status change status Signal in: Temperature Turn off A/D converter Convert temperature to Fahrenheit Start counter A Return Figure 25: Fan Control Code Flow Diagram Figure 27 and 28 display the function that will contain the protocol for interfacing with the shift register, and from there the display. So the MSP430 does not have to go through 99 compare statements, the threshold value is split into two separate digits; lowering the compare statements to 18. However, because it is 18 different call statements the flowchart extends over 2 pages. It first sends a signal to clear the current values of the shift register. It then checks the first digit to find out what it is. Once the value is found, the MSP430 has to sequentially place the bits corresponding to the segments needing to be lit for that value on the input of the shift register. In between each sequential bit the MSP430 will send a signal to the clock input of the shift register, telling it to move everything in once. This process should happen quickly enough that the display will not show P a g e | 50 any nonsense things on the screen; just a clean jump from one value to the next. The MSP430 will then do the same thing with the second digit, thus refreshing the screen to the current value of the threshold before returning back Interrupt routine: A B Push button Signal in: Turn off i = i -1 Button 1 Interrupts Threshold = Turn on Input = 1? i = 0? Threshold + 1 peripherals Signal in: Turn off Display A Display Button 2 peripherals Threshold = Turn on Input = 1? i = large number Threshold - 1 Interrupts A Interrupt routine: Display counter B Return Figure 26: Temperature Interrupt Flow Chart P a g e | 51 A A Display NO NO Lower digit = 3? Lower digit = 7? Split threshold value into two digits YES YES Output Display: Output Display: Send 3 to low Send 7 to low Lower digit = 0? NO YES NO NO Lower digit = 4? Lower digit = 8? Output Display: Send 0 to low YES YES Output Display: Output Display: Send 4 to low Send 8 to low Lower digit = 1? NO YES NO NO Lower digit = 5? Lower digit = 9? Output Display: Send 1 to low YES YES Output Display: Output Display: Send 5 to low Send 9 to low Lower digit = 2? NO YES Lower digit = 6? NO Next page Output Display: YES Send 2 to low Output Display: Send 6 to low A B Figure 27: Shift Register Protocol Part 1 P a g e | 52 A A From previous NO NO page Higher digit = 3? Higher digit = 7? YES YES Output Display: Output Display: Send 3 to high Send 7 to high Higher digit = 0? NO YES NO NO Higher digit = 4? Higher digit = 8? Output Display: Send 0 to high YES YES Output Display: Output Display: Send 4 to high Send 8 to high Higher digit = 1? NO YES NO NO Higher digit = 5? Higher digit = 9? Output Display: Send 1 to high YES YES Output Display: Output Display: Send 5 to high Send 9 to high Higherdigit = 2? NO YES Higher digit = 6? NO Return Output Display: YES Send 2 to high Output Display: Send 6 to high A B Figure 28: Shift Register Protocol Part 2 The microcontroller chosen for the door lock was without surprise, the MSP40; it was the first choice again due to its power saving nature. To avoid lengthy protocols, a keypad will be used instead of card readers. This MSP430 will be in P a g e | 53 charge of reading in a code once activated and unlock the door if correct. The main processor will also be able to send a signal over RF to this chip to lock or unlock the door. The 12 button input from the keypad will be read in from 7 pins. The buttons will be connected in a matrix according to rows and columns to the pins. When a button is pressed 2 pins will be driven to ground, one corresponding to the row and column the button is located. Depending on what two pins are driven to group the MSP430 will know which of the 12 keys were pressed. Figure 29 is the schematic of the lock MSP430. Figure 29: Electronic Door Lock As before, the bulk of the code will take place in interrupt routines. The only task main has to accomplish is initializing the MSP430. This can be seen in Figure 30 a). The function in Figure 30 b) shows the process to initialize the pins. This chip will need 1 output and 9 input pins. Seven of the input pins will be used to read in the data from the keypad while the other two will be for receiving the input signals from the main processor. The only output needed is the motor for locking and unlocking the door. P a g e | 54 a) b) Initialize Start main pins Initialize Set the pins direction of pins Start sleep mode Initialize inputs Initialize outputs Allow pins to start interrupts Return Figure 30: Electronic Door Lock Code Flow Diagram One of the interrupt routines will be for when the main processor sends a signal. This signal will be received in two parallel bits. One will activate the routine; the other will hold the command for the MSP430. Upon waking up the first thing the MSP430 will do is check that second bit. If it is high it will mean that the door needs to be locked, otherwise it needs to be unlocked. Here again the safety measures in the outlet pops up to be appreciated. If noise in the line happens to activate the routine, the chances of noise simultaneously sending a second signal to unlock the door is very unlikely. Upon receiving the signal to lock, the MSP430 first checks the status of the door. If it is already locked the MSP430 will just go back to sleep; otherwise it will send out the appropriate signal to the servo motor to lock the door. If the signal from the main processor was to lock the door, the MSP430 again first checks to see what the status is. If the door is unlocked the MSP430 will just go back to sleep. If it is locked the MSP430 will send out the appropriate signal to lock the door before going back to sleep. P a g e | 55 Interrupt: Signal from brain Signal in: Lock/ Unlock YES Is door NO YES Is door YES Input = 1? unlocked? locked? NO NO Send signal to Send signal unlock door to lock door Return Figure 31: Door Locking Signal Flow Figure 32 shows the interrupt routine that will interface with the keypad. To determine what key is pressed a process much like Figure 31 showed needs to be run through. Because it is such a tedious process it will not be shown again here; instead it will just be assumed that it is known what button is being pressed. One of the 12 buttons will activate this routine. Upon being activated a value for i will be picked that will cause the routine to run about 30 seconds. The MSP430 will then scan through the input looking for a button that is pressed. If the lock button is pressed, which is another of the 12, the MSP430 will output the required signal to the servo motor to lock the door before continuing with what it was doing. The remaining 10 buttons are for the digits 0 through 9. If these buttons are pressed the number corresponding to it will be saved in memory. After the same number of digits are entered as is the length of the code, the MSP430 will compare the two; unlocking the door if they match and continuing on if they do not. It continues on for the 30 seconds for the reason explained back in the possible architectures section: by not giving away the length of the code when it is entered it makes it that much harder for some random person to be able to crack the code. P a g e | 56 Interrupt: A Keypad Data in: Turn off Keypad interrupts i = large number Is it button for YES Send signal locking door? to lock door A NO Is input a YES Store number B number? in memory NO Turn on interrupts Have 7 YES Compare inputted YES Was it the Send signal to numbers been code to code correct code? unlock door inputed? stored in memory Return NO NO i = i -1 YES NO Is i > 0? B Figure 32: Electronic Door Lock Interrupt Routine 4.4 Web-Based Control The website will consist of a logon page and a home page. In order to load the homepage, one must logon first with the proper credentials. The credentials will be saved in a mySQL database. For the prototype, the user will not be storing unique information about their different classes within the user class. However, given a marketable project, the GUI will allow users to both create a logon themselves and store their information from the different classes specific to their user profile within their user class. The classes can be seen below. P a g e | 57 Figure 33: Interface Class Diagram The graphical user interface will be developed and reside on the Stellaris. The Stellaris will act as the web server, and its unique IP address will be the website address that the user will enter into their web browser when wishing to access the graphical user interface. As seen below, when the user types in the web address of the Stellaris, their browser will display the graphical user interface that is loaded in the website files. As the page loads, it will send a request to the Stellaris for the current status of the fans and outlets in each room. The Stellaris will send back that request to the website. Once this occurs, the website will load the graphical user interface with the proper statuses of all of the fans and outlets. The graphical user interface will then wait for input from the user. The flowchart of Figure 34 below outlines the preceding information. When the user makes a selection in the Climate Control Center from the graphical user interface, there will be the following information flows: First the user will select a radio button with either the selection of "Normal" mode or "Override" mode. Once the user clicks the "Switch Mode" button, the website will first determine which mode was selected. If "Normal" mode was selected, the website will grey out and disable the "Turn Fan On" and "Turn Fan Off" buttons for that room on the graphical user interface. The website will then wait for the next input. If "Override" mode was selected, the website will enable the "Turn Fan On" and "Turn Fan Off" buttons for that room on the graphical user interface. If the user then clicks the "Turn Fan On" button, the website will send a signal to the Stellaris to turn on the corresponding fan, and to enter "Override Mode". The website will then wait for the next input. . If the user then clicks the "Turn Fan Off" button, the website will send a signal to the Stellaris to turn off the corresponding P a g e | 58 fan, and to enter "Override Mode". The website will then wait for the next input. The flowchart of Figure 35 below outlines the preceding information. User loads graphical user interface in web browser Web page sends request to Stellaris for current status of fans and outlets in each room Stellaris sends back response of current status of a fans and outlets of each room GUI loads web page with current status of fans and outlets in each room Wait for input Figure 34: GUI Flow Diagram When the user makes a selection in the Lighting Control Center from the graphical user interface, there will be the following information flows: First the user will select a radio button with either the selection of "Normal" mode or "Override" mode. Once the user clicks the "Switch Mode" button, the website will first determine which mode was selected. If "Normal" mode was selected, the website will grey out and disable the "Turn Outlet On" and "Turn Outlet Off" buttons for that room on the graphical user interface. The website will then wait for the next input. If "Override" mode was selected, the website will enable the "Turn Outlet On" and "Turn Outlet Off" buttons for that room on the graphical user interface. If the user then clicks the "Turn Outlet On" button, the website will send a signal to the Stellaris to turn on the corresponding fan, and to enter "Override Mode". The website will then wait for the next input. . If the user then clicks the "Turn Outlet Off" button, the website will send a signal to the Stellaris to turn off P a g e | 59 the corresponding fan, and to enter "Override Mode". The website will then wait for the next input. The flowchart of Figure 36 below outlines the preceding information. User makes selection in Climate Control Center User Selects Radio Button User pushes "Switch Mode" Button Grey out and disable Normal Override Mode Mode Enable on GUI "Turn on GUI "Turn Fan Mode Fan On" and "Turn On" and "Turn Fan Selected=? Fan Off" buttons for Off" buttons for that that room room Wait for next input User clicks an Override Control Button for a fan Send signal to "Turn "Turn Send signal to Stellaris to turn on Fan On" Override Fan Off" Stellaris to turn off corresponding fan, button corresponding fan, and to enter pressed=? and to enter override mode override mode Wait for next input Figure 35: Climate Control Flow Signal Control When the user makes a selection in the Security Control Center from the graphical user interface, there will be the following information flows: If the user P a g e | 60 clicks the "Door Lock" button, the website will send a request to the Stellaris to lock that corresponding door lock. The Stellaris will then send a lock signal to that corresponding door lock. If the user clicks the "Door Unlock" button, the website will send a request to the Stellaris to unlock that corresponding door lock. The Stellaris will then send an unlock signal to that corresponding door lock. The website will then wait for the next input. The flowchart of Figure 37 below outlines the preceding information. User makes selection in Lighting Control Center User Selects Radio Button User pushes "Switch Mode" Button Grey out and disable Normal Override Enable on GUI "Turn on GUI "Turn Outlet Mode Mode Outlet On" and Mode On" and "Turn "Turn Outlet Off" Selected=? Outlet Off" buttons buttons for that for that room room Wait for next input User clicks an Override Control Button for a outlet Send signal to "Turn "Turn Send signal to Stellaris to turn on Outlet On" Override Outlet Off" Stellaris to turn off corresponding button corresponding outlet, and to enter pressed=? outlet, and to enter override mode override mode Wait for next input Figure 36: Lighting Control Flow P a g e | 61 User makes selection in Security Control Center Send info to Stellaris Door Lock Door Unlock Send info to Stellaris Door Control to send lock signal to send unlock signal button to corresponding to corresponding pressed=? door lock door lock Stellaris sends lock Stellaris sends signal to unlock signal to corresponding door corresponding door lock, and that door lock, and that door locks unlocks Wait for next input Figure 37: Security Control Flow 4.5 Electronics Control The following is a potential description of the technology necessary for the electronic controls setup of the smart house technology that can be accessed via the Internet. This setup will consist of two primary elements communicating with each other. The first element will be a server consisting of a microcontroller, Texas Instruments' Stellaris EKS-LM3S8962, interfaced with an embedded Ethernet IC, and a compatible crystal. The second element will be a client computer. The client computer will send and receive data to/from the microcontroller using the User Datagram Protocol packets. The client computer will connect to the server using asp.net or Java applets that will allow the user to view the current status of the various electronics, and allow the user to turn the power on or off on the various appliances by way of a graphical user interface. The interface will include a status area to show what is on and off, and will have selections to make the desired changes for each appliance. The purpose of the remote electronics control is to eliminate the restriction that the user must be in close proximity of the microcontroller. The goal is to design the architecture such that the microcontroller will be able to communicate to a data communication network, specifically the Ethernet network. This will allow the users to monitor and control the outlets and appliances. The most suitable P a g e | 62 network protocol for this project is the Ethernet network protocol, since it has is the most accepted and useful process for data communication for personal computers and other digital devices. Ethernet communication is readily available on many microcontrollers, including Texas Instruments' Stellaris line. As a data communication protocol, the Ethernet is efficient. Ethernet data communication between the microcontroller and a remote web- client is performed using the projects main circuit board that includes the Stellaris and its Ethernet capabilities. The main circuit board will receive commands from the remote web-client and once the microcontroller receives the commands, will send the proper signals to control the electronics. The Stellaris microcontroller will communicate with the remote client by creating, interpreting, sending, and receiving UDP (User Datagram Protocol) datagram packets. A UDP datagram packet is a sequence of binary bits that are transmitted over the Ethernet transmission wire. In the initial phase of the datagram packet, an IP and UDP header bit sequence is transmitted that is comprised of data about the destination address, the packet origin address, and the data checksum. The last phase of the datagram packet is comprised of the data bit sequence. The following shows a generic UDP packet. The UDP is a desirable method of Ethernet communication since the datagram's packet size is smaller than alternate transmission protocols, specifically Transmission Control Protocol (TCP) [12]. Figure 38: UDP Encapsulation It was decided that another MSP430 would be implemented to provide outlet control. When compared side by side with the D flip-flop it was discovered that the MSP430 would be a more power efficient choice. Another reason for choosing the microprocessor was that of safety. If noise in the circuit caused the flip-flop to activate prematurely, a potentially hazardous situation can occur. Because the MSP430 will have two inputs, one to wake it from sleep mode and one to tell it what state to take, this problem is avoided. If noise in the circuit happens to wake the MSP430, the line telling it what mode to take will always be off unless the main processor is specifically sends the on signal. Furthermore, the likelihood of noise both waking up the MSP430 and sending a false on signal is very slim as it will only be on for a few seconds before going back to sleep. P a g e | 63 A complication arises however with the MSP430 and that is its inability to provide a driving current for peripherals. Taking a trip back to Electronics 1 provides a solution; a MOSFET transistor does not need any current to become bias in the active mode. This provide the MSP430 with the means of turning the relay on and off without the use of another buffer. For a relay to function a voltage needs to be placed across it; however, as it is an inductor, once a current is established the voltage drops down to zero. This can be remedied by placing another component, like a resistor, across its two terminals forcing there to be a voltage drop at all times. In the interest of not burning more power, a diode connected the in reverse will be used in place of a resistor. The diode will provide the required voltage drop while preventing any farther losses. To insure the proper state has been assumed, the MSP430 will echo back the state of the relay. This way if the signal from the brain can be held until it knows that the appropriate action was taken. Figure 39 provides a schematic of the outlet control circuit, followed by its flow chart of operations. Figure 39: Outlet Control Schematic The code for this chip will be very simplistic do to the nature of the job it is taking on. Before going into sleep mode the only thing it has to do is call a function to initialize the pins. Once again the function of the MSP430 will be realized with the use of interrupts due to its power saving nature. When the main processor sends the wake up signal, all the MSP430 will do is match its output with the input signal from the brain. All this can be seen in Figure 40 P a g e | 64 Start main Initialize pins Set the Initialize direction of pins pins Start sleep Initialize mode inputs Interrupt Initialize routine 1 outputs Signal in: On/off Allow pins to start interrupts YES Is outlet NO YES Is outlet YES Input = 1? Return off? on? NO NO Turn outlet Turn outlet off on Return Figure 40: Outlet Control Flow Diagram 4.6 Server As stated earlier, the user interface website will have to be hosted on a server on the internet. There are two possible ways to accomplish this: i) install server based software on an existing computer, and connect that computer to the internet. ii) Utilize third party server hosting services. Both possibilities have their advantages and disadvantages. P a g e | 65 The first method, installing server based software on an existing computer, would be the more inexpensive route. The group already has in its possession a computer that could be utilized as a standalone server. This would eliminate the monthly fee for hosting services. Also, no domain name would need to be purchased. The website address that users would logon to would just be the IP address of the server computer. Though this approach is more cost effective, multiple disadvantages do arise going with this approach. First of all, once the website files that contain the graphical user interface and code to interface with the microcontroller are loaded onto the server, the server will have to maintain an internet connection at all times. The issue of where to keep this computer poses multiple problems. If the computer was kept at one of the group member's home, that group member would have to continually pay for the electricity to power the server at all times. Also, the group would be subject to the reliability of the group member's internet connection at home that had the server. Also, in order to work on the server, either the server would have to be disconnected and brought to UCF, or the group members would have to go to the location of the group member's home where the server was. If the server was disconnected and brought to UCF, connecting it on campus would bring its own set of challenges. Also, if for some reason the power went out where the server was located, this would bring down the whole project. Finally, setting up a server from scratch would add a whole other element of challenges, and introduce a brand new learning curve for the technology. The second method, utilizing third party hosting services to host the required website files, would definitely cost more money. A domain name would have to be purchased. Also, the monthly hosting fees would add up and increase the budget. Although the monetary investment would be greater using this approach, there are clear advantages using this approach. First of all, third party hosting companies have extremely reliable hosting uptime. They employ multiple layers of backups and fail safes that could never be duplicated by a student senior design project. Their internet connection availability and extremely low risk of loss of power due to multiple layers of backups significantly decrease the risk of project issues to due website reliability. Also, their servers are already configured, so no group member would have to configure and set up a server. The only learning curve would stem from interfacing with the third party's hosting platform, i.e. uploading files, configuring domain names, utilizing compatible development platforms/databases etc. After considering the pros and cons of both creating and configuring a server and using a third party hosting services, the decision has been made to utilize the third party hosting services. The reliability and simplicity of the third party hosting services outweighed the slightly lower cost of creating a server. The question then becomes which type of third party hosting services to utilize. There are many different types of web hosting plans available in the today's P a g e | 66 current market. The choice of an acceptable provider depends on the type of website and features that need to be hosted. It was discovered that some of the most common web site hosting types are: shared, free, and dedicated hosting. For example, free web hosting services, place ads on the user's web pages and would normally be cumbersome and annoying for visitors. The other types of web hosting provide better support, a wider variety of options, and significantly more bandwidth, but charge a monthly fee. Free hosting is the most basic web hosting service. It is common to have banners ads on these types of website hosting services (for example Geocities or Angelfire). This in and of itself would not be a hindrance since the success of this project does not depend on random users logging into the website (if the project was a legitimate e-commerce website, banner ads might possibly affect credibility, since users might wonder why a company couldn't even pay for its web hosting services). The type of domain one usually receives with free web hosting is usually a sub-domain (yoursite.webhost.com) or a directory (www.webhost.com/~yoursite). Once again, this would not necessarily be a problem, since this project is only meant to demonstrate functionality (if this project were to be developed commercially, a sub-domain website would be unacceptable as this would once again diminish credibility). With free web site hosting providers, one must make sure that the hosting services are legitimate, safe, and provide a level of service that would be required. This aspect would already make free hosting suspect, since the main reason that third party hosting was chosen was to take advantage of the reliability. The final determining factor that makes free web hosting not a viable option is that most free plans do not provide users with databases hosting or the ability to run any scripting language. Database access is a requirement for this project, as it will be used to keep track of the status of the different outlets and appliances that are turned on at any given time. Scripting languages will also be used extensively for the database access, as well as for other parts of the functionality of the website, and the communication system. Shared hosting is much more popular web hosting plan. Shared web site hosting allows more than one website to be hosted on the same server. In this scenario, the web hosts provide the system administration and the server maintenance. This holds the advantage of significantly increasing reliability. The hosting company is in the business of providing reliable hosting services, and they will be able to have substantial backup processes and fail safes in place. Also, since the web hosts provide the system administration and server maintenance, the process becomes much simpler. Other benefits of a shared hosting site are development features such as scripting languages and database hosting, which are necessary requirements for this project. Also, in contrast to free plans, shared web hosting permits users to have and select their own domain name. Dedicated managed hosting is a good option for someone who wants more storage and bandwidth and control over the server. The advantages of having P a g e | 67 dedicated hosting are things like unlimited databases and unlimited bandwidth. There are two types of dedicated web hosting plans: managed and unmanaged. Managed hosting is hosting that is still controlled by the hosting company, on their dedicated server. Since it is being hosted on a dedicated server, it is much more expensive than shared hosting. Unmanaged dedicated hosting was discussed earlier, and would involve the self configuration, development, and management of the server, which would be too complicated. The server would also still have to have an administrator, which would allow the greatest amount of control and flexibility, but is once again unnecessarily complicated and would take too much time. After examining the different types of third party web hosting services, it was concluded that shared web hosting proved to be a viable option for this project. The reliability and simplicity, combined with the affordable cost and the fact it permitted the utilization of all of the required features needed for development, made it a natural choice. The next question was which third party shared hosting service to choose. The internet was searched for a reputable website that could compare and rate different third party shared web hosting services, and the website consumer-rankings.com was utilized for their "hosting" section. Since one of the members had utilized godaddy.com's hosting services in the past, and it also appeared in the top ten of the hosting company's consumer- rankings.com/hosting website rankings, it was decided that if third party web hosting would be utilized, the company to be utilized would be godaddy.com. The familiarity and notoriety were deciding factors. One other factor to consider when selecting a third party hosting service, is that each hosting company's servers only allow certain types development languages and databases to be used on their website. As far as databases are concerned, it was discovered that godaddy.com only allows MySQL, SQLserver, and Easy Database (their proprietary database). MySQL is an open source technology, and for the purposes of this project would be free. SQLserver is not an open source technology, though could be utilized for free for this project. Even though SQLserver has more features than MySQL, researched showed that MySQL's priorities were reliability, performance, and ease of use, and it was decided to use MySQL. After further consideration, there was one more option to consider for the hosting of the necessary website files. Texas Instruments' line of Stellaris Microcontrollers has a model called the EKS-LM38962 microcontroller that actually allows the microcontroller to act as a web server. This would allow the website files storing the graphical user interface where the user could view and select which appliances would be turned on and off to actually be stored on the microcontroller that is acting as the "brain" of the project. The IP address of the wireless router/Stellaris would be the website address that any user could type into their browser to pull up the website. P a g e | 68 5.0 Design Summary The overall design of this project was created with the intent of meeting all of the objectives outlined in the requirements. The purpose of this project was to create a design that would operate a home more efficiently with respect to power usage, and to allow a user to remotely monitor and control various features in a home. Since the overall goal was to save power, a design that used the least amount of power while still achieving the desired outcomes became the driving motivation. The design starts with a main microcontroller at the center of the whole design (referred to as the "brain" of the project), which handles communication between all internal modules, and holds the decision making logic on whether an outlet would be turned on or off. Since the project also required a server hosting a website which would serve as the graphical user interface for the user, the Stellaris EKS-LM3S8962 by Texas Instruments was chosen, as this microcontroller has the capability of serving a website, while also had the remaining functionality needed support all of the required features. Its ability to lower power consumption by using its built in sleep modes, and its hibernation module made it a logical choice. In each doorway separating each room, there is a motion sensor to detect someone entering or leaving. The motion sensor chosen was the Panasonic NaPiOn series. This motion sensor was chosen due to its lower power consumption and functionality. Each doorway sensor is hardwired to a microcontroller. The microcontroller for the doorway sensor to be wired was chosen to be Texas Instruments'' MSP430 for its ultra low power consumption. The MSP430 is connected via an RF connection to the Stellaris EKS-LM3S8962. The transmitter chosen was Texas Instruments' C1150, for its low power consumption, and will be connected to the MSP430. The RF receiver will be built from Texas Instrument's CC1130 and a solder mount antenna from Vishay. The CC1130 was chosen for its simplicity and low power consumption, and will be connected to the Stellaris EKS-LM3S8962. The communication will be one way, from the doorway sensor/MSP430 to the Stellaris EKS-LM3S8962. When the doorway sensor senses motion, it will send a signal via the RF connection to the Stellaris EKS-LM3S8962, which will then begin to listen for signals from the input sensors in both of the adjacent rooms to the doorway where the sensor was tripped. In each room, there will be three input sensors: a motion sensor, a temperature sensor, and a microphone. The motion sensor and the microphone will be the two sensors to which the Stellaris EKS-LM3S8962 will listen once a doorway sensor signal is received. The motion sensor in each room will be the same Panasonic NaPiOn series as in the doorway. An electret microphone was chosen that satisfied the needs of the project due to its size, simplicity, and cost. The microphone chosen was the CMA-4544PF-W by CUI INC. In each room, both the microphone and motion sensor will be connected to a microcontroller which was P a g e | 69 selected to be the MSP430. The MSP430 will be connected via an RF connection to the Stellaris EKS-LM3S8962. The transmitter chosen was Texas Instruments' C1150, which will be connected to the MSP430. The RF receiver will be built once again for Texas Instrument's CC1130 and a solder mount antenna from Vishay, and will be connected to the Stellaris EKS-LM3S8962. When either the microphone senses a sound or the motion sensor senses movement, the MSP430 will send a signal telling which input sensor was tripped to the Stellaris EKS-LM3S8962. The communication will be one way, from the room input sensors/MSP430 to the Stellaris EKS-LM3S8962. Once the doorway sensor is tripped, the Stellaris EKS-LM3S8962 should receive a signal from one of the MSP430's adjacent to the doorway since whoever tripped the doorway sensor would have to be going into one of the rooms. Whichever room's MSP430 sends the positive sensor input signal will have their outlets that are connected to the system turned on, or if they are already on, will continue to stay on. After a timeout of 5 minutes, if no activity comes from the other room, that room's connected outlets will be turned off. The outlets in each room that will be able to be turned on and off will have power supplied via the wall, and will be connected to a low power relay and an MSP430 microcontroller. When the previous described programmed logic residing on the Stellaris EKS-LM3S8962 determines that an outlet should be turned on or off based on room occupancy, it will send the proper on or off signal to the MSP430 connected to the outlet in question. The third input sensor in each room will be a temperature sensor which was chosen to be the TMP36 which is manufactured by Analog Devices, Inc. This sensor will be connected to an MSP430, along with a seven segment display, and two input buttons. The MSP430 will be connected to a relay and outlet, with a fan plugged in to the outlet. The display will show the current temperature threshold, if the temperature goes above the threshold, the connected fan will turn on. If the fan goes 2 degrees Fahrenheit below the threshold, the fan will turn off. The double threshold was put in place to avoid having the fan turn on and off too often, as a large amount of power is drawn when a fan is turned on. The preceding logic described "Normal Mode" for this project. Different outlets are turned on and off based on the values of the transmissions from input sensors via their MSP430 RF connections to the Stellaris EKS-LM3S8962. The other mode of operation will be "Override Mode". Override mode involves the user viewing the graphical user interface by accessing it via a web browser. The Stellaris EKS-LM3S8962 will host the website, and will be connected to the local internet connection via a Linksys router. The graphical user interface will display the status of all outlets, fans, and the door locks. The user will have the option of choosing "Normal Mode" or "Override Mode". If "Normal Mode" is selected, all of the options to turn outlets or fans on or off for that room will be disabled. If "Override Mode" is selected, the user will be able to turn any outlet or fan on or P a g e | 70 off. This will suspend the logic on the Stellaris EKS-LM3S8962 until the user puts that room back into "Normal Mode". The security control portion of the project will allow the user to accomplish various tasks. First of all, the user will be able to view a picture of someone if they are at the front door. The user will also be able to lock or unlock doors. Both of the preceding features will be available via the graphical user interface. 6.0 Project Prototype Construction 6.1 Physical Properties of Design The Physical Properties of the Design will focus on the Main Processor, the various controller chipsets, and the router connection. All electronics will be set up to help shield noise and keep the different devices from overheating. All devices also will need to be protected from environmental factors as much as possible, taking into account that all devices will be stored indoors. The Main Processor will be encased in a solid frame made of either metal or preferably plexiglass which will help to display the circuitry of the design. The design will be set on either a heat sink, have an external fan attached, or both. The printed circuit board will use thermal vias as well as a layer for heat dissipation along with these external devices to prevent overheating of the system. In the event that heat being generated by the system is still not being dissipated enough and is causing failures because of this, the system can bolster the external devices including the thermal pads, heat sinks, and fans. The group will not insulate the system to create an environmental seal. Due to the fact that the system will be contained in doors, environmental factors that come with harsh weather will not be considered. Noise will be a concern of the system and the environment it is encapsulated in. The entire container will have EMI shielding to prevent outside signals from interfering with the system. The group will be sure to EMI shield all cabling that is leaving the system, including the power and Ethernet line. The Main Processor container will have two holes in the back of it in order to allow the power supply and Ethernet to hook up externally in reference to the container. The transmission lines and power lines need to be separated, so the system will have the Ethernet and power lines on separate sides of the container, with the route where the power line is heading in the opposite direction as the router. The group will want the container used to hold the main processor to be lightweight as well, making sure not to use material that is too heavy in order to prevent the system from becoming too bulky. The container will be bolted down with four bolts in the four corners being fastened into four jack posts that will be mounted at the bottom of the container. The will not have any locking compounds use to fasten them into place, in order for the prototype to be opened and closed as needed. However, if the project was a final design and not a prototype the fasteners would use a locking compound to permanently hold them P a g e | 71 into place. The container will be roughly 12"x8"x6", making it fairly small. If during integration an opportunity arises to condense the size without losing any needed heat dissipation or quality to the system in terms of noise reduction, the system will be condensed down. Overall, in terms of the physical design, as much reduction in the size of the holding container is much desired to the project. A design of this can be seen below in Figure 41. Figure 41: Physical Design 6.2 Physical Properties of Implementation Since the project needs to be tested and presented on campus, a prototype with similar characteristics of a house will need to be constructed. In order to simulate a house, a wooden prototype will be constructed to with three rooms, and two P a g e | 72 doorways. The prototype will be constructed of wood, and will look approximately like Figure 1 below. As Figure 1 shows, there will be a doorway motion sensor in each of the two doorways. Each room will also have a temperature display/select, which is connected with a temperature sensor to an MSP430. Each room will also have a microphone and motion sensor both connected to an MSP430. There will also be the specified outlets to be controlled in each room. The following figure shows the approximate location of each item listed, though the wiring connections are not shown to keep Figure 1 more readable. As stated previously, each controllable outlets ("O" in Figure 1) receives its power from a live outlet, and is connected to a relay, which is hardwired to the Stellaris. Each temperature display/select and, temperature sensor, and MSP430 ("Y" in Figure 42), is connected wirelessly via RF to the Stellaris. Each motion sensor, microphone, and MSP430 ("Z" in Figure 1) are also connected wirelessly via RF to the Stellaris. Finally, each doorway motion sensor and MSP430 ("X" in Figure 42) is also connected wirelessly via RF to the Stellaris. The Stellaris will broadcast its graphical user interface over the internet by communicating with the local internet location through a router using its onboard Ethernet capabilities. Figure 42: Physical Room Design The prototype for the graphical user interface had to be created. There were many technical and design aspects that had to be considered when designing the interface. The decision on whether to group all outlets together or to label an outlet controlling a fan different from an outlet controlling a light or other P a g e | 73 appliance had to be made. The decision on what information to display for the status of each room, and each outlet had to be made as well. The manner in which to allow the user to control the various lights and outlets of each room, and how that would affect the normal operation of the climate control and energy savings mode of an empty room, according to the logic written in the microcontrollers, had to be considered. Finally, for the security control portion, the decision on whether to display the status of the front door lock and give the user the option to lock or unlock, or just give the user the option to lock or unlock, had to be made. Since the control of all appliances (fans, lights, etc) was going to be accomplished by turning an outlet on or off, the question arose of whether to group all of the outlets by room and by function, or just by room. Since the climate control was a separate aspect that had its own input sensors, it was decided that the graphical user interface would break down the functioning of the outlets by room, and separately in each room as "fan" and "outlet". This would give the user more pertinent information about the actual functionality and current status of the home. There were many different options for types of information that would be displayed for each room. With respect to the climate control in each room, there is the current temperature, the current threshold at which to turn the fan on and off, and the current status of the fan. The current status of whether the fan was on or off was absolutely necessary for the requirements of the project. The first design of the graphical user interface included the current temperature and the current threshold at which the fan would be turned on and off. The current overall design architecture of the project made it impossible to display the current temperature and the current temperature threshold in each room. This was due to the fact that temperature sensor and temperature threshold display/control unit were both connected to their own MSP430 in each room, and in the current architecture only sent data to the Stellaris on if the conditions were met to turn the outlet on or off. That is, in the current setup, the connections were not being made to send any information to that specific module to control the threshold. The current setup also didn't send the threshold or temperature to the Stellaris, only whether or not the fan should be turned on or off. It was decided to keep this current set up, and remove the temperature display and threshold display from the graphical user interface, as it didn't seem necessary that a user should need to be able to control the temperature threshold remotely, since they could already turn the fan on or off. The threshold display/control unit would be in each room, and if a person in that room wanted to adjust it, they would have full access to make any necessary adjustment from the room to meet their desired comfort level. Since there is specific logic that dictates when specific actions are taken on the controls of the various fans and lights/outlets, letting the user override the current status would negate the logic residing in the Stellaris. Since it was desired, it has P a g e | 74 been allowed that the user has the option to override the current statuses when the user made overriding changes, this would move the system into override mode. The graphical user interface will allow the user to switch between override mode and user mode (normal mode is when the status of each fan is strictly controlled by the input sensors in the room, and the logic of the microcontrollers, and override mode is when the fan is controlled only by the options set in the graphical user interface). There were various items that could have been displayed with respect to the security controls. Since there would be a microcontroller controlled door lock, the decision on whether to display the current status of the door lock on the graphical user interface had to be made. After careful consideration, it was decided that the current status of the door lock was unnecessary, as the user could lock the door lock, or unlock the door lock from the graphical user interface, and pressing the lock button the door lock was already locked would cause no harm, and vice versa with unlocking an already unlocked door lock. After all of the previous considerations, the main page of the graphical user interface is shown below in Figure 42. As shown in the figure, the graphical user interface is broken down into three sections: "Climate Control Center", "Lighting Control Center", and "Security Control Center". The "Climate Control Center" section is itself broken down into two sections, "Current Settings" and "Override Controls". Everything is organized by room, and in each room, under the "Current Settings" section, the status of the fan is displayed (on or off), along with the current mode of the fan (Override or Normal). In the "Override Controls" section, the user is given a radio button to select "Normal" or "Override" mode. There are also two buttons labeled "Turn Fan On" and "Turn Fan Off" for each fan. If the user selects "Normal Mode" and presses the button labeled "Switch Mode", the buttons labeled "Turn Fan On" and "Turn Fan Off" are grayed out so the prototype can operate according to its programmed logic without outside tampering. If the user selects "Override Mode" and presses the button labeled "Switch Mode", the buttons labeled "Turn Fan On" and "Turn Fan Off" become enabled, and the user has the option to "Turn Fan On" or "Turn Fan Off" for that room. The "Lighting Control Center" section is itself also broken down into two sections, "Current Settings" and "Override Controls". Everything is organized by room, and in each room, under the "Current Settings" section, the status of the outlet is displayed (on or off), along with the current mode of the outlet (Override or Normal). In the "Override Controls" section, the user is given a radio button to select "Normal" or "Override" mode. There are also two buttons labeled "Turn Outlet On" and "Turn Outlet Off" for each outlet. If the user selects "Normal Mode" and presses the button labeled "Switch Mode", the buttons labeled "Turn Outlet On" and "Turn Outlet Off" are grayed out so the prototype can operate according to its programmed logic without outside tampering. If the user selects "Override Mode" and presses the button labeled "Switch Mode", the buttons labeled "Turn Outlet On" and "Turn Outlet Off" become enabled, and the user has the option to "Turn Outlet On" or "Turn Outlet Off" for that room. Finally, in the P a g e | 75 "Security Control Section" there are two buttons labeled "Front Door Lock" and "Front Door Unlock" which lock the front door lock and unlock the front door lock respectively. Figure 42: Graphical User Interface Main Page 7.0 Prototype Testing The testing of a prototype is an extremely important step in the life cycle of any engineering project. The purpose of any engineering project is to solve a problem P a g e | 76 through the design and implementation of an idea. Since the requirements phase of the design dictate what exactly the implementation must accomplish, the testing phase makes sure that the prototype actually accomplishes those requirements that were set out in design. The testing phase involves setting up proper test environments for both the software and hardware. Once the proper software and hardware test environments are properly defined and set up, specific tests must be set up to specifically test both the software and hardware. Both the software and hardware must be properly interfaced and working together correctly, as if there is any faulty hardware, or if the hardware is connected or utilized incorrectly, the project will not accomplish the desired goals. At the same time, if all of the hardware is working and set up properly but there is incorrect or missing code in the software, the project will once again not function properly and achieve the desired results. 7.1 Hardware Test Environment The location of the hardware testing will be in the Senior Design Lab, at the University of Central Florida in Engineering I. The hardware will be interfaced consisting of the following environment: Overall Layout: There will be model house constructed out of wood, having three mini adjoining "rooms", with two doorways, one doorway connecting each of the two rooms to each other. The Stellaris microcontroller will be the main microcontroller taking all inputs and making the decisions on which outlets should be turned on and off, and will also act as the web server. Sensor input modules in each room: Two MSP 430 microcontrollers will interface with the sensor inputs and related hardware. The first MSP430 will be connected to the motion sensor and microphone. The second MSP430 will be connected to the temperature sensor and a display for the temperature, where a user will be able to change the temperature threshold at which the fan will turn on. The connections between the sensor inputs and their respective MSP430's will be made via hardwire, and both sensor input modules will be located next to each doorway in each room. The sensor input modules from each room will be connected to the Stellaris via an RF connection. Doorway sensor inputs: In each doorway, there will be another motion sensor to detect someone moving from one room to another, and this motion sensor will be connected to its own MSP430, also connected to the Stellaris via an RF connection. Outlets: Each outlet will be connected via hardwire to a relay, and then connected to the Stellaris via hardwire. Web Server: The Stellaris will be loaded with the necessary files to act as a web server, and will be connected to the internet using a properly configured Linksys router. P a g e | 77 7.2 Hardware Specific Testing The followings steps will outline the specific testing that will be done to test the hardware that was implemented in this project. 1. Movement through each doorway will test the motion sensors located in the doorways. The proper signal must be sent to the Stellaris showing that there was motion. There will be multiple aspects of the hardware at this stage that must be working correctly in order for the Stellaris to receive the proper signal. First of all, the MSP430 must be interfaced correctly to the motion sensor input. This will be tested with the following test: The MSP430s will be isolated from the stellaris and replaced with LEDs. This will allow the output of the MSP430s to be visually monitored. A yellow LED will be connected to the "change status" signal that is shared by the two microprocessors, and a green LED will be connected to the "light" signal. Upon turning the system on, the first thing to check is the standby status and that no false signals are sent within a reasonable amount of time. The system will be watched for no less than 10 minutes to insure the system is stable. A hand will then be waved in the doorway of the model house to trip the first motion sensor. If the yellow light turns on for the preset period of time, and the green light turns on and stays on, it will be known that right signals are being sent and received. 2. The doorway motion sensors/MSP430's connection to the Stellaris will also need to connected and interfaced correctly via the RF connection. This will be tested with the following test: The RF transmitter will then be reconnected to the MSP430. This time the LEDs will be connected to the stellaris to isolate it from the power outlets. The same color LEDs that were used on the MSP430 will be used to determine the output of the stellaris. Once again the system will be left undisturbed to determine if there is any outside ambient signals causing false alarms. A hand will once again be run in front of the door sensor. If everything works as was observed in the previous test, the MSP430 will send the appropriate two signals to the stellaris. After that, the stellaris should then scan its inputs for what signals have changed. Before going back to sleep the stellaris should send out the appropriate signals for turning on the power outlets. If the two LEDs turn on for the preset period of time, it will mean that everything worked as planned. 3. Once someone has entered a room, movement or sound will activate the sensors located by each doorway in each room. The connection of the MSP430 with the first module of sensors, consisting of the microphone and motion sensor, will be tested. The following test will make sure that the MSP430 receives the proper signal from the first input sensor module: P a g e | 78 The MSP430 outputs will be connected to the LEDs again. The door sensor will then be set off with the wave of a hand. As seen before, the MSP430 will send out the "change status" signal as well the "light" signal so the lights will turn on. First, the system will be checked to see if the appropriate action is taken if no input is detected. At the end of 5 minutes the MSP430 should have decided that no one is in the room; it should then send out the "change status" signal as well as turn off the "light" signal so the lights will turn off. If the yellow light comes on again at the end of 5 minutes at the same time the green light goes off, it will mean that the MSP430 is taking the appropriate measures for when no one is present. Next the motion sensor will be tested. A hand will be waved in front of the door sensor again to set the system in motions. After a minute or so, without making any noise, the hand will be waved in front of the room sensor in an attempt to trip it. Upon receiving the signal from the motion sensor, the MSP430 should decide that someone is present and return to sleep mode. If at the end of 5 minutes the yellow light does not come on again and the green light says on indefinitely, it will mean that the MSP430 received the signal and took the appropriate action. This part of the test will be repeated several times, with the hand being in different parts of the room to make sure the motion sensors can pick up the full range of the room. Lastly, the microphone sensor will be tested. The system will be activated again by tripping the door sensor. This time the room sensor will be covered to insure that they are not tripped, skewing the desired data. A device will be made to give off a variable intensity of a constant tone of sound. This device will be placed no less than 5 feet away from the model. Starting low, the sound will be played for a short period of time and then silenced. If the intensity of the sound crosses a set threshold, the MSP430 should decide that someone is present in the room and return to sleep mode. The LED output will be the same here as in the room motion sensor when the intensity was reached. With each test that does not trip the sensor the intensity will be increased slightly until it is. 4. The first sensor module/MSP430's connection to the Stellaris will also need to be connected and interfaced correctly via the RF connection. This will be tested with the following test: The RF transmitter will then be once again reconnected to the MSP430. Again the LEDs will be connected to the stellaris to isolate it from the power outlets. A hand will be run in front of the door sensor to get the system started. If everything works as was observed in the previous test, the MSP430 will send the appropriate two signals to the stellaris which will light the appropriate LEDs. After that, the system will be left undisturbed for the 5 minutes. When the MSP430 decides that no one is in the room and sends out new signals to the stellaris, the stellaris should sound out signals to the power outlet to turn it off. If P a g e | 79 the yellow "change status" light is lit and the green "lights" signal stays off, it will mean that everything has been processed as planed if the room is clear. The system will then be tested to see if the stellaris reacts correctly if the MSP430 determines that someone is present. The system will be set off by tripping the door sensor. After about a minute of the MSP430 being turned on a hand will trip the room sensors while not making any sounds. After 5 minutes, the MSP430 should have already gone to sleep and nothing should change as far as the stellaris outputs. If none of the lights turn on at the end of the allotted time it will mean that everything is working as it should. For the sake of being thorough this test will be repeated again except this time the audio sensor will be tripped. 5. The connection of the MSP430 with the second module of sensors, consisting of the temperature sensor and temperature display, will be tested. The following test will make sure that the MSP430 receives the proper signal from the second input sensor module: Once again, the RF transmitter will be disconnected from the MSP430s and LEDs placed at the output pins. A red LED will be connected to the "fan" signal. The system will then be left alone for no less than 10 minutes to insure that no interference sends off false signals. In order to generate heat in an attempt to set off the sensor, a pair of hands will be rubbed together quickly before touching the thermometer. Once the temperature reaches the threshold value and the MSP430 wakes up to take a reading, the MSP430 should decide that the fans need to be turned on and send out the proper signals accordingly. If the hand is not enough to set off the sensor, a hair dryer will be used instead. When the yellow "change status" LED turns on for the preset amount of time at the same time that the red "fan" LED turns on and stays on, it will mean that the appropriate signals are being read from the thermometer and the appropriate actions are being taken. 6. The following test will make sure that when the temperature display is changed, that the proper signal will be sent to the MSP430 that it is connected to. The first thing to determine is if the display works on the full range of 00-99. The button will be held down until it reaches a value of zero. Next the display will be increased at a pace that is quick but allows each number to come to the screen to be verified. Once the highest value is reached, a thermometer will be used to measure the room temperature as a reference. The display value will then be brought down to about 7 degrees higher than the room temperature. Taking it one degree at a time, the display will be lowered and left to turn off. Once the internal reference temperature drops below the measured room temperature, the MSP430 should decide that the fans need to be turned on and send out the proper signals accordingly. Just as before, when the yellow "change status" LED turns on at the same time that the red "fan" LED turns on and stays on, it will P a g e | 80 mean that the internal reference temperature is being changed correctly and that the appropriate actions are being taken. This part of the test will then be repeated, but this time going up. The display value will be brought down to 7 degrees below the room temperature. Once again by going up one degree at a time, the reference temperature will be verified against the measured room temperature. This time, when the reference temperature exceeds the measured the MSP430 should decide that the fans need to be turn off and sound out the proper signals accordingly. If the yellow "change status" LED turns on at the same time that the red "fan" LED turns off, it will be known that the display and the internal reference temperature is working as planned. 7. The second sensor module/MSP430's connection to the Stellaris will also need to connected and interfaced correctly via the RF connection. This will be tested with the following test: The RF transmitter will be reconnected to the MSP430 and the LEDs connected to the output of the stellaris. The same color code will be used again for the outputs. Once the system is turned on it will once again be left undisturbed for at least 10 minutes to verify that no outside interference is causing false alarms. The proper response of the stellaris will then be observed using methods: the first is changing the reference temperature, and the second is changing the measured temperature. As before, the display will be taken to about 7 degrees above the measured room temperature and brought down one degree at a time. Once the threshold drops below the room temperature and the MSP430 sends out the signals observed in the previous test, the stellaris should scan for what signals have changed and alter its output signals accordingly. If the yellow "change status" LED and the red "fan" LED turns on for the preset value of time, it will mean that the stellaris received the correct signals and responded appropriately. Next the display will be taken to about 7 degrees below the room temperature and increased by one at a time. Once the threshold passes the measured temperature and the MSP430 sends out the signals observed in the previous test, the stellaris should scan for what signals have changed and alter its output signals accordingly. If the yellow "change status" LED turns on for the preset value of time while the red "fan" LED does not turn on at all, it will mean that the stellaris received the correct signals and responded appropriately. Next the behavior will be observed when the room temperature changes. With the use of a hand or a hairdryer, the measured temperature will be increased in an attempt to pass the threshold value. Once the MSP430 wakes up to measure the temperature and send out the signals as observed in the last test, the stellaris should scan for what signals have changed and alter its output signals accordingly. If the yellow "change status" LED and the red "fan" LED turns on for the preset value of time, it will mean that the stellaris received the correct signals and responded appropriately. Lastly, the temperature of the thermometer will be allowed to slowly drop back to equilibrium with the room. Once the MSP430 wakes up to measure the temperature and discovers that it is below the threshold P a g e | 81 value, it will send out the signals that were observed in the previous test. Once again the stellaris should scan for what signals have changed and alter its output signals accordingly. If the yellow "change status" LED turns on for the preset value of time while the red "fan" LED does not turn on at all, it will mean that the stellaris received the correct signals and responded appropriately. 8. When the software residing on the Stellaris determines that an outlet needs to be turned on or off, the Stellaris will send a signal to the relay, which will ultimately turn the outlet on or off. This test will be that when the relay is sent the proper signal that is properly turns the specified outlet on or off, depending on the signal. The first relay to verify will be for the lights. They system will be connected as it should be for the final design. After being turned on the system will be left undisturbed for no less than 10 minutes to verify its ability to maintain a steady state. A hand will be waved in front of the door sensor to wake up the MSP430. If all the signals are sent as observed in the previous tests, the outlet MSP430 should detect that the status of the outlet needs to be changed and mimic the output to the input from the stellaris. If the light should turn on it will mean that everything is working correctly to this point. The system will be watched for 5 minutes until the MSP430 decides that no one is in the room and sends the shut off signals. If all the signals are sent as observed in the previous tests, the outlet MSP430 should detect that the status of the outlet needs to be changed and mimic the output to the input from the stellaris. If the light turns off at the end of the 5 minutes of not disturbing the system it will mean that all the appropriate signals are being passed around and the outlet MSP430 is working as planned. The door sensor will be tripped again except this time the room motion sensor will be tripped as well. This time the room MSP430 should determine that someone is there and go to sleep. With this being the case, no extra signals should be sent around and the lights should stay on indefinitely. After the lights are manually turned off the door sensor will be tripped one more time. Without setting off the room motion sensor the audio sensor will trip. Again time the room MSP430 should determine that someone is there and go to sleep and the lights should stay on indefinitely. Next the fan relay will be tested. Once again the system will be left alone for 10 minutes to observe it maintaining a steady state. The display will be set about 7 degrees above room temperature and decreased slowly until the threshold is below the room temperature. Once the MSP430 determines that the fan should be turn on it should send out the previously observed signals. If everything works as planned, when the stellaris sends out the signal to turn the fan on the MSP430 controlling it should mimic the output to the input from the stellaris. If the fan turns on it will be known that everything is working correctly. The display will then be increased until the threshold is above the room temperature. If the P a g e | 82 fan turns off it will mean that all the signals have been processed correctly. Lastly the test will be run again but this time changing the room temperature. With the use of a hair dryer or a hand, the temperature will be increased until it passes the threshold value. When the fan turns on again it will farther verify that everything is working together as planned. The thermometer will then be left to cool off and drop below the threshold value. Once this happens and the fan turns off, it will mean that the outlet MSP430 and the relay it controls are all working together as desired. 9. The Stellaris will be setup as a web server, which will be connected to the local internet connection. The following test will determine if the Stellaris is properly setup as a web server and properly connected to the internet. TEST: A computer that is not connected to this project will pull up the website consisting of the IP address of the Stellaris, and the test will be a success if the proper website that resides on the Stellaris is loaded in the browser on the outside computer. 7.3 Software Test Environment Software Testing will be conducted within several environments, specific to the phase and stage of that phase the design is in. Mainly, the testing environment will consist of Visual Studio 2010, Code Composer, and verifying the actual hardware output. Testing will be done at both a unit level and a system level, with the individual unit testing being completed before system testing can be completed. The breakdown of the testing units and what is tied into the system testing can be seen in Section 7.4. -Visual Studio 2010: Visual Studio 2010 will be not only the environment that some code will be built and compiled in, but it is also the environment it will be tested in if written in Visual Studio 2010. Visual Studio will be used to develop the Website end of the project. In this development environment, the website can be tested. The group will use the IIS tools within the Windows operating system to allow the tester to test the software locally with it connecting to the server and sending various test inputs to ensure the software is operating. Input and output will be entered via the website and not through Visual Studio 2010. Output will have to be witnessed on the website and will not be able to be displayed within Visual Studio 2010. Both Unit Testing and System Level testing will be conducted this way. All code that cannot be tested using either unit or system testing will be confirmed using code inspection. Code inspection will be conducted as a "last ditch attempt" in the event that unit and system level testing cannot grant the tester valid verification of the written code. Mozilla Firefox: Mozilla Firefox will be the preferred web browser used to test the internet interface outside of Visual Studio 2010. Mozilla Firefox will be needed to be used to test the website from a user standpoint instead of a developer P a g e | 83 standpoint. Any other equivalent browser is valid for this testing, but Mozilla Firefox is the preferred browser to be used for testing. This environment will be the equivalent of real time testing. The group can validate that the website is being hosted correctly, as well as there are no strange bugs with pulling up the live website. The group wants to verify that the website is communicating with the database that will be storing the users' credentials. All testing done within the Visual Studio 2010 will then need to be conducted within Mozilla Firefox to verify its validity within the user's viewing end as well as the developers viewing end. Both Unit and System Level Testing will be composed in this environment. -Code Composer Studio: Code Composer Studio will be the environment with which all software for the MSP430 and the Stellaris microcontrollers will be written and compiled. Code Composer Studio is a software development suite like that of Eclipse. This software will be tested within this environment to a certain extent. The group will test within the Code Composer Studio the execution of the interrupt routines and services written to execute the commands and handle them correctly. Also, real time, the group will have to have some code that is compiled and run but will have to have its input and output tested via real time verification and analysis with some hardware testing to verify the software implementation. This testing will be conducted at both unit testing levels as well as system testing levels. Any code that cannot be tested within the Code Composer Studio, as well as at a hardware level to verify output, it will have to have the requirements verified via code inspection. -Software to Hardware Testing: Much of the software will be verified via testing within their development environments and code inspection. However, some of the code will need to be tested at a hardware level with both a spectrum analyzer and a multimeter. Testing in this environment will be required to verify the code is setting the correct digital bit and sending it to the correct output pin. This will be testing via multimeter to verify the digital high or low voltage output. This is the only entity that cannot be tested within the development environments but is a vital part of the testing process and must be verified before ensuring the system is meeting its requirements. This testing will be carried out with the system configured as a wired system. The system will be hardwired to override the wireless transmitter and receiver. All main processor inputs will be hardwired to their corresponding signals on the individual processors. This will be done to ensure functionality of this system. Once this testing has been verified and validated, the group will continue with the testing once again but over the RF network. Once this second round of testing is completed then the group can validate the software testing. All of this end of the testing will be done with the processor connected to its corresponding evaluation board, as needed, which will be used to help verify the requirements as well. 7.4 Software Specific Testing Sensor Processor's Software Testing: Here the group is looking to test the software written to interpret the sensor inputs, per the requirements. The group P a g e | 84 needs to validate that the system is sending the signals correctly from the sensors, that the sensors are interpreting the meanings of the different signals received, and that the software is reacting correctly to the signals that it is interpreting. The testing environment for this phase of testing will be both Code Composer as well as the Hardware Test Environment created by the evaluation board. It should be noted that for this phase of testing, the tester will be conducting the testing first with the sensor processor hardwired anywhere in which RF transmission is being implemented. When this testing is completed and the requirements of this phase unrelated to RF transmission are verified, the tester will then run through the same tests and re-test the system with all RF transmitter and receivers configured as called out by the design. All tests are labeled by their Test ID and an overview can be seen below in Table 3. SPST 1: This will be conducted for all sensors. The sensor will be tripped. Using a multimeter, a successful test will result in the corresponding digital input pin will read digital high. SPST2: This will be conducted for all digital input pins. Input will be passed in as digital high on the corresponding digital input pin. The LED light will be configured to turn on when a digital high is read in. A successful test will result in the LED being lit on the evaluation board. SPST 3: This will be conducted for all sensor inputs. The digital input pin will be set to high, either by putting a digital high voltage onto it or tripping the sensor. The input will trigger an interrupt and wake the processor from its sleep state. A LED will be set to become lit when the system is not in sleep. A successful test will result in the LED being lit on the evaluation board. SPST 4: This will be conducted for all sensor inputs. The processor will be programmed to read in an event to wake up the processor and send a digital high output. A successful test will result in reading a digital high output on the digital output pin. SPST 5: This will be conducted for all sensor inputs. The digital input pin will be set to high by tripping the sensor. The processor will output a digital high to the corresponding output pin. Software Test ID Test Description Level SPST 1 Input Passed In Unit SPST 2 Input Read In Correctly Unit SPST 3 Input Handled Correctly Unit SPST 4 Input Sends Signal Out Correctly Unit SPST 5 Input Processor Total Functionality System Table 3: Sensor Processor Software Testing Table P a g e | 85 Electronic/Lighting Controllers Software Testing: This set of tests look to verify the requirements for the electronic controllers' software. The group will be implementing software to take in signals from the main processor and in turn interprets them into the correct signals to switch the electronics on and off. The software used in this phase will be fairly simple as the hardware only needs to interpret an on or off signal and then turn the electricity on or off. The testing environment for this phase of testing will be both Code Composer Studio and the Hardware Test Environment of the evaluation board. It should be noted that for this phase of testing, the group will be conducting the testing first with the sensor processor hardwired anywhere in which RF transmission is being implemented. When this testing is completed and the requirements of this phase unrelated to RF transmission are verified, the group will then run through the same tests and re-test the system with all RF transmitter and receivers configured as called out by the design. All tests are labeled by their Test ID and an overview can be seen below in Table 4. ECST1: This will be conducted for all digital input pins. Input will be passed in as digital high on the corresponding digital input pin. The LED light will be configured to turn on when a digital high is read in. A successful test will result in the LED being lit on the evaluation board. ECST 2: This will be conducted for all sensor inputs. The digital input pin will be set to high by putting a digital high voltage onto it. The input will trigger an interrupt and wake the processor from its sleep state. A LED will be set to become lit when the system is not in sleep. A successful test will result in the LED being lit on the evaluation board. ECST 3: The processor will be programmed to read in an event to wake up the processor and send a digital high output. A successful test will result in reading a digital high output on the digital output pin. ECST 4: The digital input pin will be set to high by putting a digital high voltage onto it. The processor will output a digital high to the corresponding output pin. Software Test ID Test Description Level ECST 1 Input Read In Correctly Unit ECST 2 Input Handled Correctly Unit ECST 3 Controller Sends Signal Out Correctly Unit ECST 4 Controller Processor Total Functionality System Table 4: Electronics/Lighting Controller Software Testing Table Main Processor Software Testing: This phase of testing is the most critical phase of the testing. Here the group has the software tests to validate the requirements for the main processor, which is doing the majority of the workload of the system. Even though the sensors are what drivers it, the main processor is ultimately the engine. The testing needs to confirm that the signals have been P a g e | 86 received properly and sent to the correct registers. Then, the testing needs to verify the hibernate sequence which will be a lengthy part of the testing. The testing will also need to verify the interrupt handler is written to the specifications. This will all have to be verified either through the code compiler via test inputs or code inspection. Finally, the testing will need to verify the main chunk of code written to interpret the incoming signals and interpreting them correctly and sending out the correct output signals. The testing must verify the micro controllers that will be communicating with the main processor are fully functional before this phase of testing can be entered. A large portion of the testing at this phase is reliant on the use of the different processors to verify different aspects of the processor. It should be noted that for this phase of testing, the group will be conducting the testing first with the sensor processor hardwired anywhere in which RF transmission is being implemented. When this testing is completed and the requirements of this phase unrelated to RF transmission are verified, the tester will then run through the same tests and re-test the system with all RF transmitter and receivers configured as called out by the design. All tests are labeled by their Test ID and an overview can be seen below in Table 5. MPST 1: A signal of digital high is sent and received by the RF receiver. Using a multimeter, a successful test will result in the corresponding digital input pin will read digital high. MPST2: This will be conducted for all digital input pins. Input will be passed in as digital high on the corresponding digital input pin. The LED light will be configured to turn on when a digital high is read in. A successful test will result in the LED being lit on the evaluation board. MPST 3: This will be conducted for all digital input pins. The digital input pin will be set to high, either by putting a digital high voltage onto it or sending a digital high signal. The input will trigger an interrupt and wake the processor from its sleep state. A LED will be set to become lit when the system is not in sleep. A successful test will result in the LED being lit on the evaluation board. MPST 4: Here the tester needs to verify that the Interrupt Routine is initiated correctly. To do this, the tester will create a test input in the code which will set the Interrupt Flag. Setting the Interrupt Flag will then in turn initiate a call to the Interrupt Handler. A successful test will result in the sample input triggering the Interrupt Handler. If the test input cannot display these instructions being executed, code inspection must be used to verify any requirements that aren't verified through the test input. MPST 5: Here the tester needs to verify that the Interrupt Handler is creating the events correctly. A test input will be used to verify this, passed in through Code Composer Studio. The input will set the Interrupt Flag, triggering the Interrupt Handler to service an event. The Interrupt Handler will then create an event based on the sample input received. In order for the test to be considered P a g e | 87 successful, the Interrupt Handler must initiate and take in the parameters passed in by the test file. Any component of this test that cannot be verified through the test input must be verified through code inspection. MPST 6: This will be conducted to verify that the Interrupt Handler is servicing the events it receives correctly. The Interrupt Handler will be passed a test input with all the Interrupt Events run by the system. The Interrupt Handler will take in the parameters supplied by the test inputs and create events according to the parameters. The processor will the service the interrupts accordingly and call the proper routines based on the type of event. These routines will in turn execute the instructions as need be by the parameters passed in. This will be observed as reading the correct digital output depending on the routine that is called. A successful test will pass in the parameters through the test input and read the correct digital output on the corresponding digital output pins designated. MPST 7: This will be conducted for all event types. The event will be triggered by the different processor input pins being set to the corresponding digital high input to run through all possible events. When serviced, it will send a digital high to the corresponding output pin. A successful test will result in reading a digital high on the corresponding pin. MPST 8: This will be conducted for all RF transmitters and receivers. The RF transmitter will be set to digital high. The corresponding RF receiver will receive the signal. A test will be considered successful if the corresponding RF receiver reads digital high on its output pin. MPST 9: This will be conducted for all event types. A digital high will be sent to each input pin via RF. The corresponding output pin will send a digital high signal via RF. The RF signal will be received by the corresponding RF receiver. A test will be considered successful if the RF receiver reads as a digital high on its output pin. Software Test ID Test Description Level MPST 1 Input Passed In Unit MPST 2 Input Read In Correctly Unit MPST 3 Input Initiates Wake Up Unit MPST 4 Interrupt Routine Initiated Correctly Unit MPST 5 Interrupt Events Created Correctly Unit MPST 6 Interrupt Services Events Correctly Unit MPST 7 Interrupt Routine Services System Interrupts MPST 8 Output Signal Sends Out Signal Unit Correctly MPST 9 Main Processor Total Functionality System Table 5: Main Processor Software Testing Table P a g e | 88 Internet Interface Software Testing: The Internet Interface Software Testing will verify the functionality and usability of the website broadcasting the back and forth between the processor and the user via the internet. The testing will be done in two different phases: functional requirement testing and non-functional requirement testing. Functional requirement testing will verify the requirements to validate the system. The Non-Functional requirement testing will help improve functionality for the user, with improving the layout and feel of the website. This testing will be done only after all testing has been completed for all other phases. The testing will be completed within Visual Studio 2010, and Mozilla Firefox web browser. IIST 1: The processor will be set to send a test output to the server via the corresponding output. The test output will then be displayed on the corresponding IP address. The test will be successful if the test output is displayed on the correct IP address with no bugs or errors. IIST 2: The webpage of the correctly loaded. The user will be prompted to enter their credentials. When entering the wrong credentials, they will not be permitted to login. When they enter the correct credentials, they will proceed to the interface page. IIST 3: The webpage will be loaded and the user will login. The electronics will be configured on and off, one by one, with the correctly corresponding electronics being turned on and off. For a successful test, all configurations, when set to "On," will turn the corresponding electrical outlet on. When set to "Off", the corresponding outlet will be turned off. Both outlets will be verified by on or off by having a "night-light" plugged into it. IIST 4: The webpage will be loaded and the user will login. The lights will be configured on and off, one by one, with the correctly corresponding lights being turned on and off. For a successful test, all configurations, when set to "On," will turn the corresponding light on. When set to "Off", the corresponding light will be turned off. IIST 5: All events that display a status will be run and the times recorded. The webpage will be loaded and the user will login. The status log will be brought up on the webpage. For a successful test, all events that were run must be displayed in the status log. All the times must match for both. Software Test ID Test Description Level IIST 1 Connection Established Correctly Unit IIST 2 Login Successfully Unit IIST 3 Electronics Control Functional System IIST 4 Light Control Functional System IIST 5 Status Log Display System Table 6: Internet Interface Software Testing P a g e | 89 8.0 Administrative Content 8.1 Milestone Discussion Now that half of the senior design project has reached its completion, the group can review the original project plan and discuss how closely the group met the dates described by the project plan. The project plan, that is being referred to, can be seen below in Figure 49. In regards to the design milestones, the group did some restructuring of both the dates and the stages of the design. The group pushed back several dates, but due to the built in fail safes for pushed back milestones, there was no trouble meeting the biggest milestone of completing the project by December 2. The group wanted to complete the design with enough time to review. Originally, an extra month of review time was built in. However, due to pushing back the dates only a weekend of review time before turning in the design was allotted. In the end, this is enough time to review, with the month being built in more to keep the group from not budgeting enough time rather than the group needing a whole month to conduct a review of the design and documentation. The design was followed pretty well without scrapping or changing the plan very much, besides having to push back some dates in order to get the different phases completed. The group did decide to make the video camera design a "will" rather than a "shall" in the requirements; they were effectively made to be nice-to-haves for the project, but not something that has to be built to validate the requirements. Analysis was needed concerning the requirements and to ensure that no phase of the project would consume too much time and become too engrossing as to let the milestones slip too far and the project timeline become too long within the scope of the class. It can see in the project plan how that freed up more time for the group to focus on the other aspects of the project. It also was discovered the time projection for the camera design phase was a lot shorter than it was in actuality which also led to the group scrapping that part of the design as a hard requirement. However, given the spring 2012 projections are longer than they are in actuality the group would like to return to it and see if more cannot implemented given more time. It was not completely scrapped from the start, as research was done concerning it, allowing the group to pick up not from scratch if the decision is made to implement. As far as the rest of the milestones for next semester, all should be fair projections for the group with a little added time buffer to prevent the group from letting dates slip too far. The group planned the project to have all of the group members to work major phases of the project, with some overlapping of duties. The group will all be sharing testing duties, as well as helping each other with build and debugging issues as needed. However, the group is looking for each member to "own" the piece of the project and build it to the specifications, rather P a g e | 90 than the group sharing building duties on all pieces of the project, which would waste time. P a g e | 91 Figure 49: Project Plan 8.2 Budget and Finance The funding for this project is coming from Workforce Central Florida. Table 7 is a list of the original price estimations for the project. These prices were put together as an absolute maximum cost. The expenditures of the system were unknown when the group applied for funding. Therefore, with careful planning, the group was sure to budget for all possible expenditures that could arise during the build phase. It's anticipated that the design will go through several phases of change. With each phase of change, costs will be either incurred or negated from the total budget. This is common with a first time build event. The budget also has allotted for spare components for instances when fallout can be seen as likely during the integration phase of the project. The group will be keeping a detailed budget of all incurred costs during the build to be compared to the initial budget in order to track the accuracy of the initial predictions. Ultimately this project is not to exceed $5,000, which is in line with the previous table; however, the goal is to be able to accomplish the project with spending as little as possible. Table 8 holds the price list of all the parts chosen for the project and the estimated total cost. Although it is too much to hope or ask for, assuming no complications arise in the building of the project, it looks like it will be accomplished well under budget. Reimbursement from Workforce Central Florida will only be for actual expenditure outlays and although the proposed budget is close to $5000, the actual expenditures could fall well below the initial estimate. All of these reimbursements will be paid on a monthly basis and only after receipts are furnished. Also, an unseen cost in the prototype that will be incurred as an actual cost but will not be accounted for in the cost of the build, are components that are scrapped or become obsolete in respect to the build. P a g e | 92 Item Quantity Price/unit Total Price Microcontrollers (Value Line) 10 $0.50 $5.00 Microcontroller (High End) 2 $5.00 $10.00 Microcontroller Launchpads (Value) 1 $5.00 $5.00 Microcontroller Launchpads (High End) 1 $80.00 $80.00 Domain 12 $5.95 $71.40 Outlets 10 $1.00 $10.00 Relays 5 $4.00 $20.00 Extension Cord 5 $6.00 $30.00 Printed Circuit Board 10 $50.00 $500.00 Video Surveillance Camera System 1 $300.00 $300.00 Temperature Sensor 10 $3.50 $35.00 Infrared Sensor 10 $4.50 $45.00 Eval Board 1 $49.00 $49.00 Motion Sensor 10 $25.00 $250.00 Audio Sensor 10 $10.00 $100.00 Vibe Sensor 10 $5.00 $50.00 Prox Sensor 10 $72.00 $720.00 Pressure Sensor 10 $83.00 $830.00 Power Supply 1 $150.00 $150.00 Misc. Components/Sensors 1 $700.00 $700.00 RF IC's 10 $7.95 $79.50 Eval Board 1 $199.00 $199.00 Micro Controller Software 1 $500.00 $500.00 External Hard Drive(1-3 TB) 2 $120.00 $240.00 Grand Total $4,978.90 Table 7: Budget Plan P a g e | 93 Item Quantity Price/unit Total Price MSP430 LaunchPad 1 $4.50 $4.50 MSP430G2231 9 $1.93 $17.37 MSP430G2251 3 $1.64 $4.92 CD54HC164 6 $0.56 $3.36 SN54HCT541 3 $0.52 $1.56 VI-201-DP-RC-S 3 $2.88 $8.64 AMN43121 3 $15.44 $46.32 AMN14111 3 $16.35 $49.05 TMP36GT9Z 3 $1.50 $4.50 CMA-4544PF-W 3 $0.96 $2.88 P4.70KCA 6 $0.15 $0.90 P240KCA 3 $0.15 $0.45 CF18JT1K00 3 $0.09 $0.21 P47KBB 6 $0.14 $0.84 CF18JT30K0 3 $0.09 $0.21 FK28Y5V1C105Z 6 $0.36 $2.16 FK26Y5V0J476Z 3 $0.64 $1.92 FK24X7R1C225K 3 $0.43 $1.29 IRFI4212H-117P 3 $3.30 $9.90 RTD14005F 6 $2.59 $15.54 Resistors 21 $0.10 $2.00 Capacitors 12 $1.00 $12.00 OPA2363AIDGSR 3 $3.15 $9.45 BC547BTA 3 $0.43 $1.29 ESB-33133 12 $1.36 $16.32 ECS-.327-12.5-38 2 $1.13 $2.26 LM3S8962-IBZ50-A2T 2 $6.50 $13.00 296-19584-1-ND 20 $3.30 $60.60 296-29159-1-ND 20 $4.35 $87.00 553-1604-5-ND 2 $8.37 $16.74 Linksys Router 1 $79.99 $79.99 Grand Total $479.27 Table 8: Running Budgets P a g e | iii Appendix A: References [1] John Conti, "Annual Energy Outlook 2011 with Projections to 2035," DOE/EIA- 0383(2011), no. 2011. [2] Texas Instruments, "CC113L Value Line Receiver Datasheet." Texas Instruments. [3] Texas Instruments, "CC1150 Low Power Sub-1 GHz RF Transmitter Datasheet." Texas Instruments. [4] "Control4 Home Automation and Smart Home Control > Home." [Online]. Available: http://control4.com/. [Accessed: 04-Dec-2011]. [5] Cisco, "Ethernet Technologies - DocWiki." [Online]. Available: http://docwiki.cisco.com/wiki/Ethernet_Technologies. [Accessed: 04-Dec-2011]. [6] "Home Automation: Your introduction to the simplicity of control." [Online]. Available: http://www.homeauto.com/Downloads/Marketing/Learn_About_HA.pdf. [Accessed: 04- Dec-2011]. [7] C. Coombs, Jr., Printed Circuits Handbook, 3rd ed. McGraw Hill, 1988. [8] Chad Barraford, "Project Jarvis." [Online]. Available: http://projectjarvis.com/. [Accessed: 04-Dec-2011]. [9] D. Grini, "RF Basics, RF for Non-RF Engineers," presented at the MSP430 Advanced Technical Conference 2006 (Texas Instruments), Dallas, Texas, 2006. [10] Texas Instruments, "Stellaris® LM3S8962 Microcontroller Datasheet." Texas Instruments. [11] "U.S. Household Electricity Report," 14-Jul-2005. [Online]. Available: http://www.eia.gov/emeu/reps/enduse/er01_us.html. [Accessed: 04-Dec-2011]. [12] Ahmed, I.; Hong Wong; Kapila, V.; "Internet-based remote control using a microcontroller and an embedded Ethernet," American Control Conference, 2004. Proceedings of the 2004 , vol.2, no., pp.1329-1334 vol.2, June 30 2004-July 2 2004 URL:http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=1386759&isnumber=30 301 [13] Atmel, "AVR460: Embedded Web Server." Atmel. [14] Panasonic Electric Works, "MP Motion Sensor 'NaPiOn Datasheet.'" Panasonic. [15] Analog Devices, "Low Voltage Temperature Sensors TMP35/TMP36/TMP37 Datasheet." Analog Devices.
Pages to are hidden for
"Design Summary EECS University of Central Florida"Please download to view full document