Www.ece.ucf.edu
Home Energy Management SystemSponsor: Progress Energy Spring 2011Group Members:Zineb HeaterRyan JonesDennis KilgoreContentsExecutive Summary 11 Definition 31-1 Overview31-2 Motivation41-3 Goals and Objectives 61-4 Requirements71-5 Specifications 121-6 Design Constraints 131-7 Previous Projects and Commercial Products 141-8 Safety Concerns 172 Research 192-1 Methods 192-2 Components 413 Design 483-1 Power and Current Sensing Circuit 483-2 Power Relay 503-3 Wireless 533-4 Microprocessor 613-5 Main Control Board 623-6 Block Diagrams 653-7 Software 674 Prototype 774-1 Design Planning 774-2 Parts Acquisition 804-3 Budget 805 Testing 815-1 Wireless Modules 81 5-2 Microcontroller 815-3 LCD Touch Screen 835-4 Current/Power Sensor 835-5 Software 845-6 Power Relay 865-7 System Testing 866 Reflections 876-1 Features Excluded 876-2 Future Improvements 877 Conclusion 908 Product Manual 92Appendices 93Executive SummaryThroughout the centuries, energy as a concept has worked its way into nearly every scientific application, through gadgets and gizmos and into the homes of everyday Americans. According to the U.S. Department of Energy, the United States currently consumes the most of the world’s energy, and 21% of the country’s energy consumption comes from residential use. In an effort to curb these facts in the future, many have thought to turn towards renewable energy sources. However, before new energy sources are created, the idea of responsible energy consumption should first be considered. In fact, in order to properly integrate renewable energy sources, people will need to be aware of their excessive energy usage on a daily basis in order to curb their dependency on non-necessities, such as keeping lights on when out of the room or plugging in appliances no longer in use. In studies conducted in 2000, Vampire Draw (referencing the power used by electronic devices when they are supposed to be dead) accounted for upwards of 13% of the average American household energy bill. This means that 13% of the household energy bill is from wasted power – electronics that are not in use and are not benefiting the homeowner, except they may merely save a few moments when the device initially starts up. Much of the excess energy in these devices is dissipated as heat, which also raises home cooling costs showing as a double expenditure on the bill. While renewable energy is a very altruistic motive as far as the environment and futuristic goals are concerned, there is also a very pertinent and personal motive to energy management – to save money by reducing household energy usage, thus reducing the final total on the monthly bill. As the world moves forward, technological advances will only add to the growing list of gadgets found in American homes. Not only are there cell phones, game consoles, cable boxes, desktop computers, laptops, and ebook readers, there are the chargers, controllers, and monitors associated with each that are left plugged in throughout the day. The Home Energy Management System is a project that handles the opposite end of the power spectrum as renewable energy, sustainability. Sustainability is as important as finding sources of renewable energy. At the current pace of the country, we may have sufficient energy reserves and resources to last decades, but why can we not stretch that even further? The world needs to act today in preparation for the future, and it begins with sustainability projects.The goal of this project is to give users an idea of how much energy is being used throughout the month and where their major energy drains are within their home. The project aims to be a sustainability project. As well, the project will provide the users with the ability to control the power going into different areas of their homes. The idea is to combine a power switch and power meter into one unit, and allow users to view the data and control the switch wirelessly. The product will be designed so that one central unit can be used to record the data and function as a server for the controlling application. Due to differing layouts of houses, it would be difficult to predict whether a central unit will always be able to connect to all of the switch/meter units, so a wireless protocol that uses mesh networking is ideal. That way, regardless of the size or structure of the house, all data can be communicated back to the central unit without issue. The Xbee protocol will be used as it combines low operating power consumption and the necessary wireless networking.The measuring accuracy is expected to be within 10% as this will be sufficient in providing the user with a fairly accurate predictor of their monthly power bill, especially considering current methods (i.e. guessing) could yield up to 50% inaccuracy. The data will be formatted in a user-friendly way to increase desire of use and remove any anxiety those not too computer literate might foster. As well, the application will easily display all pertinent information attained from the device. While the control of the house’s energy consumption from anywhere in the world is the ultimate goal, the users will also be able to effectively budget their energy expenditures to ensure they meet their monthly household budget.DefinitionOverviewThe Home Energy Management System empowers the user to save hundreds of dollars on electric bills. Electricity bills are rising and there is no end to it unless if we make the right actions and implement new methods to save energy and money. With the Home Energy Management System, the user can cut down on costs and find out what appliances are actually worth keeping plugged in and those that are consuming way too much energy. The U.S Department of Energy reports that 20% of the country’s electric bills come from items that are left plugged in when they are not in use, or items that are in standby mode. With the Home Energy Management System, the user can monitor the energy eaters in their homes, cut down their electric bills and protect the environment by using fewer resources at the same time. The user can plug whatever item they want into the device and it will tell them the efficiency of that item by displaying the kilowatt per hour. A high- level block diagram can be found below as figure 1-1.1. The Home Energy Management System will help the user determine which items are costing the most to run. The system will calculate the power, voltage, current, and power factor. The system will allow the user to calculate the electric bill even before receiving it from the electric company. By simply connecting various appliances to the system, it will assess how efficient they really are. An LCD screen will display the calculated values of current, voltage and power. The display will also provide real time graphs of the AC current and power being used. The user could calculate their electrical expenses by the day, week, month, or even for an entire year. But measuring appliance consumption is just one of the various options offered by the Home Energy Management System. The system will monitor voltage and can also test if an outlet is working, or evaluate the quality of the electrical power provided by the utility company. It can detect voltage drops around the house; help to predict brownout conditions or to make sure a new home's outlets are in working condition before escrow closes. The system will also allow the user to access the information wirelessly. A high level block diagram of the system can be found below in figure 1-1.1. It shows the three planned modules, and how they interface with the touch screen and main control boards. Data readings from each module are sent wirelessly to the main control board, which creates a GUI for the data to be presented to a user.Figure1-1.1: High level block diagramMotivationMotivation for this project derives from the need for more effective home energy management system. To ensure the sustainability of the planet, we must make a real effort to conserve resources. Our project will assist in this by solving two main problems. First, people often leave electronic appliances on for unnecessary amounts of time or when the appliances should be off. Second, wasted standby power leads to extra energy costs that should be avoided as they waste a significant amount of energy. We should put an effort into conserving the energy produced from nonrenewable resources because there are limited resources. Also, the process of producing energy pollutes water, land and atmosphere. It obviously does cost a lot of money and time to dig resources out of the ground and transform them into the usable form of energy that we are aware of and use on a regular basis. If there were ways to use less energy, both time and money could be saved. Conserving the home energy not only does lower our monthly and yearly bills, it also benefits our health and environment as there will be less harmful gases in the air and more resources in the ground of the coming generations.Whenever we save energy, not only we save money and time but we also reduce the demand for such fossil fuels such as oil and natural gas. The less we burn these fuels, the lower emission of Carbone Dioxide in the air. The average American produces over 40,000 pounds of Carbone Dioxide emissions each and every year. By taking few responsible actions, we can cut our annual emissions by thousands of pounds and we can also cut our energy bills by a huge amount of money. These resources are at the moment finite, and as such, we need to limit their use as much as possible. The home management energy system will be easy to use. The LCD screen will allow the user to monitor their consumption in real time. We are considering the display of current and power graphs in real time so the user can be aware of the power usage. We also intend to display the power consumption in dollars and cents. For instance, most non technical people do not understand what a kilowatt hour would cost. So to make the system as user friendly as it could be, we will display the kilowatts hour as well as the cost in dollars.Our home management energy system will not make people go without. The user can still watch his or her favorite show and charge their cell phone or laptop as needed. The system will enable the user to reduce energy usage of appliances that are left on a standby mode. That means that the users have a real choice and hopefully the power to change energy use and limit waste.Many people leave so many appliances in a standby mode. For instance, people usually leave their cell phone chargers plugged into the wall even though they are not charging the cell phone. If only they knew that only 5% of the power drawn by the cell phone is actually used to charge the phone. The remaining 95% is wasted when the charger is plugged into the wall but not into the cell phone. This sounds terrible, because we are basically wasting 95% of our energy unnecessarily. This group believes that many businesses could benefit from this type of technology. Although businesses do not pay the same power rates during the day as they do during the night, many businesses leave hundreds of computers running at night, and entire rooms with their lights are left on. This type of power usage is wasteful, and detracts from the overall goal of energy sustainability.We conducted little research and found out that a large number of appliances cannot be turned off completely without being unplugged. This kind of appliances such as cell phone chargers, TVs and VCRs draw power 24 hours a day whether they are being used or not. For example, a DVR and digital cable box can use up to 43.46 W when turned off by a remote. Stand By power is ultimately the power being consumed by these appliances while they are switched off by still plugged into the wall. For a single appliance, the power wasted might not be a huge concern. Certain devices such as network routers and modems, which largely do not need to be on unless they are being used, cost anywhere from $2-$4 per month. However, when we add up all the appliances and gadgets we have in our homes, the wasted energy becomes significant and sometimes critical. To paint a clear picture of how much we waste due to stand by appliances, we need to picture a typical American home. The American home has typically more than 20 appliances that are constantly costing money and energy. If we focus on one of these appliances, let’s say the TV. We realize that the TV is actually turned on all the time even though it looks off. It’s constantly preheating the picture tube and powering the receiver for the remote and waiting to be turned on. According to a study performed by Cornell University, these so called “Vampire appliances” consume and estimated $3 billion a year or about $200 per household. Standby power consumes over 7% of a home’s total electric bill. The money saved could easily go toward a fun hobby or a nice vacation.We believe that the consumer could put a stop to such a huge waste of energy. The home management system will allow the user to be conservative when it comes to energy use. It will help save the money and the planet. The advantages of the home energy management system would be amplified if the home were powered by a renewable resource such as solar or wind in situations where the weather is overcast or the wind is not blowing.Goals and ObjectivesThe goals of this project are to reduce needless power usage in homes with a system that is effective at reducing power use and noninvasive to daily lifestyle in a relatively inexpensive and simple way, without using more power than would be saved. So, a main objective of the home energy system would be low power usage. If the system is going to consume more energy than it saves, then the system would be simply useless and ineffective. Thus, the entire system must operate at a power usage lower than the amount of power the regular Vampire Draw would waste.We will create multiple modules for switching power on and off as well as monitoring current. Also a small control unit will be built connected to a touch screen display which will be the user interface for the system. Also, a unit which the user can monitor the usage over the internet will be designed. The central unit needs to be user friendly and safe to use. The main idea is that with this system, the user will be able to see significant power bill reductions in a simple, nearly completely passive manner.A current flow and current measurement module will be in line with each outlet in a system. The current used will be recorded using a current sensor that we will build and will be sent to the main control device. This main control device might be a microcontroller that is able to turn off the flow of power to anything beyond one of the modules.Another sensor will be used to sense the presence of a person in any area of the house. The sensor might be a motion sensor or a body temperature sensor. The main control device will be receiving data from both sensors and sharing data with the LCD display and the unit that the user can monitor over the internet. A serial the Ethernet device server will be used to allow the user to communicate with the main control device through the internet. The user will be able to choose to turn the power off an appliance or many appliances at the same time. This feature can easily be accomplished with the use of the microcontroller. The microcontroller will send out command of either a 1 or 0 to the designated appliance chosen by the user.With the project’s expectations in mind, the wireless communication will require a device that can allow data to be transmitted between the units in distances of possibly 35 to 60 feet. As houses do not always come in convenient, tiny box shapes, the device used must reliably send the data from the measuring units to the display units which would be set in a central location within the domicile. If the measuring units created a peer to peer network to pass along the data to the main unit perhaps that could solve any issues in larger facilities. As well, if a wired network is chosen, data reliability must be taken into consideration and preserved over the existing powerline infrastructure of the house. The software goals of the project are to ensure that the user will want to save energy in a simple, passive way. The GUI for the project should be clean enough to not be distracting, but still informative enough that the user will want to look at it often. Also, the GUI must be responsive enough that the user does not feel frustrated while waiting for a window to load. The user must feel like they are in control of their energy usage, by offering them many options to customize their experience.The demands of the project require the use of a microcontroller in each measuring unit, and a larger processor in the display unit to control the touch screen display. In theory, the microcontroller in the sensor units should be able to convert the analog measurement from the metering components and send that information to the display unit after completing and compiling any necessary calculations. The microcontroller needs to be small enough that the size of the sensor units will not become an eyesore to homebuyers and will still remain applicable in an end user situation.This project demands an environment where real time graphs of power usage can be displayed on a touch screen with near seamless transitions. This should be possible with a strong control unit and enough memory. To accomplish that, an FPGA would be difficult to design. Instead, a microprocessor will be used. Because a microprocessor is needed, a support system for that is necessary. This includes RAM, flash memory, and communications access. Research in the following sections will include these issues.RequirementsPower and Current MeasurementsTo measure the electrical power we can use different methods. For instance, a Hall Effect sensor can be used to measure voltage, current, and power levels by using a current perpendicular to a magnetic field to cause an electric potential. Another way is to use voltage response measurements where the electrical characteristics of a circuit are determined from the amplitude and phase of a test current flowing through the circuit. To measure power the power in this case, the sensor will have to measure the phase difference between voltage and current. In order to measure the energy consumed by the devices, we will needs to measure both the voltage and the current waveforms. For this purpose, analog to digital converters are going to be used. Due to the high Voltage and the inability to measure current directly, voltage and current sensors have to be built. Several sensing technologies are being considered and will be discussed.Our application requires one measurement device to capture the voltage across the terminals of a load, and the second device to capture the current going through the load. However, the actual power calculation depends on the resistive and reactive components in the circuit. In order to have an accurate power measurement, we find it necessary to study the electric power a little bit more and define its different components. While conducting our research, we realized that in alternating current circuits, energy storage elements such as inductance and capacitance may result in periodic reversals of the direction of energy flow. The portion of power flow that averaged over a complete cycle of the AC waveform, results in net transfer of energy in one direction is known as real power. On the other hand, the portion of power flow due to stored energy, which returns to the source in each cycle, is known as reactive power. AC power flow has the three components: Real power (P), measured in watts (W) Reactive power (Q), measured in reactive volt-amperes (VAR). Complex power (S), measured in volt-amperes (VA). S is usually referred to as the apparent power and it’s the simple product of the RMS voltage and the RMS current.The mathematical relationship among these power components can be represented by vectors and is typically expressed using complex numbers: S=P+jQ. Real power is the measure of a circuit’s dissipative elements (Resistances) and is the one represented by P, which has a unit measure of Watts. P is the power component we will be measuring in our application since it is the one the power company charges us for. Typically, there are two different techniques that are used to measure the real power P. The first way is to take the time average of the instantaneous product of voltage and current over a period of time. Another common method is to use the impedance angle depicted in the power triangle consisting of the three components of power defined above. The cosine of the impedance angle is directly proportional to the amount of reactance in a circuit, which is called power factor PF. The power factor is the cosine of the phase angle between voltage and current. A power factor of 1 represents a purely resistive load and power factor less than 1 represents a reactive circuit. Power factor is also defined as the ratio of true or real power to apparent power. Power factor takes into account both the phase and wave-shape contributions to the difference between true and apparent power. In our case, both the voltage and the current waveforms are sinusoidal. Therefore, to measure the power factor we simply need to read the time difference between zero crossings of the waveform. To accurately measure the real power in our system, we need to have some capabilities such as:Voltage and current waveform acquisition capability Simultaneous acquisition of both measurement waveforms Both measurement devices must acquire simultaneouslyA power factor of one is the goal of any electric utility company since if the power factor is less than one, they have to supply more current to the user for a given amount of power use. Low power factor is caused by inductive loads (such as transformers, electric motors, and high-intensity discharge lighting), which are a major portion of the power consumed in household. Unlike resistive loads that create heat by consuming kilowatts, inductive loads require the current to create a magnetic field, and the magnetic field produces the desired work. The total or apparent power required by an inductive device is a composite of the real power and the reactive power discussed above. In order for our power measurement to be within tolerance, we have to make sure that the error caused by the power factor is acceptable. To do this, we will install capacitors in our AC circuit to decrease the magnitude of reactive power. Capacitors release energy opposing the reactive energy caused by the inductor. This implies that inductance and capacitance react 180° to each other. The presence of both in the same circuit results in the continuous alternating transfer of energy between the capacitor and the inductor, thereby reducing the current flow from the generator to the circuit. When the circuit is balanced, all the energy released by the inductor is absorbed by the capacitor. The following figure shows the power measurement error versus the power factor error:Figure1-4.1.1: Power measurement error versus power factor and phase angle errorMicrocontrollerThe microcontroller to be used will be an essential part of the whole design. Not only does the microcontroller have to be able to easily interface with the different components of the design, but it also has to have enough output and inputs pins to manage all the data being received and sent. The microcontroller has to receive data from the current sensor, convert it to power and transmit it to the LCD screen. This requires the microcontroller to have a large number of input and outputs pins as there will be different tabs available to the user to program the microcontroller. Since the microcontroller will receive data from the current sensor, we need to make sure the voltage values measured do not exceed the maximum input voltage to the microcontroller. This can be done by either using a voltage divider or an attenuating circuit with an op-amp. The microcontroller must also be able to control a power relay the power off a device if the user chooses to do so. As microcontrollers become smaller and cheaper, the functionality of many external components is being integrated directly into the microcontroller. For instance, eight-bit microcontrollers come in a variety of package sizes, random access memory and read only memory sizes, serial communication buses, and analog inputs and outputs. The fact is that we have a huge amount of microcontrollers to choose from. We need to choose the one that matches our design requirements and cost constraints. Our choice could integrate some analog and digital capabilities such as an analog to digital converter, amplifiers, timers, counters, a small computer serial interface and even an USB. This can allow us to significantly reduce the number of components we have to use. We considered several different microcontrollers for processing the data such as PIC 18F2455, MSP430FE4272, CC2531 and Arduino. We considered using the PIC18F2455 because of its popularity and easiness. Microchips microcontrollers are used widely and several examples were found. The programming is easy as well. The MSP430FE4272 was considered because of the fact that it offers excellent support in the energy sensing field. It also includes a DSP that manipulates current and voltage waveforms parallel to the CPU such that the device only reports important data every second. Its power consumption is low as well. The CC2531 was considered because it includes RF communications with the Xbee stack protocol and an 8-bit 8051 microcontroller. This will cut our cost as we will not need to purchase the wireless chip separately. However, it may be very time consuming to learn how to program it and use it.Wireless communicationOur issue is to figure out the right wireless technology to use in our application. The first step in deciding the kind of wireless components we will be using is to decide between a one way wireless protocol and a two way wireless protocol. The answer to this question was simple as we obviously need a two way wireless protocol. The microcontroller will send data and receive commands. Also, whichever wireless protocol we choose, it has to be as simple as possible to enable an easy learning process and implementation. The group has considered several types of wireless protocols. We will discuss all the types considered in the research phase. We will point out their advantages and conveniences and chose the one that serves our application the best. One of the types wireless protocol considered is Wi-Fi, or also known as wireless fidelity. In a Wi-Fi network, computers with the network cards connect to a wireless router and this is connected to the internet by means of a modem. Any user within about 60 meters of the access point can then connect to the internet. This was more than enough if the user is using a system in a house. The choice of Wi-Fi networks was also considered because of security reasons as the system will be secured and a password is needed. Another wireless protocol we are considering is the Zigbee. This last one works in a slightly different manner than IR and RF. It works off a grid of multiple nodes in a particular location and uses multiple communication paths. Unlike IR and RF, this wireless meshed networking alternative could make life easier for, as it doesn’t have to be in a direct line of sight in order to send signals.Bluetooth technology is also considered as it is useful when transferring information between two or more devices and also when seep is not a huge issue. In our case, we need to transmit data between 2 devices at least. Xbee modules were also considered in our design. The XBEE modules are the core of the mesh communications protocol. They provide an easy to use Application Interface and handle all the mesh networking by themselves. These modules offer several advantages such as the ease of use and the possibility of being tested independently from the microcontroller. Touch ScreenThe touch screen used must respond to the touch of hands which are relatively clean, and hands that are wearing gloves. We will not consider conditions of greasy, or dirt covered hands. In addition, the touch screen must be accurate enough to respond to a touch in the approximate area that the user attempts to touch it. The screen must be durable enough to last through years of use. It also must have a function where it can sleep, but turn on if a user presses it to activate it. Also, the screen must have minimal image burning, as many elements of the GUI will look similar, and the system may have burn marks after extended periods of use. TheSoftwareThe software for this project must be compatible with itself. It is desired that the software be written in an object-oriented language. It would be preferred that all programming be done in the same language. The current programming convention is object oriented coding. For the maximum control and compatibility, it was found that C++ would be ideal. Java was also considered due to its user friendliness, but the C++ libraries are not compatible.A Graphic User Interface (GUI) will be needed to allow the user to navigate the system. Many functions of a GUI require an advanced processor, so an FPGA will not be ideal. In addition, GUIs require some sort of an operating system to be run. The operating system must be chosen carefully. Because a full operating system will not be possible in such a device, the system will need to be run from a lightweight, minimalistic operating system.SpecificationsThe Power and Current Sensing CircuitThis circuit will consist of a current sensor and a relay. The current measured will be transmitted to the microcontroller and commands will be received from the microcontroller to shut the power of an appliance. In order for the measurements to be accurate, we have defined the following specifications for this part of the design:This part of the circuit should consume very low powerBe able to measure currents varying from 0 Amps to 15 AmpsBe able to measure voltages up to 120VBe able to control the relay and shut the power of an appliancePower measured must be within 10% errorThe MicrocontrollersThe uses of this project are quite advanced, so a prefabricated microcontroller or processor will be required. An FPGA is not practical in this sense because the architectures involved would take a long time to develop. We are considering the uses of 3 microcontrollers for the child modules as each one of them will monitor an appliance. The microcontroller should be able to receive data from the current/power sensing circuit, calculate the consumed power and transmit the data to the LCD screen. The main control board will have its own microcontroller. This unit will take information transmitted by the other units, process it, and modify it in a format readable by humans. The main microcontroller must use less power than the unit will prevent other devices from using.Touch ScreenThe touch screen used must respond to the touch of hands which are relatively clean, and hands that are wearing gloves. We will not consider conditions of greasy, or dirt covered hands. In addition, the touch screen must be accurate enough to respond to a touch in the approximate area that the user attempts to touch it. The touch screen should be large enough to be usable by an average person, but not so large that the person should need to keep the device farther than an arm’s length from their eyes to read all of the information. Ideally this size is a six inch to ten inch screen. This way, there will be enough pixels on the screen to allow the data to be displayed, but not so many as the graphics will look distorted or pixilated.The Power RelayThere are 3 installation parameters that must be planned for before we can purchase the relays. We have to avoid over amperage. The current must be less than the SSR rating. We also have to avoid over voltage and over temperature. Solid state relays have an isolation feature. The control signal and power line is completely isolated by an internal LED. Design ConstraintsWe have to consider some constraints when designing the system. These constraints are derived from our assumptions and limitations:Size: The PCB and the LCD must be practical for hands on use. The physical characteristics that are constrained are that of the size and weight. However, since the weight of the design components are fairly light, weight should not be a big issue. The final product will be light enough to be carried easily by hand. Budget: Due to a limited budget, the team must analyze part cost effectively. It will be important not only to spend as little as possible, but to find the best part for the money as well. Any sponsor purchased material would also be an ideal way to keep the budget within reason.Durability: The system must be able to perform after several uses. Ease of use: the LCD screen commands should be easy to understand. The system should have a detailed manual to explain different features and how they can be used easilySafety: the system should be safe and reliable. There should be no risk or injures due to electrical current.Previous Projects and Commercial ProductsSeveral products are available on the market for power reading. The first one that comes in mind is the Kill a Watt. Kill a watt is a small device that tells the user how much electricity something uses, either at a given moment or over an extended period of time. The device needs to be plugged into the meter, then the meter need to be plugged into the wall. This kind of devices sells for around $25. While this device is especially useful for finding the amount of kWh used in a month for devices that do not run constantly, it does not offer the user the option to turn the power off an appliance. The following figure shows a typical kill a watt device.Figure 1-7.1: Kill a Watt, photo used with permission from AmazonThere is another class of products similar to the Cent-a-meter which show users their energy usage on a wireless display. These work by placing a transducer on the power company meter to measure the power consumption and send the information to the display which converts it to cents per hour or green house gas emissions as an added bonus, since the metering hardware is placed outside the home, it also displays temperature and humidity for convenience. These products do not directly show the power use of a specific appliance or electronic, but can give an estimate if the user keeps a constant baseline power usage before and during use of said appliance, noting the difference between the two. The stated accuracy for this product is 5% which isn't quite all that accurate, but the purpose of giving a user an idea of how much energy they are using it is close enough.Recently there have been products introduced that are low cost metering devices which send the monitoring data to Google PowerMeter which allows users to view realtime power usage data from their iGoogle homepage with visualization. This is a great example of what an easy to use UI design can be and how it could be implemented. The fact that it is an open program that anyone can use for free with the given hardware installed makes it a strong contender for use.center0The Google PowerMeter, iGoogle UIPermission granted from In addition to the commercial products there have been many similar senior design projects, especially on the power metering subject. While researching differing products, the group also came across an interesting project, called the Tweet-a-Watt, that uses a Kill-a-Watt in conjunction with an xbee radio to send measurement data to the a computer. The computer then runs a google app that uses googles visualization engine to display the resulting power usage over time for each individual outlet. This is very similar to what the the groups project and worth noting. The difference is that the group plans to use an embedded system to visualize the data on a touchscreen where the tweet-a-watt just sends it to the users computer for collection and visualization.center0UI for the Tweet-a-Watt using googles visualization enginePermission granted from A similar project with somewhat similar goals was completed by students at the University of Illinois at Urbana-Champaign. Their project was similar in that it metered the power usage and then wirelessly sent the information to a central hub which was connected to a computer where they used a program to visualize the data. The group was pleased with their project overall but didn't like some aspects of the final product. One of their first complaints was the wireless scheme they were using received a lot of interference and also had a limited range of 30 ft. Because of the way they were encoding the data even minimal interference could corrupt the data being sent over the air. Also, due to their communication protocol, they were only able to use the 8 most significant bits of their 10 bit Analog to digital conversion thereby losing accuracy. This is something that they wished they could change and if doing the project in the future they most certainly would do differently.A few other projects were reviewed and most of them used technology discussed in the research portion, using some combination of a voltage sensor, current sensor, wireless or powerline communication and a more powerful processor (usually a computer) to visualize the data collected. Many projects opted for a graphical display of the power which is something that the group is designing for, which isn't always the case with standalone units.The group has found a similar senior design project. The design is the “The power meter” from the university of Central Florida during spring 2010. The objective of the project was to design and construct a power meter for the household. The power meter was intended to be used to measure the power consumption of any electrical device in the home that is connected with the use of a plug. The group had set an accuracy requirement of at least 5%. This project was implemented and test with an accuracy of 5%.While the general idea behind the unit seems to be somewhat common, as there are plenty of products that do similar things, and plenty of very similar senior design projects that have been completed in the past, the group feels that each one, including this design is different and each has its own merit, and the small decisions that differentiate one project from the next are ever important.Safety ConcernsThe design is centered on many electrical devices. These devices can pose a significant hazard to the team members or the used, particularly when mishandled or not maintained. We will be measuring high AC current and voltage. Due to the sensitivity if the design, we find it appropriate to discuss some safety concerns and address how are we going to avoid electrical hazards. The major hazards associated with electricity are electrical shock and fire. Electrical shock occurs when the body becomes part of the electric circuit, either when an individual comes in contact with both wires of an electrical circuit, one wire of an energized circuit and the ground, or a metallic part that has become energized by contact with an electrical conductor. The severity and effects of an electrical shock depend on a number of factors, such as the pathway through the body, the amount of current, the length of time of the exposure, and whether the skin is wet or dry. Water is a great conductor of electricity, allowing current to flow more easily in wet conditions and through wet skin. The effect of the shock may range from a slight tingle to severe burns to cardiac arrest. The chart below shows the general relationship between the degree of injury and amount of current for a 60-cycle hand-to-foot path of one second's duration of shock. Current valueReaction1 milliampPerception level5 milliampsShock felt, not painful6-30 milliampsPainful shock50-150 milliampsExtreme pain, respiratory arrest1-4.3 ampsVentricular fibrillation5 amps++Severe burns, cardiac arrest and possible deathWhile it is not likely that any safety issues will arise from our project, we find it necessary to point some precautions to prevent electrical hazards such us:We will inspect the wiring before each use and replace damaged electrical cords immediatelyWe will use safe work practices every time the equipment is usedWe will make sure that each team member knows the location of the switches or circuit breaker panel in the senior design labResearchMethodsThe Current/Power MeterThe main device of the design consists of the power, current and voltage sensor. This part of the design is critical because all the other steps rely on it. If the power or current measured are not accurate, the microcontroller will send out incorrect values. Therefore, the displayed values on the LCD screen will be incorrect, the measured power consumption and expenses will be inaccurate and the whole system will be useless. The power sensing circuit need to provide accurate calculations and has to measure currents from 0 amps up to 15 amps. AC power is used in nearly all homes in the United States. This is because the power companies need to send their electricity over long distances and compared to DC power, AC power travels farther. The standard voltage of AC power in the United States is 120V. The current sensor we need to use must be able to detect AC current from 0 amps up to 15 amps. The current signal must be fed into a computer in which sensors convert current into a proportional voltage with minimal influence on the measured circuit. The oldest technique is to measure the voltage drop across a resistor placed in the current path. To minimize energy losses the resistor is kept very small, so the measured voltage must be highly amplified. The amplifier’s offset voltage must be as small as possible and its supply voltage must be at the potential of the circuit, often 110 V to 120 V mains with high parasitic peaks from which its output must be isolated. This requirement increases overall system cost.In order to measure AC power, we need to keep in mind the important of the power factor. As in the case of DC power, the instantaneous electric power in and AC circuit is given by voltage times current. However, these two quantities are varying continuously. Therefore, the measured AC power will actually be the average power given by P=V*I*cos (θ), where θ is the phase angle between the current and the voltage and the current and voltage values are the RMS values. A microcontroller will be the center of our system as it interacts with all the parts. The current being measured as well as the voltage across an item will be fed to the microcontroller. The current and voltage fed to the microcontroller need to be within the allowed range of current and voltage. A voltage divider will be used to reduce the voltage by a given factor. The same applied to the current.There are numerous other methods used to measure current and power. We will try to cover a variety of methods and study each one of them separately. We will identify the advantages and disadvantages of each method and choose the one that works best for our application. The most common ways of measuring current include the use of a resistive shunt, a transformer, a magnetic current sensor or a Hall Effect current sensor. We will try to evaluate each one of these sensors and decide which one works better for our application. Each current sensing method has its advantages and disadvantages. Resistive shunts operate by Ohm’s law giving a voltage proportional to the current going through the shunt. It is simply a resistor in series with the load. This offers accuracy and low offset, but it does not provide electrical isolation and has a high thermal drift. This allows the transient spikes to eventually ruin the sensor and potentially overload the electronics. Another issue with resistive shunts would be heat. Like any other resistor, a resistive shunt can generate a significant amount of heat. Heat is not a desirable effect and could cause parts damage. Current transformers are made up of a primary and secondary coil wrapped around a magnetic core. The primary coil carries the current to be sensed and induces a magnetic filed in the core. A current is generated in the secondary coil that is proportional to the primary current scaled by the number of turns ratio. The current transformer offers isolation but it only works for AC application. Current transformers can also be large and bulky. 2-1.1.1Current Measuring ShuntsCurrent shunt resistors are low resistance precision resistors used to measure AC or DC electrical currents by the voltage drop those currents create across the resistance. The principle of current measurement uses Ohm’s law. The voltage across the resistor is simply the product of the resistance and the current. For instance, a current shunt whose resistance is 0.001 ohms having a current of 15 amps flowing through it will produce a voltage of 15 mill volts. Figure 2-1.1.1.1 shows a typical current shunt:Figure2-1.1.1.1: Current Sensing Shunt. Permission asked from A perfect current shut has the exact resistance claimed. Its resistance does not change with temperature, time or current. Its inductance or resistance to AC current change is zero. This kind of perfect shunts are usually very large and way too expensive. However, they do have several advantages such us:Specific current rating, for example 50 Amps or 100 AmpsResistance accuracy, usually within plus or minus 0.25%Resistance drift, the shunt’s resistance changes by less than 0.002% per degree C of temperature change Current shunts are resistors. So by nature they dissipate heat from the current flowing through them and they get hot. Since the heat can change a shunt’s resistance and eventually damage the shunt, current shunts are often given a power rating or a rating factor. The heat produced is power measured in Watts:W = I^2*R. Therefore the heat produced increases with the square of the current. So doubling the current increases the heat power dissipated by 4 times. This might create other issues and ultimately damage some parts of the circuit if not all.2-1.1.2 Current TransformerCurrent transformers consist of two coils wrapped around a magnetic coil. The theory behind them is very simple. When an electric current flows through a wire, it generates a magnetic field. The magnetic field strength varies when the current varies, so the bigger the current, the stronger the magnetic field and the stronger the magnetic flux density and vice versa. For a time varying current, the magnetic field generated is time varying as well. A time varying magnetic field creates an electric current. So, if we put a second wire next to the first one where a time varying current is flowing, a time varying current will be generated in the second coil and will be proportional to the first current. That is how a current transformer measures current. The reaction is called electromagnetic induction because the measured current in the primary coil induces a current in the secondary coil. There are also some current transformers that produce a voltage instead of a current. The voltage is proportional to the current being measured. The use of current transformers to measure current has many advantages. The most important benefit of using such a method in our application would be safety. The current transformer will be safe to use as it isolates the current being measured from the rest of the circuit. It also controls the circuit and protects it from the high voltage or current being measured. However, they tend to be large and would cost more than what the budget of the system would allow. Current transformers also have another inconvenient of saturation. Because of current spikes, the transformer cores might get saturated and therefore the measured current will be inaccurate. This is to avoid as accuracy is a critical point of the system. Current transformers have many performance specifications such as the primary current, secondary current and accuracy. Figure 2-1.1.2.1 shows a typical current transformer:Figure2-1.1.2.1: Current Transformer. Permission received from The use of current transformers to measure current has many advantages. The most important benefit of using such a method in our application would be safety. The current transformer will be safe to use as it isolates the current being measured from the rest of the circuit. It also controls the circuit and protects it from the high voltage or current being measured. However, they tend to be large and would cost more than what the budget of the system would allow. Current transformers also have another inconvenient of saturation. Because of current spikes, the transformer cores might get saturated and therefore the measured current will be inaccurate. This is to avoid as accuracy is a critical point of the system. Current transformers have many performance specifications such as the primary current, secondary current and accuracy.There are two kinds of current transformers, wounds and toroidal. In one hand, Wound current transformers are made of an integral primary winding. This primary winding is in series with the conductor carrying the current being measured. In the other hand, the Toroidal current transformers are donut shaped. They do not have a primary winding. They simply have the wire that carries the current being measure threaded through a window in the transformer.2-1.1.3 Eddy Current SensorsEddy current sensors are non contact sensors that are capable of measuring the position of a conductive material. They are used to measure the position or the displacement of a target carrying a conductive material. These kind of current sensors operate with magnetic fields. The sensor creates an alternating current in the sensing coil. This current produces an alternating magnetic field at the probe tip. The magnetic field then creates create small currents in the target material. These current are called Eddy currents and they generate a second magnetic field that is opposite to the first one. The interaction between the two magnetic fields depends on the distance between the probe and the target. Therefore it changes as the distance changes. The sensor can measure the change in those electric fields and produce a voltage that is proportional to the change in distance. Figure 3 shows an Eddy Current sensor:Eddy current sensors have several advantages such as:High precision and resolutionNon contact and wear freeInsensitivity to dirtSuitability for fast applicationsA reasonable price and good performance ratio Eddy Current sensors use changes in the magnetic fields to determine the distance to the conductive target. There also some other factors that can change the magnetic fields intensity. The presence of conductive material can affect the magnetic field and therefore can affect the measured current. This presents a potential error that should be avoided in our application as accuracy is an important part of the system.Hall Effect Current Sensors TransducersThe Hall Effect is considered an ideal sensing technology. The Hall element is constructed form a thin sheet of conductive material with output connections perpendicular to the direction of current flow. When subjected to a magnetic field, it responds with and output voltage that is proportional to the magnetic field strength. The heart of every Hall Effect sensing device is the integrated circuit chip that contains the Hall element and the signal conditioning electronics. There are many key advantages to using Hall Effect current sensors transducers. Firstly, they can be totally isolated from another high voltage electrical system which eliminates many safety concerns.?The sensor is just measuring the magnetic field from the wire.? This is a nice advantage over current monitoring shunt precision resistors which are less safe because they require you to put in certain safeguards to protect your data acquisition system. Secondly, unlike the current shunt sense resistor which can have thermal temperature heat dissipation issues, the Hall Effect current sensor does not get hot.? Even when measuring 50 Amps. The cost, performance and availability make the Hall Effect current sensors almost ideal for our application. The Hall Effect current sensors have several features such us:True solid stateLong lifeHigh speed operation, over 100 KHz possibleOperates with stationary inputThere are no moving partsLogic compatible input and outputBoard temperature can range from -40 to +150 degree CHighly repeatable operationHigh linearity with no saturation effectsThe voltage output of the Hall Effect current sensor is proportional to the current in the conductor. The sensor monitors the gauss level of the magnetic field created by a current flow, not the actual current flow. The current being measured if passed through a flux collecting core that concentrates the magnetic field on the Hall Effect sensor. The waveform of the sensor voltage output will trace AC or DC waveform of the measured current. The through-hole design electrically isolates the sensor and ensures that it will not be damaged by over current or high voltage transients. It also eliminates any DC insertion loss. Hall Effect sensors measure the magnetic field surrounding the conductor but, unlike current transformers, they also sense DC currents. Figure 2-1.1.4.1 shows a picture of a typical linear Hall Effect current sensor.Figure 2-1.1.4.1: Typical linear Hall Effect current sensor. Permission received from The very small output voltage of the Hall element must be highly amplified, and the sensitivity is temperature dependent and requires adequate compensation. Also of note is sensitivity to short current peaks in the circuit: according to the hysteresis properties of the core material, these peaks can cause a static magnetization in the core that result in an offset alteration of the Hall element.The two types of Hall Effect current sensors are open loop and closed loop. In the open loop Hell Effect current sensors, the amplified output signal of the Hall element is directly used as the measurement value. The linearity depends on that of the magnetic core. Offset and drift are determined by the Hall element and the amplifier. The price of these sensors is low, but so is their sensitivity. Closed-loop Hall sensors are much more precise. The Hall voltage is first highly amplified and the amplifier’s output current then flows through a compensation coil on the magnetic core. It generates a magnetization whose amplitude is the same but whose direction is opposite to that of the primary current conductor. The result is that the magnetic flux in the core is compensated to zero. The principle is similar to that of an op amp in inverter mode, for which the input voltage is always close to zero. The nonlinearity and temperature dependence of the Hall element are thus compensated but the offset remains. Closed-loop current sensors work up to frequencies of about 150 kHz. They are not cheap, though, and for high currents they become very bulky.Magneto Resistive Field SensorsMagneto resistive field sensors use the change of the resistivity of a material due to a magnetic field to measure the current. These kinds of sensors have the benefit of small energy consumption and high sensitivity in small intensity magnetic fields. Magneto resistive field sensors can be compared to resistors that are magnetically controllable. The angle between the internal direction of the magnetization and the current flow is the determining factor for the resistance. The way the magneto resistive sensor is very simple. The sensor detects the movement of a magnetic structure caused by changes in the magnetic flow. This causes changes in the magnetic field resistance. The change in the magnetic field is then converted to an electric variable. The output of the sensor can be either a current or a voltage which reflects the changes in the magnetic field. Figure 2-1.1.5.1 shows magneto resistive current sensors from the family CMS20XX:Figure 2-1.1.5.1: CMS20XX Magneto resistive current sensor family. Permission asked from lust-Practical magnetic field sensors based on the magnet resistive effect are easily fabricated. To reduce the temperature dependence, they are usually configured as a half or a full bridge. In one arm of the bridge, the barber poles are placed in opposite directions above the two magneto resistors, so that in the presence of a magnetic field the value of the first resistor increases and the value of the second decreases. The linearity of magneto resistive sensors is not very high, so the compensation principle used on Hall sensors is also applied here. An electrically isolated aluminum compensation conductor is integrated on the same substrate above the resistors. The current flowing through this conductor generates a magnetic field that exactly compensates that of the conductor to be measured. In this way the magneto resistive elements always work at the same operating point; their nonlinearity therefore becomes irrelevant. The temperature dependence is also almost completely eliminated. The current in the compensation conductor is strictly proportional to the measured amplitude of the field. The voltage drop across a resistor forms the electrical output signal. Magneto resistive current sensors have many advantages such us compatibility with integrated circuits, high sensitivity and good accuracy.2-1.2 Power Relay SwitchA power relay is and electrically operated switch. It is designed to withstand the current of the electrical circuit into which it’s inserted and to cut off the electrical circuit under load. Many relays use an electromagnet to operate the switching mechanism. A power relay is going to be used in our application as we need a device that can cut the power of an appliance. The relay uses an electromagnet to open and close an electrical circuit. The basic design of a relay consists of an electromagnet coil, an armature, a spring and some contacts. When power is applied to the power relay, the electromagnet attracts the armature. The armature which is held in place by the spring will be pulled in the direction of the coil until it reaches one of the contacts and therefore closes the circuit. If the relay is closed per design, then the coil pulls the armature away from the contact instead of trying to reach a contact. In this case, the circuit will be open and the power will be cutoff.We have considered several switching devices. The first device we could consider for our design would be the TRIAC and use it as a switch. The TRIAC switch is a small semiconductor device. It is similar to a diode or a transistor. The TRIAC would be a very inexpensive device and it offers good switching power consumption for non reactive loads. However, it has few cons such as the requirement of additional circuitry if reactive loads are required to be switched on and off and it also has a higher series resistance than conventional latching relays. The TRIAC has two terminals, which are wired into two ends of the circuit. There is always a voltage difference between the two terminals, but it changes with the fluctuation of the alternating current. The TRIAC acts as a voltage driven switch where the voltage on the gate controls the switching action and a variable resistor controls the voltage on the gate. Another method we could consider would be the solid state relay switch. The solid state relay is an ON/OFF is a control device in which the load current is conducted by one or more semiconductors. We can consider the solid state a TRIAC with embedded additional circuitry to turn on and off active and reactive loads. While the solid state relay requires low control circuit energy to switch the output and it is also easy to control, it has some disadvantages such as high price, high series resistance and high power consumption compared to the latched relay switch.Another way we could turn the power off a device will be using a mechanical switching relay. The mechanical latching relay provides good series resistance and is easy to control. The most important benefit of using this kind of relay is that fact that its power consumption can be manipulated to be zero. A main disadvantage is that it requires extra circuitry and a different algorithm to switch it on and off. Also we need to be careful not to short the circuit with control signals due to its bridge driving circuitry. When we think of a power relay, we think of a switch. We considered a simplified circuit to show how a relay would work. It is simply a circuit that turns on and off the power. The following circuits illustrate how a relay can be represented in both the on and off state:Figure 2-1.2.1 shows a simplified circuit of the ON and OFF state of a power relay: Figure2-1.2.1: equivalent circuits for ON state (b) and OFF state (c). Permission asked from 2-1.3 Printed Circuit BoardThe design calls for the use of a printed circuit board. The printed circuit board is generally made of one or more layers of insulating material with electrical conductors. The insulating material could be anything of the base of ceramics, plastic or other dielectrics materials. This part of the project consists of simply ordering the right printed circuit board. There are many vendors and the prices are reasonable. The vendors also provide the free software to create the circuit board layout. Besides having the printed circuit board fabricated with minimal flaws, the design allows us to define and design multiple layers. The use of multiple layers in our printed circuit board will assist in the complexity of the circuit. We intent to use either a 2 layers PCB or a 4 layer PCB. A 4 layer PCB will allow us to have planes designated just for power and ground. This will help reduce the complexity of the routing especially that none of the group members has any soldering experience. The 4 layer PCB will also help in reducing the inductance and impedance across the board and will prevent ground loops from happening. 2-1.4 CommunicationThere are two basic forms of communication that could be considered acceptable to be used for this type of project – powerline and wireless communication. The biggest, and most obvious, difference between the two is the wired versus wireless aspect. Of course, the inner workings of each vary greatly, which creates an extensive variation in the internal categories of each option, thereby providing several alternatives for data transmission. The first technology that was looked into was powerline communication. Powerline communication is merely using the existing power infrastructure in a house as the communication path, which would require no extra wiring to be installed for use. Within powerline communication, there are a few major methods and protocols that are currently in use. The most important systems include, but are not limited to: X10, Universal Powerline Bus, and the Homeplug Standard. However, each of these technologies may be affected by noise on the powerline which can be introduced by home appliances, such as vacuum cleaners, blenders, televisions, and other such 16764001104900devices. Below is a figure depicting how devices can be connected over the powerlines within a residence without any wiring other than the already installed power structure. Figure depicting powerline communication capabilities.Permission asked from embedded-.X10 is a fairly simple protocol that has been in use for many years. However, the X10 has a fairly low data rate at 20 bits per second, and the signal has a reliability rate of 80%. Due to the possibility of a lost signal, the protocol sends each signal twice, which contributes to the lower data rate. X10 uses a house code, unit code, and a four bit function code to control devices. These signals are sent using a 1 millisecond burst of 120 kilohertz at the zero crossing point of the 60 hertz power signal. Ones are represented by a burst, immediately followed by an absence of a burst, and a Zero is signaled oppositely – an absence followed by a burst with an expected absence. All signals are sent twice, in order to correct for false signaling. Due to the double signaling, the data rates are very low which makes X10 solely confined to turning devices on or off. Even such functions as creating a “scene,” turning on lights and controlling the dimming in one swoop, are beyond the reach of X10. Below, the table of codes displays the actions the X10 is able to perform in one signal.CodeFunctionDescription0 0 0 0All units offSwitch off all devices with the house code indicated in the message0 0 0 1All lights onSwitches on all lighting devices (with the ability to control brightness)0 0 1 0OnSwitches on a device0 0 1 1OffSwitches off a device0 1 0 0DimReduces the light intensity0 1 0 1BrightIncreases the light intensityShortened table of X10 CodesThe Universal Powerline Bus is another technology that is used primarily for home control. Unlike X10, it has a much higher successful data rate. Due to the way that the signals are sent and received, UPB’s transmission and reliability are considerably more accurate than X10. UPB uses precisely timed pulses superimposed on the AC sine wave. These pulses are created by charging a capacitor to a very high voltage and discharging it at a specific time. The signal can be picked up over a large distance due to the high voltage spikes. The Universal Powerline Bus protocol specifies a window called the UPB Window wherein the value can hold either 0, 1, 2, or 3. This method of communication is not confined to the Universal Powerline Bus, but is widely used in digital communications and is called the Pulse Position Modulation. Universal Powerline Bus can achieve higher data rates, because each ‘bit’ of sent data actually contains two bits. Each ‘bit’ can be transmitted on every half cycle of a 60 Hertz power signal, allowing it to achieve 240 bits per second which makes it ideal for home control. center0Description of PPM implemented in UPBPermission asked from Homeplug is a standard that is used for broadband communication over powerlines. While the technology is worth mentioning, the specifics weren’t considered as much as the data rates that Homeplug was capable of processing were well over the needs of the project. This standard is included to provide a complete look at the main powerline communication technologies, as well as the viability of powerline communications for higher data rates.As previously stated, the other viable way to transmit data would be to do so wirelessly. As technology in the modern world grows, so do the vast and various ways to communicate wirelessly. Research into the subject showed that there were many different methods on the market today.A company called Nordic Semiconductors produces a unit, called the RF24L01+ which was carefully analyzed for the needs of the project. Of course, the products typically found within a communication device were also considered – cellular, Bluetooth, Zigbee, and WiFi. All of these mechanisms are able to communicate wirelessly, are already a part of the common knowledge of the population, and are generally small enough to fit within the scope of the project.The aforementioned device, Nordic’s RF24L01+, was quite promising in research. The cost is very low, much lower than most technologies. It uses very little power, which is why it is used in many long-term battery-powered wireless devices, such as the Nike+ hardware which communicates with an iPod. This wireless radio can reach accurate data rates of up to two Megabits per second, which is much more capable than either of the powerline communications. The Nordic part is extremely flexible – it is able to transfer a small amount of data between a sensor and a computer, or even create a mesh network. The mesh network, however, isn’t supported out of the box, and the user would have to write their own mesh network protocol for the units. The Nordic part is a great base to build off of and retains a very small footprint, being less than the size of a quarter (as seen below.)17335500Nordic Radio, about the size of a quarter.Permission acquired from Another wireless technology that is quite ubiquitous is cellular. Cellular is everywhere – it reaches most places indoors, which would make it a useful resource for this project. However the radios themselves are expensive, they consume a lot more power than the project demands, and to move their data the homeowner would have to pay per kilobyte sent. These disadvantages of cellular go against the goals of the project, which includes reducing power consumption and creating a viable, inexpensive alternative for homeowners to reduce power usage and expenditures. In terms of size, cellular radios are far from the smallest of the technologies researched, having four times the footprint of the Nordic Radio. If the project required that the power measured be in a remote location, far from the display unit, this technology would make sense for the needs of the project. As it is, that isn’t the case, so cellular radios aren’t really considered a contender as it doesn’t meet the needs of the project. Zigbee was the first technology considered by the group as a wireless solution. Zigbee is already used in home control and monitoring, which lead the group to further examine this interesting wireless communication device. A great advantage to using the Zigbee technology is that it allows for the creation of mesh networks, pictured below.9810750The ability to create a mesh network would allow for subsequent units (nodes) to be out of the initial range of the display (parent) unit without halting communication. The nodes would be able to send and receive data, passing along the information received from outer nodes to the parent unit. Researching into applications of Zigbee showed that the technology is difficult to implement and usually leads novices into a mire of problems, which ends up causing more trouble than it is initially worth. However, while researching Zigbee, the group came across a product that implements the basic, attractive Zigbee advantages in an easier to use and implement product, called Xbee. Xbee is a wireless solution that is produced by Digi, which was based on the Zigbee Protocol. Digi has created a radio that implements all of the best of Zigbee without the mess. For instance, it uses an AT command set which makes the Xbee much easier to implement directly out of the box. The latest version supports mesh networking, though this requires much more effort and implementation for the user. However, unlike Zigbee, the Xbee allows the group members to take full advantage of their knowledge to create a reliable mesh network without going beyond the capabilities expected. As well, the range for the Xbee unit is perfect – 100 meters is described as the short range, which allows for attenuation through the walls of a house yet would still cover almost any normal residence’s width or length. If not, the mesh networking would make up for any loss of signal. Compared to the Nordic radio, the Xbee unit is much more expensive and uses more power, but it achieves higher accurate data rates ensuring the user’s information gets from point A to point B. While the Nordic radio has a strong battery life, it is assumed the project’s final device will be connected to an AC power line at all points, which makes the expected battery life of the Xbee null and void. WiFi is a great technology for interoperability, with just about anything; it is used in communication devices from the Xbox 360 to the cellphone, to the iPad. For this project, however, this is the last and only positive advantage to using WiFi. If WiFi were used, it would allow for an entire house network, but it would use a lot more power than any other technology and would require a better microprocessor in the sensor units. The new microprocessor would increase power consumption of the whole project, thereby undermining the goal of reduced electricity usage. The data rates that can be achieved over WiFi also aren’t needed in this project, thus WiFi wasn’t researched further as preliminary research showed it wasn’t a plausible alternative. 2-1.4 MicrocontrollerWhile researching microcontrollers, a few different schemes were found that could be used. The first one considered was from a dedicated power metering circuit designed by Analog Devices, and two others were found while researching possible wireless technologies. The main uses for a microcontroller in this project are to control the flow of data to and from the sensor units and display unit, meanwhile performing any calculations on and converting the analog signals from the metering components. The group also sought a microcontroller that would be programmable in the C programming language. The three microcontrollers researched are the Microchip PIC 16C67, the Arduino family using the ATMega 328, and the ZB1 board with support for the Xbee wireless radio.From a microcontroller standpoint, the Microchip PIC 16C67 was considered a suitable scheme as it provided an entire system on a single board. The Analog Devices circuit was designed to allow the power company to meter a residence’s home energy usage, using a seven segment LCD display. Which the MicroChip PIC 16C67 could be programmed in C, it was already fully designed and required the use of the AD7755 part to be functional in the given state. While the part excelled in all of the microprocessor aspects the group sought, the disadvantages of the power metering had to also be taken into account. Below is an image of the Microchip alongside the required circuit it needs to be functional.4095750PIC 16C67 and AD7755 Circuit.Permission asked from .The ZB1 microcontroller board was also considered, since it was recommended to be used alongside the Xbee unit. In fact, this board is already interfaced with the Xbee unit so that part of the design would already be taken care of – a cause of concern for the group since the group sought to design this part as well. Another disadvantage of the ZB1 microcontroller was its size. The board took up 4.4” x 1.75”, which was too large for implementation in the final unit. This board is very similar in design and use as the Arduino microcontrollers, featured later. Unlike the Arduino family, however, there is only the one model offered of the ZB1 which doesn’t provide the scalability that Arduino has available. The Arduino family of microprocessor boards has everything one could possibly want in one convenient package. The Arduino family offers several analog inputs, twice as many digital outputs, and interoperability with various products. One concern in using the Arduino family is the availability of a C programming language. Conversely, the Arduino family has a development environment for Windows, which uses a modified version of the C programming language, with additional specific commands for controlling the pin functions of the digital pins and the special multi-use pins. 2-1.5 Touch Screen There are many types of touch screens available. Care must be taken to choose the correct one for this application. The first type, called resistive touch screen are created by applying two sheets coated with resistive material separated by an air gap. One sheet will have vertical lines, and the other will have horizontal lines. When the user touches the screen, the location is registered. Resistive touch screens work well for this application. They have the advantages of being used with styluses and pens rather than only fingers in addition to being relatively inexpensive. Resistive screens are in general low power, and are widely available in many sizes.A second type of touch screen is surface acoustic wave. This operates by the device sending ultrasonic waves across the surface of the device, and when the panel is tapped, the energy of the wave created is reduced, and the device registers a hit as shown in figure 2-3.1.1. Surface wave screens are interrupted by outer forces such as loud sounds, and rely on the screen to be mostly clean, otherwise the waves are dampened, and the device fails.Figure 2-5.1.1 permission requested from Another type of touch screen is the capacitive touch screen. Although there are many types of capacitive screens, they all operate in a similar way. A surface capacitive screen is created by taking a thin insulator, and coating it with a transparent conductor, as shown in figure 2-5.1.2. To use the screen, another conductor with energy, such as the human body, can touch the screen, which results in a change in the magnetic field of the screen. This change is measurable as capacitance. Projected capacitance is a technology where a conductive layer of electrodes is etched into a screen. These are extremely small, and have a high resolution of nodes compared to other types. These nodes are placed on the back of the glass substrate in use. This allows progressive capacitive screens the ability to the used without direct contact. Another type of touch screen is the mutual capacitance screen. Here, an array of capacitors is placed in a grid of a reasonable size across the screen. Now, whenever a part of the screen is pressed, the capacitor is discharged, and the location of the touch can be found. Capacitive screens can only be used by conductive materials, which is a positive since they can be cleaned with a cloth without any interruption. If a stylus will be used, a conductive one will be needed. Capacitive screens are in general more responsive than resistive screens, but are more costly.Figure 2-5.1.2 permission requested from Infrared touch screens use a grid of infrared LED and photodetector pairs around the outer edge of a screen. These can detect interruptions in LED beams which cross each other in perpendicular patterns. By finding the X and Y LED beam number, the exact location can be found, as shown in figure 2-5.1.3. This system can be activated by anything that can interrupt a beam. Thus, they are popular as point of sale kiosks in restaurants where users do not always have a conductor available. Unlike other types of touch screens, infrared screens do not require any modification to the glass used, and thus increases the clarity of the glass over the long term. Figure 2-5.1.3 permission requested from Touch screen monitors are in reality any LCD monitor with a capacitive or resistive overlay. Thus, the brand or quality of the monitor itself is not a large issue. Because of the scope of the project, a small 8 to 10 inch monitor would work very well whereas a larger monitor would be bulky and unnecessary. The quality of the screen must be great enough to be left on for a range of 5 minutes to an hour without burning an image. In addition, the screen must be able to go into a sleep mode for when the device is on, but the screen is not needed.2-1.6 Surface Mounting MethodsThe next part to discuss would be how we are going to surface mount the parts into our circuit boards. There are basically two methods to do so; the old method is the through-hole technology. In the through-hole technology, the components are placed on one PCB side and soldered on the other. The other method to approach this is the surface mount technology. In the surface mount technology the components can be assembled on both sides of the board. The components are attached to the PCB by solder paste or non conductive glue and then soldered.2-1.7 SoftwareThe software goal of the project is to create a touch screen environment which will display graphs of time versus kilowatts per hour, with menu options to navigate and modify the software using touch. This action requires the touch screen itself, a processor for the operating system, and the remainder of the computer system. Because of this, an operating system will be required.For this project, the operating system needs to be lightweight enough to operate in the small amount of memory that will be available, and yet flexible enough to issue the required commands. Thus, an embedded operating system is needed. An embedded operating system is like a standard operating system like Windows or OSx, but it is more compact, and lacks many features commonly seen today such as a complex user interface. These embedded operating systems fall into the category of a Real Time Operating System, or RTOS.Many different brands and types of RTOSes exist. The embedded system for this project will run on a version of embedded Linux. With an embedded Linux, we can have a stable environment to run the specified dynamic code along with the freedom of no licensing fees or royalties. Support exists for embedded Linux on the ARM processor. Embedded Linux only requires about 100 kilobytes of memory to operate all basic system functions. If networking and stack utilities are added, 500 kilobytes of memory is required. A GUI is needed for the project. Ideally, the GUI will be minimalistic where there exists enough relevant information on a page, but there is no clutter or unnecessary graphics or data.In a conventional GUI graphics model, mouse clicks or keyboard strokes create events that are continuously checked by an application. Thus, it is an event driven process. These events are sent to the focused window, and are transferred to procedures related to the window for processing. The procedures to do so are defined by each application or a standard procedure. The window procedure for handling events identifies exactly one window class, where windows with the same window procedure are considered to belong to the same window class. Many GUI design tools exist. One such product is GEMstudio. GEMstudio was created by Amulet Technologies and is an industry leader for interface solutions for embedded products. An advantage of GEMstudio is that it handles all LCD and touch screen functions, so the microprocessor does not need to. The system uses a proprietary LCF module with a 480x272 color TFT LCD, with backlighting and a clear analog touch screen on a controller board with Amulet’s GEM-compliant ASIC. The system uses USB to connect to the programming computer. The system runs on a 5V power supply. The downside to this GUI creation tool is that the screen used must be the one provided from Amulet Technologies. This would require us to create an embedded system and processor to support the other functions of the device. Thus, this solution is not ideal.Qt software also has a branch dedicated to embedded system GUIs. Qt builds on the standard API for devices with embedded Linux devices. It uses its own compact window system and writes directly to the Linux framebuffer. This is the essence of an embedded GUI. The ideal GUI creation library found is called MiniGUI. It is open source, but does not require a license. As taken from the introduction on , “MiniGUI, is one of the world famous free software projects. MiniGUI aims to provide a lightweight graphics user interface (GUI) support system for real-time embedded systems.” The touch screen GUI will be modeled using the MiniGUI framework in C++. MiniGUI has a vast amount of support for projects like this one, specifically including the ARM processor. This will assist in creating the menus the user will navigate. Features include a multi window mechanism where multiple windows can be open at a given time. This would be preferred because the requirements state multiple windows of real time graphs. MiniGUI supports widget controls such as multi line edit boxes, labels, and animations in addition to many fonts, and natively offers support for touch screen calibration. It can support many image file types such as GIF, JPEG, and BMP. MiniGUI can be run in three distinct run modes. The first is the “MiniGUI-Threads” which can allow a program to create multiple cascading windows, and allow all of the windows to belong to a single process. “MiniGUI-Processes” causes ever task to be its own process. This setting is the most suitable for embedded systems. “MiniGUI-Standalone” is the single process mode where only one process is active at a time. MiniGUI uses only 700KB of flash memory and 1MB of RAM. This will allow space for other aspects of the software. The size of the MIniGUI library can be reduced to 500KB or less if necessary. The many functions of MiniGUI allow it to be used in low in products with CPU frequencies as low as 30MHZ and up to high – end products. The windows can be skinned however the creator chooses. It’s cross-operating system features makes it simple to run MIniGUI on most embedded opertating systems, and allow complete access to multi-window systems. The GUI system can be configured to satisfy different requirements of embedded systems. It has many configuration options, and it can be designated to include or exclude certain libraries to include or exclude features the developer may or may not be using. Thus, MiniGUI has strong scalability, which allows it to be applied from simple devices, to complicated electronic systems. The architecture and optimized graphics interfaces of MiniGUI allow for an extremely fast graphics output. As mentioned before, MiniGUI was designed for real-time systems, and basics such as compactness, high efficiency, and high performance were in mind from the beginning of its development. The relationship between MiniGUI and other parts of the operating system is shown in figure (figurenumber). A MiniGUI application can use its functions by calling APIs from the ANSI C library and the MiniGUi libraries. The portable layer prevents the applications from taking care of input and output devices by hiding the details of hardware and the operating system.Figure 2-1.7.1 permission requested from Programming in MiniGUI begins with calling at least the following five header files for any GUI. The first is common.h. It includes the definitions of macros and data types most commonly used in MiniGUI. The second is minigui.h. . In this header, we include definitions of global and general interface functions, among various other functions. The third is gdi.h. This header file includes the definitions of interfaces for the MiniGUI graphics functions. Window.h includes the definitions of macros, data types, and data structures, which are relative to windows and declarations of function interfaces. The final header file, control.h includes the definitions for all of the built-in controls in the MiniGUI library.The initial user interface of any MiniGUI application is a main window. This window can be create by calling the CreateMainWindow function. The argument of CreateMainWindow is a pointer to the MINWINCREAT structure, and the return value is the handle to the created main window. Menus can be created with the CreateInfo.hmenu command. This sets up a menu with a value of 0 indicating no menu, and 1 indicating that a menu exists. CreateInfo.hCursor = GetSystemCursor(0) ; will return the default cursor of a system to the location of the cursor.Three main libraries in MiniGUI exist. Some of these may or may not be included depending on the use of the application. The first is the core library, libminigui. It includes the basic set of instructions needed for most GUI applications. The other two are libvcongui and libmgext. Libmgext includes controls and graphics for user interface routines such as “open file” dialog. Libvcongui is a virtual console support library. MiniGUI has three window types, main window, dialog box, and control window. Each application creates a main window. In each main window, there are several child windows, and the child windows are control windows or user-defined window classes. In addition, MIniGUI can be used to create a dialog box. These boxes are actually main windows, but prompt the user to perform an input operation within the dialog box before it will continue. DestroyMainWindow will destroy a main window, but will not destroy the message queue of a main window, or the window object. The function, MainWindowCleanup will destroy the message queue and the object.The graphs will be created using GNUPlot, a lightweight graphing utility for Linux. This software is copyrighted, but freely distributed. GNUPlot was created for scientists and engineers to freely view graphs and figures, and has support for interactive screen terminals. Much documentation exists for GNUPlot on the internet, as it has extensive documentation and support containing tutorials, premade scripts, and other helpful documents. GNUPlot supports most mathematical expressions that would be available in C, FORTRAN, Pascal, or BASIC programming languages, while ignoring white space inside expressions. GNUPlot uses real and integer arithmetic where one can be chosen above the other. This will be helpful in finding exact numbers. Another helpful factor in GNUPlot is a numerical value is promoted to a integer or real value when used in an expression. For example, “4”+”5” == 9 would be true. Graphs are created with the “plot” function. Plot allows for the axes to be set with names as options, and allows the user to set what data will be the source for the graphs. The documentation warns that floating point exceptions are possible in GNUPlot. Whether or not the system will ignore or crash the application is dependent on the compiler and runtime environment. So, any functions will have to be inspected before they are used. GNUPlot’s time counts wrap at 24 hours, and are accurate to 1 second. This project will not be handling times of less than 1 minute, so there is a surplus of breathing room in the calculations of time.It would be preferred that all programming be done in the same language. The current programming convention is object oriented coding. For the maximum control and compatibility, it was found that C++ would be ideal. Java was also considered due to its user friendliness, but the C++ libraries are not ponentsCurrent Sensor and Power Relaya Hall effect current sensor will be used to sense the current. We chose this kind of sensors over the other technologies because of safety and reliability considerations. As discussed earlier, the Hall Effect current sensor will be totally isolated from the high voltage electrical system which eliminates many safety concerns.?Also, the Hall Effect current sensor will not get hot while we are measuring the current. The cost was also one of the considerations; the Hall Effect current sensor should not cost us more than $20 per unit. When it comes to the power relay, we decided to use a solid state relay over an electromechanical relay. The reasons behind our choice are the fact that the solid state relay is smaller that electromechanical relays. This will save us space in the PCB. Another reason is that the solid state does not have any moving parts, which offers improved reliability. The other reason is the fact that a solid state relay does not have contacts, so we do not have to worry about wear issues. The relay will basically last forever as long as it’s used per the manufacturer requirements. The cost was also considered. Wireless Connectivity ModuleThe design of the project requires many things from the sensor units. First, the units must be able to communicate with the display unit without additional wiring installation. As well, they must be able to be installed anywhere in a house without specific consideration of where the display unit is placed. Finally, the sensor units should operate with a low power consumption since that is part of the final goal for the project. These three constraints allowed the group to examine many different technologies, and eliminate the differing data transmission technologies to come to the decision of which one to use.As the group first considered the aspect of wireless versus power line communication, there were many advantages and disadvantages to the multiple types which were previously described. However, the group decided that they wanted to use wireless communication in the project, to provide the safety of knowing that the signal will make it to the receiver uncorrupted by the noise on a power line. As well, wireless communication would offer extensibility with it being applicable without any consideration for whether the house is on a multi-phase system or not, which interferes with power line communications. Having make that initial decision, the group turned to the different wireless communication technologies there are to choose from and sought the perfect type of communication product for this project.The group was able to initially eliminate Cellular and WiFi, as they both are outside the scope of the project and those communication technologies are not needed for the design. This preliminary exclusion left Bluetooth, the Nordic part, and Xbee for further research and discussion. While Bluetooth is quite useful in many ways, the group felt that the range provided by the lower power Bluetooth modules wasn’t right to meet the needs of the project. While the Bluetooth can create point to multi-point networks, and even mesh networks, the complexity to make that happen with Bluetooth modules is beyond the scope of any of the group members’ combined knowledge.Without Bluetooth, the two remaining components to choose from are Xbee and the Nordic part. Both wireless communication technologies are able to create mesh networks, so this was not the deciding factor between these two devices. The range and data rates put the Xbee ahead of the Nordic part, although the Nordic device won out in the fields of cost, size, and power usage. Another point that put Xbee ahead was the fact that the data transmission is reliable where the Nordic part doesn't always do a good job of making sure the data is received, which is more important to the group members over the cost. 2114550548640In the end, the Xbee wireless radio will be used in the project, allowing for mesh networking, reliable communication, more than sufficient data rates, and interoperability with the chosen microcontroller. Size of Xbee wireless radioPermission asked from ____The choice was based on several considerations such as:Simple 3.3v UART interface that should work with most microcontrollersreasonable cost ( around $17 to $25 per module)40 m to 90 m range (depending on specific model, we can use multiple models depending on which room we are in)Extendable range, we can purchase longer range units that will cost a bit more and seamlessly interface with the lower range unitsLow power (Less than 40 mA at 3V), they also come with adjustable power so the unit may be put in low power modeAvailability of the Development kit available (for around $180 to $230). The kit will include 2 development boards (1 usb, 1 serial) – 2 Xbee-Pro modules and other accessoriesAvailability of the manuals on Digi’s website MicrocontrollerThe group’s initial idea in the component selection was to pick a microcontroller which would allow them to design the power metering side of the circuit, and would preferably be able to work with a C-language programming. This idea allowed the group to very easily decide that the PIC16C67 was not the microcontroller they wanted, because they did not want to rely on the AD7755 to measure the power. The group did not want to leave the power metering side in the hands of the microprocessor manufacturer. This leaves the ZB1 board and the Arduino family of microprocessor boards.The ZB1 board was carefully considered due to it’s similarity in structure to the Arduino family of boards, and it has a built in socket for an Xbee radio. However, because of the built in socket, the board is quite large and doesn’t allow for the group to design much in the way of space savings. In the end, while the board would work it would end up being too large for any practical application of the sensor units. The Arduino family of boards, being all that is left, is the final choice of the group. There is a board for almost any size application, which makes it convenient in respect to the group’s desire to design and control the size and structure of the final device. At one point, the group considered the idea of having the display simply be an Android application. This would have allowed the information from the device to be seen from anywhere in the world, and this would have allowed the user to control their home energy usage even if on vacation. To do this, the project would have required a smaller microcontroller than what is being used for the display unit and would have been one of the larger Arduino boards. However, this idea was scratched in favor of a touch-screen embedded solution which has a processor of its own, to allow for better visualization and control of the screen.12579351196340For the sensor units, small is the key. The Arduino Pro mini manufactured by Sparkfun electronics was just the right size for the project, as seen below. The Arduino has the appropriate input and output pins to handle the analog measurements and the serial communication of the Xbee module. The ability to program the microcontroller in a modified C-programming language was an enormous boon and definitely a major factor in the decision to use it. Small size of the Arduino Pro MiniPermission asked from .auThe programming of the Arduino is done in a modified version of C/C++. The modified part of the development language is the special functions that have been added in to give users direct access to helpful tools and pin modes. Some of the more useful functions that will be used in the project are the following:pinMode() – Configures the specified pin to behave either as an input or an outputdigitalWrite() – Write a?HIGH?or a?LOW?value to a digital pin. If the pin has been configured as an OUTPUT with? HYPERLINK "" pinMode(), its voltage will be set to the corresponding value: 3.3V for HIGH, 0V (ground) for LOW. If the pin is configured as an INPUT, writing a HIGH value with digitalWrite() will enable an internal 20K pullup resistor, LOW disables it.analogRead() – Reads the value from the specified analog pin. The Arduino board contains a 6 channel (8 channels on the Mini and Nano, 16 on the Mega), 10-bit analog to digital converter. This means that it will map input voltages between 0 and 3.3 volts into integer values between 0 and 1023.?analogReference() – Configures the reference voltage used for analog input (i.e. the value used as the top of the input range). Can be the default 3.3V or any of the internal references available (1.1V or 2.56V), or external (voltage supplied to the aref pin).millis() – Returns the number of milliseconds since the Arduino board began running the current program. This number will overflow (go back to zero), after approximately 50 days.delay() – Pauses the program for the amount of time (in miliseconds) specified as parameter. (There are 1000 milliseconds in a second.)attachInterrupt() – Specifies a function to call when an external interrupt occurs. Replaces any previous function that was attached to the interrupt. Most Arduino boards have two external interrupts: numbers 0 (on digital pin 2) and 1 (on digital pin 3). The Arduino Mega has an additional four: numbers 2 (pin 21), 3 (pin 20), 4 (pin 19), and 5 (pin 18).There is also a very handy serial library that allows serial communication using the RX and TX pins, which also means that pins 0 and 1 cannot be used as digital I/O pins. The serial library will be used to communicate with the Xbee module. Some of the special functions that the group will be using are:Begin() – Sets the data rate in bits per second (baud) for serial data transmission. For communicating with the computer, use one of these rates: 300, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, or 115200. You can, however, specify other rates - for example, to communicate over pins 0 and 1 with a component that requires a particular baud rate.End() – Disables serial communication, allowing the RX and TX pins to be used for general input and output. To re-enable serial communication, call? HYPERLINK "" Serial.begin().Read() – reads incoming serial data.Print() and Println – Prints data to the serial port as human-readable ASCII text. This command can take many forms. Numbers are printed using an ASCII character for each digit. Floats are similarly printed as ASCII digits, defaulting to two decimal places. Bytes are sent as a single character. Characters and strings are sent as is. Another great upside to the Arduino Pro Mini is that it allows for an unregulated power supply to act as the power supply, up to 12 volts through the RAW pin. This allows for leeway in the power supply design on the sensor units and flexibility of the microcontroller board itself. It is also possible to provide the unit with a regulated power supply at 3.35V through the VCC pin but this would be unnecessary and allow for the design to incorporate a single power supply for all components. Below is the built in power regulator which connects to the VCC pin.center0The Regulator built into the Arduino Pro MiniPermission granted by the Creative Commons LicenseMicrocontroller:Atmega168Operating Voltage:3.3VInput Voltage:3.35 – 12 VDigital I/O Pins:14Analog Pins:6DC Current per I/O Pin:40mAFlash Memory:16KB(2KB used by the bootloader)SRAM:1KBEEPROM:512 bytesClock Speed:8MHz Motion DetectorA motion detector may be added to the unit to give additional features. A motion detector is a device that can quantify motion so that it can be integrated into a device system to alert the system if an object comes within its field of view. These are most used in home security systems. If a motion sensor were to be added, it would most likely be prebuilt, rather that built from scratch to save time. If added, this piece would allow the system to be set to turn all electronic devices off when a person is not detected in that particular room. The idea behind this is the user would have an even more passive role in his or her energy reduction.There are three different types of motion detection sensors. The first type of sensor is the passive infrared sensor. These are the most widely available type of motion sensor. This is a device that measures infrared light radiating from nearby objects. The term “passive” indicates that the device itself does not emit any beams or radiation, it merely detects them. The sensor is made of a thin pyroelectric material film. It can be made from gallium nitride, cesium nitrate, or polyvinyl fluorides. To focus the infrared radiation, most detectors use fresnel lenses. This is generally put into a case as shown below.Figure 2-2.4.1 infrared motion detectorAfter research, it was found that this type of sensor can detect a person through body heat emitted as infrared radiation. It will sense anything with a weight greater than approximately thirty pounds. The other two types of motion sensors are active sensors. Ultrasonic sensors send out pulses and measure the reflection angles. If anything within the field moves, the reflection angles will change, and the unit detects the movement. The final type of sensor are microwave sensors which send out microwave light pulses and measure the reflection off of a moving object. This type is most similar to a police radar gun.An ideal motion detector for this project would be one that could be set to on or off, while still not resulting in Vampire Draw. The amount of power used is the largest drawback for this addition. Other ComponentsOther than the main components discussed above, the design will require the use of some basic components such as resistors, capacitors, amplifiers, filters and regulators. The need of adjusting voltages to suit the required microcontroller input voltage for instance will require the use of an attenuator or a regulator. The same rule applied to the current sensor and relay. We will use any of these components as needed. The cost will virtually be zero as we plan on using parts for the senior design lab.DesignPower and Current Sensing CircuitWe have decided to use a Hall Effect current sensor in our design. As explained earlier, this kind of sensors has so many benefits and is appropriate in our design. After extended research, we decided on using the Hall Effect sensor from . The sensor’s description is below:Current Measuring Range DC:0 to 72A Current Measuring Range AC:0 to 72A Supply Voltage Range DC:6V to 12V Sensor Output: Open LoopResponse Time:3msCurrent Consumption:20mA Output Type: LinearSupply Voltage DC Max:13.2V DC Supply Voltage Range DC:12V Connector Type:3 Pin Device Type: Open Loop Linear External Depth:35.6mm External Length / Height:10.4mm External Width:34.3mm Hole Diameter:10.9mm Operating Temperature Max:85°C Series: CS Supply Current:20mA Supply Voltage DC Min:5.4V DC Temperature Operating Min:-25°C Transducer Function: Linear Current Sensor Reasonable price of around $15 per unitTo implement this part of the design, we will wire the power source to the sensor. The sensor will have the positive and common input terminals clearly marked. A typical sensor runs on between 4.5 and 8 volts at 5 milliamps DC. Also, we will need to test the sensor by measuring its output with the voltmeter. The Hall Effect sensor output will be connected to the microcontroller. The following figure shows a possible configuration of the part of the design.Figure 3-1.1 shows how the Hall Effect sensor will be connected:Figure 3-1.1: Hall Effect sensor circuitThe circuit is an inverting amplifier circuit. The 100k variable resistance shifts the input signal. It can be set so that the output lies within the Arduino's 0 to 5V input range. The 1k variable resistance sets the amplification factor. By varying both resistances it is possible to set the current measurement range of the circuit. Since this is an inverting amplifier circuit, the output is inverted so that when the current increases the signal input to the Arduino decreases from 5V to 0V. Power RelayPower relays are typically discussed in terms of several things such as the power the high power side can handle in Amps, the voltage and power type (AC or DC) the coil needs to operate and the number and type of contacts the relay has. The first thing we need to discuss is the power rating. We can say that a relay is rated for its capacity to handle power. The relays we have been searching were described as 20A, 30A, and several different values of current. We realize that the relay rating must be higher that the maximum rating of the appliances we will test our system on. The second thing is the coil voltage and type. This characteristic is typically omitted when working in a known environment. The third thing is the number and type of contacts. This characteristic is used to control various things at once and control them by turning them on or by turning them off. The number of contacts or poles is the number of things that the relay can control at once. The relay is just an electromagnetically controlled switch. Those contacts or so called poles are described as "normally open" (NO) or "normally closed" (NC). This simply describes what the rest state means. For a power relay, that means if no power is applied to the coil wire. In the typical case where a user wants to turn something on, we would use a normally open relay because when we apply power to the relay, the contacts close, and power is sent to the desired device. In our case however, we want the relay to be able to turn things off. Therefore we will choose a normally closed relay. So when we apply the power to the relay, the contacts open and the power is no longer sent to the specified appliance or device.As discussed earlier, a solid state relay SSR is an electronic device we can use to switch the electrical current, rather than an electromechanical device. An electromechanical relay uses a magnetic coil and mechanical contacts. When current flows through the coil, it pulls down a piece of iron called an armature, causing the mechanical contacts to touch and thus close an electrical circuit. We had the choice of either a solid state relay or a mechanical relay. The solid state relay has no mechanical moving parts, but instead uses a three terminal device such as a TRIAC, a back to back thyristors, or a field effect transistor FET to conduct the electrical current. When the third terminal is energized by the control input, the device conducts. Essentially the solid state relay controls a larger electrical current by accepting a small control signal. A main benefit of using it would be the fact that here are no moving parts. Also solid state relays have no internal arcing or contacts to wear out, so they can last virtually forever. They also have extremely low control input requirements, and are immune to vibration.Other considerations that have led to our choice were the fact that the solid state relays are typically smaller than the electromechanical relays. This will help us conserve valuable space in printed-circuit board applications. Also, the solid state relays offer improved system reliability because they have no moving parts or contacts to degrade. Adding to that, solid state relays provide high performance, including no requirement for driver electronics and bounce free switching. They provide improved system life cycle costs, including simplified designs with reduced power supply and heat dissipation requirements. Another benefit would be the possibility of using a solid state relay as surface mount technology parts, which means lower cost and easier surface mounting technology printed circuit board manufacture.Another issue with the electromechanical relay would be the bounce time. The maximum bounce time of an electromechanical is the period from the first to the last closing or opening of a relay contact during the changeover to the other switching position. Bouncing causes short term contact interruptions. In our case, bounce can easily lead to false pulse counting as contacts continue to make and break the circuit during bounce. Contact bounce does not occur in semiconductor based solid state relays. So when the user decides that the power should be turned off a device, it is turned off.Figure 3-2.1 shows the relationship between operate time and contact bounce time in electromechanical relays:Figure 3-2.1 : relationship between operate time and contact bounce time. Permission asked from Since solid state relays do not have contacts, wear issues are not of our concern. The absence of contacts and moving parts means that the solid state relays are not subject to arcing and do not wear out. Contacts on the electromechanical relay on the other hand can be replaced on some larger relays but contact replacement is not practical. Another issue with the electromechanical relay would be the shorted coils. Shorted coils can occur if excessive heat melts the coil insulation. Open coils can be caused by over voltage or over current conditions applied to the coil. The circuitry used to drive the electromechanical relay can cause open coil failures if the drive circuit itself fails or is subjected to transients. Solid state relays can be driven directly from logic circuits, so an intermediate drive circuit is not required. AC load solid state relay have the benefit of zero crossing switching which reduces noise in the circuit by restricting the switching operations to the point where the voltage crosses zero.Since a solid state relay will be used. A possible configuration is considered. The relay will be connected to the load and to a control voltage. The sensitivity the minimum control voltage and current at the solid state relay turns on depends on the characteristics of the isolating component or circuit and will be documented in the relay data sheet. The following figure shows a possible configuration of the relay circuit.Figure 3-2.2 shows a photo coupled solid state relay:Figure 3-2.2: photo coupled solid state relay. Permission asked from WirelessThe Xbee wireless modules support AT commands and parameters can be set by appending AT to any of the commands. The commands are fairly simple, used to identify, and address modules. Initially the modules will need to be configured to be on the same network and channel so that they can communicate with one another, this can be done on start-up of the arduino or, be stored in the non-volitile memory onboard the Xbee module. The display units address must then be set as the destination address in each of the sensor units, so that the display unit will be the one receiving the data. Alternatively, the addresses can be set so that the data is received by all the xbee units in the network and program the Arduinos to ignore any incoming information that doesn't include the relay on/off mandDescriptionValid ValuesDefault ValueIDNetwork ID of the module0-0xFFFF3332CHChannel of the module0x0B-0x1A0x0CSH, SLSerial number of the module0-0x0FFFFFFFFDiffersMY16 bit address0-0xFFFF0DH, DLDestination address0-0x0FFFFFFFF0 for bothBDBaud rate for serial comm0-73Table 3-3.1 of the Xbee module commandsThe Xbee module has different modes that it can be in at any given point. The idle mode is important as it is the connecting mode between all the other modes. The module can quickly switch between idle and any other mode, and to change modes the module must first enter idle from one mode before transitioning to the other mode. The other modes are Transmit, receive, sleep and command mode. 14052550Figure 3-3.1 Mode state diagramPermission asked from The Transmit and receive modes are very similar in action and are closely related as when one module is in transmit mode, another module is going to be in receiving mode. The Xbee modules can be set to either Direct or indirect transmission modes. The indirect transmission mode is very important for the project as it will allow for a node to sleep and the message to be held by the sender until the sleeping node polls the sender to let it know that it is ready to receive data. In a strictly peer to peer network, only Direct transmission is allowed, where messages are immediately sent, but if a network has a coordinator the coordinator may hold a message and allow for indirect transmission. The transmit mode is even more complex in a mesh network, as the modules also need to discover a route for the data, whether this is from sender to receiver or by way of one or more intermediate nodes. Figure 3-3.2 Transmit Mode SequencePermission asked from Another important tool which increases the reliability that data is received is the ACK, an acknowledgment that the data is received. If the sender of a message doesn't get an acknowledgment the message is resent up to three times before triggering an ACK failure and losing the message.The sleep mode is a powerful energy saving tool that can be utilized to conserve power. There are two main sleep modes that can be implemented, either a pin sleep, or a cyclic sleep. When the module is in pin sleep mode, it will stay so until the sleep pin is brought back down to a zero. When it exits, it will not poll for messages, unless commanded to do so. The cyclic sleep is where the real power is, it allows for a timed sleep where upon exiting it will automatically poll for messages which is something that is perfect for the parameters of the project.Figure 3-3.3 Polling allows sleeping nodes to receive data when they wakePermission asked from Command Mode is used to access module data and program certain characteristics of the module. Command mode is entered by sending the three character command sequence “+++” when there has not been any other characters sent within the guard time, which is one second by default, but can be set while in command mode. If done correctly the module will respond with “OK<CR>” meaning the module is now in command mode. The most common way for a user to fail to enter command mode is due to a Baud rate mismatch, which by default is set to 9600 bps. To send an AT command, the user can then use the format seen below to send commands, using AT followed by an two character ASCII command and optional space, the parameter in HEX all followed by a Carriage Return. The unit will then send an “OK<CR>” response if the command is successfully executed, otherwise sending “ERROR” indicating that the command was not successfully executed. To make any changes permanent the user must then send the WR code to write the changes to long term memory.Figure 3-3.4 AT command StructurePermission asked from While in command mode there are a plethora of commands that can be issued to perform many kinds of functions. There are diagnostic commands that will let the user see any failures and check version information. These are as follows:VR (firmware version): Reads which firmware version is stored in the module. There are either three or four hexadecimal characters and if there are only three characters, the last character is assumed to be a zero. VL (firmware version-verbose): Shows information on specifics of the RF module like the date the application was built, the bootloader version and built date. HV (hardware version): Indicates which version of the hardware is being used. DB (received signal strength): Used for read the signal strength received in dBm of the last RF signal received. There is an inherent range in the module from -40 to -96 dBm. If there is no signal sent in, “0” will be displayed. EC (CCA failures): Reads the amount of failures through each of the modules. A failure in this case is when the RF module does not transmit a packet due to the detection of energy that is above the CCA threshold level (set with CA command). When the user wants to reset the count, the user must set the parameter to zero. EA (ACK failures): Reads the amount of failures through each of the modules. A failure is when the module expires its transmission retries without receiving an acknowledgement on a packet transmission. When the user wants to reset the count, the user must set the parameter to zero. ED (energy scan): Finds the max energy in (-)dBm in each channel followed by a carriage return with an extra carriage return to signify the end of the command. Having a module join an established can lead to some difficulties, but there are many AT commands to help with that, including failures. These commands help users make sure that all of their modules are communicating on the same channels and are able to join the same network:CH (channel): Sets the channel that the XBees? communicate to each other. The channel value can range from 0x0B to 0x1A with a default parameter value of 0x0C (12). To calculate the center frequency, the equation is: center frequency = 2.405 + (channel – 11(d))*5MHz. (Where d is the decimal value of the parameter. ID (pan ID): Reads the personal area network (PAN) ID of the module. If, and only if, all the PAN values match then the modules could communicate with each other. It has a default hex parameter of 0x03332 (13106) and a range of 0-0x0FFF. DH (destination address high): Will set and read the upper 32 bits of the 64- address. Has a parameter range of 0x0FFFFFFFF. DL (destination address low): Will set and read the lower 32 bits of the 64- address. Has a parameter range of 0x0FFFFFFFF. When DH and DL are put together, one can see the 64-bit combination that is the address. This address needs to be the same for all other modules to communicate to each other. MY (16-bit source address): Sets and reads the 16-bit source address of the RF module. When the MY is set to 0x0FFFF, the 16-bit packet received is disabled and the 64-bit packet is enabled. SH (serial number high): Reads the 32 high bits of the 64-bit address. This value cannot be changed and is a read-only value. SL (serial number low): Reads the 32 low bits of the 64-bit address. This value cannot be changed and is a read-only value. RR (XBee retries): Accounts for the amount of tries past the standard three retries inherent to the module. The parameter range for this command is from zero to six. RN (random delay slots): Accounts for the exponential value of the carrier sense multiple access – collision avoidance algorithm. MM (MAC address): Displays the MAC mode value. With a default parameter at zero, there are four parameters from zero to three. Zero meaning the use of the Digi mode that includes the 802.15.4 RF packet, one is just the 802.15.4 packet without acknowledgment, two is the 802.15.4 packet with the acknowledgment and three being solely enabling Digi mode without acknowledgment. NI (node identifier): Identifies particular nodes using solely printable ASCII data that doesn?t start with a space the ending has a carriage return command and once the maximum bits have been entered, the command will automatically end. This command can accept anything up to a 20-character string of ASCII values. ND (node discover): This parameter value is the same as the 20-character value given in the NI command. This command goes into each module and demands an ND command packet that is 64 bits long. NT (node discover time): The NT command will, once the parameter is set, give a specified time for whichever RF module to respond back with its 64-bit address. The parameter range for this command is 0x01-0x0FC (1-100 milliseconds) NO (node discover options): Will decide, based on its own parameter, whether or not to have its own ND response. The parameter values are either zero or one. Zero being that there will not be an ND response and with a one, there will be an ND response. DN (destination node): This command will convert any NI string to a physical string as long as the DL and DH are set to the NI and the RF module cannot be changed at the time. CE (coordinator enable): Reads the behavior between the end device and the coordinator of the module. One being the coordinator and zero being the end device, which happens to the default parameter. SD (scan duration): reads or sets the exponential value of the scanning time through multiple devices. The scan time can be calculated as with the following equation: scan time = ((# of channels to scan)*(2^SD)*15.36 milliseconds). SD has a parameter range of 0 – 0x0F with a default value of four. ED (energy scan): Displays the max energy is each channel. The value that is displayed is the energy level in –dBm. The scan time can be calculated as with the following equation: scan time = ((2^ED)*15.36 milliseconds). SC (scan channel): This command is very important for the two commands above, SD and ED. This command is used to display and or set which channels the energy scan and scan duration will be used in. A1 (end device association): Uses a combination of bits in a certain order to set certain behaviors for the end device. The parameter range is from zero to 0x0F with a default parameter value of zero. Bit zero deals with whether or not the coordinator will associate itself on PAN ID with others based on the NI command. Bit one deals whether or not the coordinator will associate itself with others based on the channel settings. Bit two deals with whether or not the device will attempt association and deals with only non-beacon systems. Bit three deals with whether or not the pin wake will pole the coordinator for any pending data. Bits four through seven are reserved and pre set. A2 (coordinator association): Uses a combination of bits in a certain order to set certain behaviors for the coordinator. The parameter range is from zero to 0x7 with a default parameter value of zero. Bit zero deals with whether or not the coordinator will perform an active scan to locate available PAN ID. Bit one deals whether or not the coordinator will perform an energy scan. Bit two deals with whether or not the device will attempt association with any other devices. Bits three through seven are reserved and will not be changed. AI (association indication): Checks to see if there are any errors while the RF module was trying to associate. The parameter range for this command is from zero to 0x013. This value is a read-only value. DA (force disassociation): Disassociates the coordinator and the end-device and then tries to re-associate them. FP (force poll): Requests indirect messages from the Coordinator. AS (active scan): Sends out a Beacon request to each channel. Indicates the time set for each Beacon with each channel. The Zigbee units can be one of three profiles, a Coordinator, Router, or End Device. The coordinator is responsible for choosing the channel and PAN ID. Routers and End Devices connect to the network that the Coordinator starts. Routers must join a PAN that was created by a coordinator and can route data through the network. Once it has joined a network it can allow End Devices to join as children. End Devices can only join the Pan and cannot assist in data routing, the End Device profile was designed with battery operated standalone devices in mind and this profile most likely will not be used as End Devices cannot participate in a mesh network. The Zigbee PAN, Personal Area Network, is formed by a Coordinator. To start the PAN the Coordinator performs scans to determine which channel it should use. It first performs an energy scan to determine the channels that have the least energy levels, which are the best to use to reduce any interference. Once that is completed, the coordinator performs a PAN Scan to determine if there are any other PAN networks already operating on a channel. If it gets a response on a PAN ID it will skip to the next PAN ID and try that one. Once it finds a channel that has the least energy profile and has a PAN ID that isn’t already being used by another PAN the coordinator will use that channel and ID to begin its own PAN. In the groups design, the Display unit will always be the coordinator.Figure 3-3.5 PAN scan looking for unused PAN IDPermission requested from The newest models from Digi, the Xbee 2.5 models, allow mesh networking. Mesh networking was important to the design of the project as it allows for a node to be out of range of another node yet still communicate with it as long as there is an intermediate node to pass the information along. To allow for this, the Xbee units have an automatic route discovery which was touched on earlier in the discussion of the Transmit Mode. To properly use mesh networking the Transmissions must be done using the so called Unicast Transmission. Unicast transmissions are always addressed to the 16 id address, but this isn’t necessarily always static, so the network can automatically detect the 16 bit address that belongs to which 64 bit address. If the 16 bit address isn’t known the node that wishes to transmit data will initiate a network address discovery using the 64 bit address. During this process, each node will check its 64 bit address against the one sent out and if there is a match it will reply with its 16 bit network address. To communicate in a mesh network the Xbee units use a route discovery method. The routing is accomplished by tables in each node that store the next hop. If the next hop is not known, route discovery must take place first, if the network is large enough, all possible paths will not be able to be stored and route discovery will happen more often.NodeDestinationNext HopRouter 3Router 6CoordinatorCoordinatorRouter 6Router 5Router 5Router 6Router 6Table3-3.2 of Mesh Network PathingThe Xbee module will also be using the Arduino shield for communication with the arduino. This shield makes communicating with the arduino only requiring the use of the RX and TX pins and powers the Xbee module from the Arduinos power supply a snap. These can be found pre-made or, can the parts and board can be bought separately and self soldered. The pinout of the Xbee shield can be seen below. This particular pinout also allows for the Xbee module to be connected to and programmed directly from a computer through an FDTI to USB cable.center0Figure 3-3.5 The pinout of the Xbee adapterPermission granted from MicroprocessorEach of the sensor units will have an Arduino board and an Xbee radio to allow for measurements and control of the relay allowing power to flow to a device. The microprocessor with control the flow of measurement data from the analog signal will perform any necessary calculations and send that information through the Xbee radio to the display unit for storage and display.center0Figure 3-4.1The Arduino can also be programmed to perform certain actions based on the state of the switch. While the switch is off, there will be no power flowing through the socket and no measuring data is needed so the arduino can be put into sleep mode and can be woken by a wake signal on an interrupt pin which can come from the display unit by way of the Xbee radio when the relay is allowing the socket to be used. It could also be programmed to sleep between periods where the relay is allowing current to pass but is not being used (current measurement = 0), waking up after a predetermined period of time, or on an interrupt when current starts flowing. Main Control BoardFor the main unit, embedded system was selected for this project. It will be purchased from Future Designs Inc. The model is the DK-57VTS-LPC3250. It was chosen because it is a premade embedded system, which will save time on development. It runs at 5 VDC, and 2.3 A. The system has three components: the LCD touch screen, the CPU Module, and the I/O controller. It uses a base Carrier Board, a CPU module with SOMDIMM memory, and an LCD Carrier board. The boards come with expansion connectors, so the project can be expanded when necessary. In addition, there is a Micro SD memory socket, which can be used if the embedded Linux and the rest of the software begin to use too much memory on the board. The screen on the DK-57VTS-LPC3250 is a 5.7 inch screen with a VGA connection as shown in figure 3-3.1. Its resolution is 640 x 480 pixels. Figure 3-5.1 permission requested from The Carrier board specifications include:10/100 Ethernet Port, USB Host and Device portsOne CAN port (Male DB9), One RS-232 port (Male DB9), External I?C interface3-axis Digital Accelerometer & Temperature SensorReal-time Clock with SuperCap backupTFT interface for Graphics LCD displays up to 1024x768 resolution, 18-bit colorFlexible Power Supply input can be wall supply or 5V USBThis will allow us to have accurate time measurements, and reliable input/output while leaving a low power usage footprint. The components of the Carrier board can be seen in figure 3-3.2. The main components that will be necessary are the USB inputs, and the flash memory units. This is where all of the data and program structures will be placed so the ARM processor can process them. An additional flash memory card may be necessary, which can easily be afforded by purchasing one. The maximum additional flash memory can be upgraded to 4 gigabytes. 4 gigabytes will cost approximately $15.Figure 3-5.2 permission requested from CPU module specifications:Based on SODIMM form factor (Dual Inline Memory Module)LPC3250 266MHz ARM926EJ-S coreVector Floating Point Co-processor256KB of Internal SRAM 64MB of External DDR SDRAM512MB of External NAND FLASH1KB of EXTERNAL Secure EEPROM10/100 Ethernet PHY Micro SD Memory SocketMini-JTAG Debug Connector PCB Dimensions 2.66” x 1.89”The CPU used is the ARM92EJ-S. It supports 32-bit, 16-bit, and 8-bit instruction sets. It features Jazelle Direct Bytecode eXecution, which allows the ARM processor to execute Java bytecode. The ARM9 incorporates Enhanced DSP instructions to support greater efficient digital signal processing algorithms. The processor uses multiply-accumulate to support this. Also, the ARM9 has a non-unified cache, so instruction fetches do not release data, and separate data and address bus signals. An example of an ARM9 can be seen in figure 3-3.3. Figure 3-5.3 permission requested from digi-Block diagramsCurrent/Power Sensor CircuitThe block diagram below shows a basic functionality of the current sensing circuit. The Hall Effect current sensor will measure the current and provide a voltage output that is proportional to the current being measured. This value will be sent to the microcontroller. The microcontroller will then calculate the power and transmit the data wirelessly to the LCD screen when the user can monitor and track their power usage. The microcontroller will also send a 1/0 command to the power relay in order to turn the power off a device:942975198755Wall outlet00Wall outlet2819400198755Sensor: CurrentMeasurement00Sensor: CurrentMeasurement2143125615940015144746604000345757566040002819400222885Microcontroller00Microcontroller94297565405Power relay00Power relay21907506032400346709993345002857500111760Transceiver00TransceiverFigure 3-6.1.1: current sensing diagramPower Relay DiagramAs stated earlier, the power relay will receive command from the microcontroller to turn the power off an appliance. The user will choose to turn the power off a device. The wireless receiver will receive the command and send t to the microcontroller. A voltage change will then cause the relay to turn the power off the device. The diagram below shows the basic functionality of this part of the design:2971800153035Microcontroller00Microcontroller990600153035Transceiver00Transceiver219075010159900363855078740002981325122555Power relay00Power relay36385501333500298132531750Power relay00Power relayFigure 3-6.2.1: Power Relay DiagramMicrocontroller and Touch Screen DiagramThis is a high level diagram how the system will operate. The modules will transmit data to the main control board, which will process the data and send it to the touch screen where the user can modify the options for the system, and view his power usage.Software DesignMicroprocessor ProgrammingThe Arduino microprocessor board is programmed using a modified version of the C programming language. It has commands built into it to handle its Arduino specific needs and to also control the pins specifically. The Arduino Pro Mini has 14 digital input/output pins which can be programmed to be one or the other, using special commands, pinMode(), digitalWrite(), and digitalRead(). Some of the pins have special functions, such as the 0 and 1 pins which are the RX and TX, respectively, for serial communication, which will be used to communicate with the Xbee module. Pins 2 and 3 can be used as external interrupts, which means that they can be programmed to wake the microcontroller from a sleep mode.PinPrimary UseSecondary Use0, 1Digital IOSerial TX and RX2,3Digital IOExternal Interrupts3,5,6,9,10,11Digital IOPulse Width Modulation10,11,12,13Digital IOSPI communicationOne of the main benefits of using the Arduino boards is the compatibility with Standard C libraries which the group is intimately familiar with. This will aid the group in properly programming the microprocessor and implementing special functions, and will allow the group the flexibility to design and program the boards as they desire. The standard libraries that the Arduino uses are:stdbool.h: This library is used for Boolean type of variables. This library will be useful in declaring and determining if certain conditions are met before sleeping, transmitting data or turning off the power going through the unit.string.h: This library is used to manipulate strings. This library will be used to help send the data to and from the Xbee modules and to be accessed by the display unit for display.stdio.h: This is the standard library for input and outputs. This will be used throughout the entire designed program. The stdio.h library also contains allows usage of the printf statement. This is important as it will help control the flow of data in and out of the unit.stdlib.h: Among other functions, the stdlib.h library allows the usage of the absolute value function. This will allow the microprocessor to handle any negative values it may come across use them appropriately.math.h: This is the standard math library. This library allows functions such as round. The round function will mostly be used to make the raw data given by the main logic steps, converting the inputted power measured into kilowatt hours, into a more manageable value.The Microcontroller programming will consist of three major methods: a getmeasurement method, a transmitdata method, and a switch method. Each of these methods performs a specific task related to data flow of the sensor units.The getmeasurement() method will read the value on the appropriate analog input pin and get the measurements and perform the needed calculations on them. This is essential as this is the data gathering method used by the microcontroller. This method would look similar to int cur = 0;cur = analogRead(0); //returns value between 0 and 1023//perform calcualtions and store value to be sentThe transmitData method will send out the last recorded measurement to the display unit through the serial communication pin 1, TX to the Xbee module, addressing it to the display unit and appending the originating unit name.Int data = getmeasurement();Serial.println(data, 4);The switch method will command the relay to turn on or off which will be connected to one or more of the digital pins. This should be a fairly simple method, only setting the digital out pin to either a 1 or 0 and then terminating.The microprocessor programming scheme can be thought of as a state machine where certain conditions, or no conditions, send it to different states. The starting point would be the getMeasurement() method, where the microcontroller would get a measurement. From there, it would automatically go into the transmitData() method where the data would be sent to the display unit. After transmitting the data, it would go into one of two states, if the relay is on, it would enter a timed sleep after which it would go to the getMeasurement() method. If the relay were set to be off, the microprocessor would go into an untimed sleep and would awaken when the relay is turned on. The state diagram is given below to aid in visualization of the states. After implementing these state, more states could easily be added with any additional parameter that are introduced, possibly going to sleep when there is no current draw on the socket and waking when there is a current draw.1190625104775GUIGeneralThe GUI needs to have a main window that holds all of the subwindows with live graphs inside of them as shown in figure 3-5.1.1. The GUI must be detailed enough to be intuitive for a user to change or modify the energy usage options, but clean enough to not be distracting. In each window, there must be sufficient information as to allow the user to identify where they are, and view any necessary data, while not cluttering up the screen with unimportant information or graphics. Each window needs to be a clickable object that when clicked, leads to the proper subwindow. The color selection will be mute colors, so to not be distracting, or difficult to view. The fonts for buttons will be Times New Roman in size 20, and the titles will be Times New Roman in size 32. All buttons in the GUI need to be large enough for the user to be able to press without much effort. Buttons that are too small could cause users with larger fingers to unintentionally change functionality, or go to the wrong subwindow. In addition, the buttons need to be far enough apart as to not allow the touch screen to have small errors and register a hit in the area for an incorrect button.3-7.1.2 Main MenuThe goal of the main menu is to have a clean user friendly appearance at first glance, but still have relevant information that the user can use at hand. It needs to be easy to understand, but helpful enough that the user will want to look at it often. The main screen will feature three live line graphs of each of the attached modules. Each of these objects will connect to the corresponding subwindow for that graph. The user can simply press on the graph they wish to view more details about, and they will be sent to the corresponding subwindow. The Options button will send the user to a subwindow where basic user settings can be accessed. The ON/OFF button will cut off all power to the connected modules. This button will change color to RED when all modules are set to ON, and the text field inside it will display TURN ALL OFF. The button will be GREEN when all modules are set to OFF, and the text field will display TURN ALL ON. The budget remaining will be a text field displaying how much of the user’s remaining budget in KWH or US Dollars is remaining. Which is displayed can be changed in the options menu.Figure 3-7.1.13-7.1.2 SubwindowsEach subwindow must have the title of what the subwindow is at the top. Every submenu will have an option to go back to the main screen. The subwindows for each module will contain the live graph of energy usage along with several fields. The first two fields will be text fields with a calculation of average usage of energy in KWH and US Dollars per day and per month, respectively. The third text field will show the amount of KWH saved in the last 30 days by using the Home Energy Management System. It will indicate a value for that particular module for the time it was not operational. The fifth text field will show the user the remaining budget portion the device expects the Module to use for the remainder of the payment period. The final field will be a button to shut off all power to that unit. This button will change color to RED when the module is set to ON, and the text field inside it will display TURN OFF. The button will be GREEN when the module is set to OFF, and the text field will display TURN ON. The information needs to be presented in a way that is easy to understand, yet informative enough that it needs to further explanation.Figure 3-7.1.23-7.1.3 OptionsThe options screen will hold information relevant to the overall operation or presentation of the device. The screen shown in figure 3-5.1.3 indicates what the user will see on the options subwindow. The first option will be a button that allows the user to change their budget in KWH. This integrates with other calculations in the project. The second option is a simple button that changes the metrics of KHW or Dollars. When the individual modules are inspected, they show the average usage in month or day. This option will allow the user to see their power use in Dollars or KWH. The third button will allow the user to change their personal costs of KWH per Dollar. This includes the initial cost per KWH, the cap of KWH before the homeowner is charged more money per KWH, and the cost of power above the cap. This will function by a keypad appearing next to the option buttons with an enter button below them. The number will correspond to a value that will be put into the price per KWH variable. The user will be able to input the cost of KWH in cents, and even input a partial cent value. After the amount is input, the ENT button will be pressed, and the number will be stored.Figure 3-7.1.33-7.2 OperationThe embedded system should work together to give a seamless user experience. The block diagram in figure 3-5.2.1 shows how this will be done. The touch screen should accurately find clicks that correspond to the screen output, and send a click message to the Mouse Click Listener. The Mouse Click Listener will then notify the operating system that an object was clicked, and send that message to the C++ assistant for processing. Each screen should close the previous screen, and open only the new, previously selected screen. At no time should more than one screen exist at a time. Thus, the MiniGUI must close each window every time the user wishes to navigate to a new screen. The C++ assistant will tell the MiniGUI to update to whatever screen or action that was clicked by the user. GNUPlot will become active whenever a window containing one or more graphs becomes what is output on the screen. This can be seen in the Sequence Diagram in figure 3-5.2.2. Data for the graphs themselves will come from the wireless receiver sent from the three modules. This data is stored in a database on the system, which is accessed by GNUPlot whenever it needs to plot a graph. The database for the system will hold all data for the previous month, and a double floating point variable containing how much energy had been saved all time in KWH. In addition, the database will contain variables for what budget the user wishes to set, in US dollars or KWH.Figure 3-7.2.1Figure 3-7.2.23-7.3GNUPlot The data for the graphs will need to be put into two dimensional arrays so that GNUPlot can read the data. To update the data, a separate array with the same two dimensional arrays will be created as temporary storage. The new data will be put into index 0 of the newly created array. Each value of the original array will be moved one unit forward in the X index, with the values at the last X index to be purged. The data will be refreshed every 10 minutes, so this process will occur at least this often. The program to ensure this will happen is called Cron. Cron is a UNIX based job scheduler that can be configured to run scheduled jobs at certain times or over certain time intervals. Cron has a low memory footprint, and can be used to access the internet, or update tables. GNUPlot will be called to create a line graph. So, Cron will be called to update the database at regular 10 second intervals. Now, GNUPlot can be called any time from the GUI with the plot function. The plot function will be configured to plot a line graph with the appropriate data in the X and Y axes. A new graph will be redrawn on every window and subwindow as each window will be closed when navigating to another window. So, GNUPlot needs to be opened and closed each time, and a fresh graph drawn every time a window is opened. The following figure 3-5.3.1 is an example of how the GNUPlot output should appear. As the device is turned on and off, the graph records the data, and passes it along the data arrays. The graph is then redrawn every time Cron makes an update.Figure 3-5.3.13-7.4 Software ParametersAll of the programming and software requirements will be written in C or C++ which will be written in Microsoft Visual Studio 2010. Visual Studio was chosen for its ease of debugging and large array of support and features like intellisense. The majority of the libraries that were researched include libraries that can be accessed in Visual Studio. The software will be written on an AMD based processing computer using Microsoft Visual Studio 2010, and the Intel based computers available in Engineering building 2, room 274 using Microsoft Visual Studio 2008.C++ is the language of choice for many embedded systems. C++ is a robust object-oriented programming language with the ability to use large libraries of functions that it can import. Once a designed object is implemented, it must be instantiated somewhere in the code. First, the memory will be allocated, then the object will be initialized. After these steps are taken, the object can be used. The ARM will support its use and functions of libraries. The embedded system will be loaded with a Linux based embedded operating system called embedded Linux. The operating system is needed because of the complex procedures that will take place such as opening and closing libraries for GNUPlot and MIniGUI. C++ is highly compatible with Linux and its derivatives, so the programming will be homogenous throughout the project. The use of the software to the user will be very simple. As shown in figure 3-5.4.1, a user will open a window, and the window will change to the selected window. At this time, MiniGUI will draw the window, and if necessary, GNUPlot will plot any needed graphs on the page after accessing the database for the relevant information.Figure3-7.4.13-8 Embedded LinuxThe operating system for the main control board will run embedded Linux. Linux is in general a lightweight operating system currently in use for a broad variety of embedded type systems like media players, mobile phones, networking equipment, and automation. Embedded Linux has the advantage of not requiring and royalties or licensing fees to use and develop, as it is open source and free. It has a stable, regularly updated kernel that is well supported and documented.Embedded Linux has a version ported to the ARM series of microprocessors. The company ARM, actually contributes to the development for the operating system on their processors. ARM works with many different types of Linux distributions including Canonical, Debian, Fedora, Linaro, Maemo, Movial, and Thundersoft. Information about how to develop on the platform can be found at .Prototype4-1 Design PlanningEach member of the group will be in charge of a portion of the project. The project could have easily been implemented using a single microcontroller. However, we decided to use three of them so each one of us can learn the skills needed for this project. The use of three microcontrollers will require the use of three printed circuit boards. This will allow each of us to learn how to solder parts on the board. Also, each part of the design will be built and tested separately. Each one of the circuit boards will have a microcontroller and wireless transceiver. The other unit will have a current sensor and a power relay.To continue with safety in mind, we will design our current sensor and solid state relay circuit to fit into an AC wall box enclosure. The wall box enclosure will be a PVC duplex socket box type. The circuit will be designed on a circuit board and installed inside the box enclosure. A hole will be drilled in the side of the PVC housing box to accommodate the bulkhead style stereo phone jack to support the interconnect to control the solid state relay and sample the current utilized by the appliance plugged into the power socket. And finally, a standard PVC cover plate will be fastened to the duplex socket to prevent accidental exposure of high voltages. The following figure is an illustration of the box type we will be using. Figure 4-1.1: PVC electrical boxIn prototyping the system for the solid state relay control and the sensor signal, we have planned to use commonly available stereo phone cables for its three conductors wiring. The cable that we will be using is a three foot length male to male stereo audio cable. Since all the voltages on this cable are low voltages, it will be sufficient for the application to carry the signal to switch the relay on and off as well as sample the signal from the current sensor. The shield will be used as a common or ground between the microcontroller, solid state relay and current sensor. The following figure illustrates a standard stereo male to male audio cable:Figure4-1.2 : Male to male audio cableAs shown above, part 1 will be used as a signal path to the solid state relay positive input side. The number 3 will serve as a ground and will connect to the negative input side of the solid state relay as well as a common ground path for the sensor signal which will be carried on the number 2 of the audio cable. To provide us with a modular approach, we will use a 3.5 mm stereo audio phone jack to accommodate the male to male audio cable described above. The stereo audio phone jack will be on the power control and monitor side and on the microcontroller module side. In keeping with safety standards, a standard household AC power plug wall box will be used for the power control and monitor module. It should contain the solid state relay, the current sensor and a stereo phone jack for interconnect to the stereo phone cable connected to the microcontroller. The proof of concept model will be created by making a model home. The model home will be constructed from wood, and painted to look similar to a house. The model will be approximately three feet high, and four feet wide. The home will have two of the four sides open, so the model can be rotated. This way, the model can be seen from either side. Inside of the model will be our system. Each module will be connected to its own power outlet at different locations in the model. The touch screen unit will be secured to a wall where it can be accessed at eye height. The model must be powered by a separate power source, so an extension cord will be required to get power from a nearby wall. In the model, the power will be split to the three modules, and the main control unit. Each module will be connected to a wall outlet.The system will be demonstrated by using the touch screen to turn the light bulbs on and off, while showing the graphs of their power consumption, and the ability of the system to perform specified tasks. The technical demonstration will consist of testing similar to the test plan of the system. First, the touch function will be demonstrated. In this step, the demonstration will consist of moving from window to window, showing the accuracy of each touch, and the fact that the system responds to a touch. Next, the demonstration will show the real time graphs of the unit measuring energy usage. The main screen will be shown, following each of the subwindows to demonstrate that they all function properly.4-2 Parts AcquisitionWe will purchase all of the components needed online. We are still considering several suppliers and looking for the best prices we can get on the parts. For the current sensor and the power relay, we are considering Honeywell Inc as they carry a large amount of these parts to choose from. They also have a great customer support. We are considering several suppliers when it comes to the other parts.4-3 BudgetThe UCF Office of Sustainability will be sponsoring the project. We anticipate building most of our parts in the UCF lab using parts that we already have on hand. The cost may vary depending on the parts choices. The prices listed below are estimates based on web searches.The budget for the Home Energy Management System is a work in progress. Parts have not been ordered, so exact costs are not yet known. There is an emphasis on making the device as inexpensive as possible, but given the time constraints, this may not be achieved. Prices for all components will be compared to similar items for function first, then price. The total budget is $2018. Each part will be ordered, and the unit price recorded. Then, the data will be input to the table, and the overall cost of the project will be calculated. This value will be compared to the budgeted value. The table below shows the components that are planned to be purchased.QuantityUnit PriceTotal PriceBudgetOver/UnderMulti-touch embedded solutionDK-57VTS-LPC32501$515.00 $515.00 $500.00 Module Control Boards1$670.00 PCB Printing3$30 PCB soldering3$60.00 Microcontroller3$600 Zigbee Chip3$120.00 Concept ModelDrywall1$8 Power outlets3$5 Screws20$5 Wood base1$10 Light Bulbs3$5 Extension Cord1$10 Power Strip1$20 Misc parts1$50 Documentation2$25 Total$2,018 Table 4-3.1 BudgetTestingOur testing approach will be broken into two phases. In the first phase each of the components will be tested individually to ensure they meet their own individual requirements. This phase will also assist in developing our understanding of each component. After this phase our integration plan may need to be altered as we understand each component’s functionality better. Then in the second phase the entire integrated system will be tested including functional and non functional tests. 5-1 Wireless ModulesThere are a number of tests that must be performed. The unit must be tested to ensure basic functionality, range, and reliability. The most basic test would be to test basic functionality to ensure the unit can properly transfer data bytes. Then the transceiver’s range must be tested. This must be done in the product’s intended environment. A variety of environmental factors must be tested, including having a transceiver that needs to reliably communicate up to 3 rooms away. Incorporated into the range tests will be a test of reliability, with reliability being measured as the percentage of the transmitted bytes that were received by each transceiver as a function of the range. The wireless module chosen is Xbee. The Xbee includes built-in security features. These security features include the addressing method used by the transceiver. There are over 65,000 unique addresses that can be set for each transceiver. The source and destination of each message is addressed. The system also has the ability to encrypt the sent data using 128-bit AES (Advanced Encryption Standard). This will help secure information sent over the wireless serial link between the user and the microcontroller unit. Even though the Xbee does an excellent job of securing data when configured properly, the system is designed so that the data being transmitted wirelessly is not very sensitive to intrusion. It is just a matter of turning on and off appliances in one’s home, so security should not be a huge issue. The two essential pieces of data that will be sent though the transmitter are the power measured and the commands on turning the power on and off an appliance or more.5-2 MicrocontrollerThere are a number of tests that must be performed. The microcontroller must be tested to ensure basic functionality and reliability. The most basic test would be to test the pins functionality to ensure that the unit performs the appropriate functions and have good signal integrity. The microcontroller’s operation needs to be tested at a wide range of currents sensed in order to assure a reliable product. The signal communication lines need to be tested for reliability, with reliability being measured as the percentage of the transmitted bytes that were received correctly. We have very few safety considerations when it comes to the microcontroller. We only need to make sure that the right voltage is applied to it. We also need to avoid overheating it. If the microprocessor becomes too hot, it may burn individuals, cause damage to the unit, and even cause damage to the whole system. This can be avoided by smart design. We will pay great attention to detail and follow through with the manufacturer recommendations. 5-3 LCD touch screenThere are several tests that must be performed in order to make sure this part of the project is functioning properly. For the touch screen, we will first test if the screen responds to touch with clean hands. Then, each test will be done with a mild quantity of dirt on the finger used. Last, each test will be done when touching the system with the back end of a pen. The first tests to be performed should ensure basic functionality and reliability. The most basic test would be to test basic functionality to ensure the unit can properly display data and graphics. As we plan on displaying real time graphs, we need to make sure that the power consumption graph is accurate as well as the cost and Kilo watt hour. Then, the LCD backlight should be tested in various conditions and temperature ranges. This testing will allow us to set the appropriate contrast and brightness and allow for minimum power consumption. Pixel reliability needs to be measured in order to make sure that the LCD is displaying the transmitted data properly. We also need to keep in mind that the LCD consists of a glass plate structure. It needs to be properly insulated from the casing of the user interface unit in order to assure minimal stress and decrease the possibility of shatter. On the two sides of the LCD, protective plastic coverings will be placed in order to protect against damage during shipping. These must be removed prior to design integration in order to reduce circuit malfunction and the chance of overheating. While this part of the project is straight forward, we need to keep in mind various risks that may arise. The group is aware of the difficulty of graphic LCD programming. We are in contact with some manufacturers to determine whether there exists support with graphic LCD programming and researching current graphic LCD implementation. Another risk that may arise is the difficulty integrating the LCD with the rest of the product design. In order to decrease this risk, our group has researched LCD communication protocols, driver circuits, compatible microprocessors, and required features needed for LCD functionality. The screen will be tested to ensure proper brightness in dark environments or ambient light situations. What will be tested is pixel accuracy and brightness. In addition, the screen will be tested to respond to touches in the proper locations, and send back accurate touch locations.5-4 Power/Current SensorThere several test that will be performed on this part of the design to ensure basic functionality and reliability. The power/current sensor will undergo a calibration procedure. We will first take a reading from Arduino monitor at 0 Amps current. Then we will take a reading from Arduino monitor and at a current value close to the maximum current we intend to measure. The equation y=m*x+c will then be used to find the calibration. After the values of m and c have been found, they can be inserted into the Arduino code. The current sensor we will be using requires a supply voltage of between 6V and 12V. Its output is centered on Vcc/2. The output voltage increases about 50mV per Amp when the supply voltage is 12V. 5-5 SoftwareSoftware will be tested from low level to high level, with the lowest level including the functions that facilitate data manipulation and touch recognition, middle level functions representing GUI creation and graph plotting, and high level functions representing graphing data in the GUI.5-5.1 Function Tests and Touch RecognitionLow level functionsLow level functions are defined as functions which facilitate data manipulation, and touch recognition. Tests will be performed one each function. This portion of the testing will take more time than others, but it crucial to ensure the success of further portions of the project. A success will be defined as the functions return the proper data type with an accurate value.Middle level functionsMiddle level functions are defined as functions that create GUI windows or plot the line graphs. A success will be defined as the GUI correctly generated, or the plots generated with accurate, correctly oriented data.High level functionsHigh level functions are defined as functions that graph data within the GUI. A success will be defined as the graph correctly placed within the GUI, and the graph plotting accurate data. 5-5.2 GUI Test CasesThe GUI test cases will test the functionality of the GUI changing screens and modifying attributes. After the GUI tests are passed, the GUI elements will be integrated in the project.Case 1- Window changesCase 1 will test the basic functionality of moving throughout the GUI. This will be performed after the screen has been tested for returning proper touch locations, which will be necessary for the results of this test to be valid. Special cases will include multiple touches, and having wet hands and wearing gloves.Case 1 will validate the following:The GUI will load to the main menuThe GUI will load module A when module A is touchedThe GUI will load module B when module B is touchedThe GUI will load module C when module C is touchedThe GUI will change the TURN ALL OFF to TURN ALL ONThe GUI will change the TURN ALL ON to TURN ALL OFFThe GUI will open the options menuThe GUI closes previous windows when a new one is openedThe GUI on screen recognizes key presses of the number padThe GUI on screen stores the value of the number pad after enter is pressedA success in each category will be the function operates as describes.Case 2- Graph plottingCase 2 will test the plotting functionality of GNUplot. The functions to create a line plot, and to fetch data from an outside source will be tested. This is simply a test that the plot function is working, and a line plot can be successfully generated. A success will be a line plot created from a data set of random values.Case 3- Graph taking in data from the modulesCase 3 will test the GNUplot’s ability to access the data in the database of the flash memory. This is different from Case 2 in that the data will be input from the modules A-C. The plots must represent actual data from the database which can change in real time. A success will be a relevant graph generated from the data.Case 4- Plots automatically updateCase 4 will test the ability of the system to automatically update the graphs. The plots must be line plots without any graphical errors or faults. The plots must represent actual data from the database which can change in real time. A success will be a plot which updates after 10 minutes.Case 5- Plotting inside the GUICase 5 will test the plotting functionality while inside the GUI. This will test if the plot windows will appear and update. The plots must represent actual data from the database which can change in real time. The plots must be line plots without any graphical errors or faults. A success will be the plots updating inside the GUI every 10 minutes.Case 6 – Module TestingCase 6 will test each module’s ability to be turned on and off, while the real time graph displaying information. This test is a test of most of the system functioning properly. A success will be shown if the device is turned off, and the graph dips to zero energy use until the device is turned on again.5-6 Power relayThe power relay we will be using is very reliable, but the constant work and heat the relay is subject to might break its coil or make its contact points stick or burn in time. This will prevent current from going through the circuit and ultimately prevent the relay from functioning properly. To avoid such issues, we will test the relay each time before using the system. The relay we will be using is a four terminal relay. There are two tests that need to be considered when dealing with a relay test or problem. The tests we need to perform will actually depend on the problem itself. We will decide whether the problem is with the actual relay or the power, ground or trigger circuits that activate the relay, in our case this part is the microcontroller that sends the command 0 or 1 to the power relay. We will first test the relay contacts, operation and activation circuit. Our power relay is more prone to failure when it is warm. To test this part of the design, our power rely can be considered into two separate halves. The first or primary half of the relay utilizes an electromagnet to close the secondary electrical circuit inside the relay. This electromagnet is activated by a simple power (positive side) and ground (negative side). The second half of the relay is the switch that controls the power to a particular accessory like a light bulb or a laptop or what ever the user is using to test this system. The following steps will be used to test the power relay and make sure it is functioning properly before connect it to the rest of the circuit components:We will test the relay incoming voltage using a voltmeter or test light, to make sure it is receiving power. We will then use a multipurpose meter to check for continuity between the two power relay terminals. There are two control terminals on the relay. The two thicker wires that connect to the relay hook up to the power terminals and the other two go to the control circuit terminals. There should be no continuity between the terminals.We will the control circuit terminals on the relay by connecting a wire from one of the terminals to the positive terminal of the control circuit and the other relay terminal to ground.5-7 Entire System TestingThe project will be tested in what will as closely as possible approximate a real end user application. A scenario will be set up with electronics plugged in through the measuring units. In this scenario the group hopes to demonstrate the vampire draw that almost all electronics have inherent in their design, which one of the project goals is to reduce. The scenario will then also demonstrate the power control features based on differing constraints. In the scenario, three household electronics will be plugged in and operated in different modes to demonstrate the power metering capabilities of the sensors and the graphing of the units on the display, showing the total power usage over time as well as the power usage of each individual unit over time. Then, the ability to use the touch screen to turn on or off specific units will be demonstrated by allowing one of the evaluators to perform the task also demonstrating the ease of use of the system to control remote (though not remote in the scenario's case) outlets.Once manual control has been demonstrated, automatic control will be demonstrated, using pre-programmed settings to demonstrate the capabilities in a timely manner, say an accelerated 24 hour period condensed into 5 minutes, showing that depending on the 'time of day' the system will handle things differently.On top of all the automation demonstration, the system will also be tested against commercial power metering products. Light bulbs will be used to do the testing as their power usage can easily be calculated 'on paper' and the group can compare the expected values with the actual values of both the commercial products and the project. Many different devices will be tested with loads ranging from large to minute, say a stovetop versus the draw of the transformer in a cell phone charger, both charging a phone and doing nothing but sitting there plugged in.Reflections6-1 Features excludedWhen the group originally discussed this project, there were quite a few ideas that were thrown out, as part of the design process. Originally, the group considered a touch screen interface, and after several other versions were discussed it came back to the touch screen display. The touch screen idea was originally scrapped in favor of the project not having a display screen at all. Instead, the group considered developing an application for the Android platform that would be able to view the data and control the switches on the final device. Another feature that the group would have liked to implement was a web interface that would, as with the Android application, allow the user to control and view the system from anywhere. These two ideas were married together under the desire for user accessibility. If the homeowner had, for instance, gone to their parent’s for the holidays and accidently left an iron plugged into one of the units, they would be able to use either the Android application or web interface to double check the iron, and if left on, shut off power to the device. This would give the user a sense of confidence that their house was safe. As well, being able to pull from both the Android application and the web interface, the user would be given several options of convenience to ensure that the minor investment of this product would be rewarded with major payoffs in the future. Another feature that could have been implemented is a smaller unit that does not measure power. This unit would only control a relay switch connected to an outlet. This would have allowed for more extensible use of the product as these units would be cheaper and allow for users to control outlets all around their house. If this feature were adapted to the online or Android application, the user would find themselves with complete control over all power outlets within their domicile and unquestionable ability to monitor power usage. When the user that is a parent tells their child ‘Lights out!’ or ‘No more computer or television!’ there would be no way getting around the truth of whether they used the electricity in their rooms to continue to play their entertainment device on mute. 6-2 Future ImprovementsDue to the lack of time and resources, not all desirable features or extensions can be included in the project. Given more time, and proper resources, the system would surely be more advanced and user friendly.One future improvement is the idea that the accuracy of the system could be improved to the level where it would be acceptable for any possible use – even to the point where power companies would approve the use of the meter. In order to do this, higher tolerances would need to be implemented, such as more bits in the analog to digital conversion to give a more accurate reading as well as more accurate analog parts. While accuracy of data transmitted was one of the major components the group sought to take care of, the accuracy of the data collected was equally important. However, due to the ability of the group and costs of the bits, and high standards of the power companies, it would be difficult to improve upon the original idea to the point where it would be acceptable for this type of use at this time. The device could also have been made smaller, and possibly cheaper, with more development time and a greater in-depth knowledge of the different parts of the system. If the group could have been expanded, or the time of the group’s efforts could’ve been equivalent to small research and development division of a corporation, it’s possible the group could have produced a smaller product. However, with the means and ability of the group as it were, there was unfortunately no way to create this desired tiny wall-fly gadget. Another advanced feature would be the ability for the system to know if a person is inside the house. This way, a user would never need to use the console to dictate commands to turn modules on and off; the device itself would know. This could be accomplished by interfacing a motion detector or an infrared camera to detect people moving around in the house. This way, the system could turn any rooms off that a person is not in.In addition it would be nice to have a way to interface the product with anything that doesn’t use a power outlet. This however, would involve either some minor electrician work or the use of transducers over the lines leading into a unit. It would be difficult to manage this as part of the current project, since it would change with each and every household and would again, require the use of an electrician or the homeowner to purchase and install a transducer. Further, if a transducer were used, the homeowner would have to decide on an accurate device so that the readings of the group’s final product were still reliable. Another feature that could be implemented is a smaller unit that does not measure power. This unit would only control a relay switch connected to an outlet. This would have allowed for more extensible use of the product as these units would be cheaper and allow for users to control outlets all around their house. This would be perfect for the user if they wished to control an outlet while away – for instance, at night the user would charge their electronic device (cell phone, e-book, iPad), but during the day the charger remains unused yet dissipates power. If a cost-effective alternative device could be created to ensure the Vampire draw of this outlet is negated, the unit could be very valuable in reducing the overall household energy costs. Summing some of the previously mentioned improvements, scalability is a large issue. If the system were implemented in a large scale commercial building as it were being constructed, energy cost savings would be very immense. Imagine if you will, a work environment that causes rooms with no occupants to use absolutely no power. We believe that this is the essence of the project, and the overall goal. We wish to provide businesses with this product, and allow them to begin saving money and reach higher profits.Another feature that the group would have liked to implement was a web interface that would, as with the Android application, the user would be able to control and view the system from anywhere. This would have been a great feature as someone could shut off power to something when they are away from the house, say an iron plugged into one of the units. Unfortunately, the system itself must run on power. It is not yet known if this device, when implemented in a home will save the owner energy. Therefore, it would be beneficial if the device had its own power source such as a solar panel or small wind turbine which could be attached outside the home.More software features can be added such as the ability to control your unit from the internet or a mobile phone, or text messages sent to you about your power usage from your home. These features would add to the overall value and utility of the system. Either of these features would need to include WiFi or Ethernet support to the system, and a server to be included with the software package. This may not be possible with the current processor and embedded solution. Some old personal computer parts may be able to facilitate this function.ConclusionIn recent years, the general population has become more aware of their power usage. As the supply of power doesn’t always match the growth of need for power and the resources to create power dwindle, energy costs will continue to rise. It has happened in the past with gasoline, and the past scare and current (and projected) costs of energy has sparked an interest in all kinds of people to reduce their energy usage or eliminate it. The carbon footprint fear has pushed people to create green houses made entirely out of recyclable waste, and green buildings that rely on solar panels and natural lighting to provide enough light for everyone within to see throughout the business hours. It may not be feasible to claim that the world will eliminate their need for electricity, but at some point the citizenry will have to closely watch their electricity usage. Products like this project are going to become more ubiquitous as a way to monitor power usage and eradicate waste. This project was designed to help eliminate wasteful electricity usage, in the form of vampire draw. The designed product will most certainly accomplish this, and will even give users the ability to monitor their power usage on items that may be old, are used often, or just electronics that they’re curious about the product’s power consumption. Many people already do the basics – they turn off lights when they’re not in the room, they turn off the television once they’ve finished their favorite program, they close doors and windows when the air conditioner is on, but they really have no idea how much they’re saving.Unlike many others, this project gives users the option of viewing their power use in terms of actual money instead of an abstract value that many people cannot understand. It provides an easy to read and, more importantly, an easy to understand view of the power usage of whichever outlets the user is currently monitoring. The user can also not only see how much the unit is currently costing, but can see the trends in power use by the outlet, which can have a profound effect on the user – especially when they see the outlet consuming power when the object isn’t even being used. Since the user will be able to see the amount they are saving – in actual dollars and cents – the user can completely predict their daily energy usage if they are under a tight budget. With the downward economy as it currently is, the group feels that this feature alone would make the product stand out if a user was searching for a similar device.While the device could always be improved, the group feels that the project is strong enough to stand on its own in a growing sea of competitors. The product should perform admirably well in any and all situations, and has value to anyone that uses it. Even though the device could be made smaller and more accurate, that is something that would come from later iterations, alongside the Android application and web-based interface. The product will meet all of the standards set forth by the group, allowing the user to reduce their home energy consumption while becoming aware of – and reducing the effect of – vampire draw. As this is the very first version of the product, and as a first iteration of a product, it is quite amazing. User ManualTo begin using our product, you need to download and install the software.Before plugging in any of the measuring units, you should start the software.Then the end user can plug the power cord and the transformer into the outlet where they want to measure.After plugging into the wall the end user may plug in what he or she wishes to be measured. All that is left is for the end user to use the software.The software will run all on its own and the user can read the power being used, the power they save by having the system turn the outlet off, and how much power is used by the end of the month if their current power usage habits continue.The software interface allows the user to turn all the modules off, or single modules individually. AppendixAppendix A: Image PermissionsRE: Permission?11/01/10 Sc, Infoinfo.sc@To zinachuck@knights.ucf.edu, Sc, InfoFrom:Sc, Info (info.sc@)Sent:Mon 11/01/10 7:08 PMTo: zinachuck@knights.ucf.eduCc: Sc, Info (info.sc@)Thank you for your interest in Honeywell Sensing and Control Products. The information from our website, i.e. pictures, are public domian and can be used in your information.If you have any further questions, or need any assistance, do not hesitate to contact us. Honeywell International Inc.Sensing and Control DivisionCustomer Response CenterPhone: 1-800-537-6945International: 815-235-6847Fax: 815-235-6545E-Mail: info.sc@Website: sensing/ ?From: zinachuck@knights.ucf.edu [mailto:zinachuck@knights.ucf.edu] Sent: Sunday, October 31, 2010 10:36 PMTo: Sc, InfoSubject: PermissionHello,?My name is Zineb Heater. I am an electrical engineering student at the University of Central Florida. My team members and I are working on our senior design project.? We are contacting you to ask for your permission to use a photo of a Hall Effect current sensor from your website in our senior design document. We would greatly appreciate the permission.?Thank youZineb Heater and the Team?RE: sales@ - Permission?11/10/10 Beth Andersonbanderson@To zinachuck@knights.ucf.eduFrom:Beth Anderson (banderson@) Sent:Wed 11/10/10 2:59 PMTo: zinachuck@knights.ucf.eduAttachments, pictures and links in this message have been blocked for your safety. Show content | Always show content from banderson@ Hi Zineb:?You can use the photograph for your senior design project.?Good luck.Beth Anderson, P.E.?Anderson Engineering20526 330th StreetNew Prague, MN 56071?phone: 507-364-7373fax: 507-364-7374cell: 952-292-6415email: banderson@?1-800-893-4047From: Paula Mills On Behalf Of Test AccountSent: Wednesday, November 10, 2010 8:28 AMTo: Beth AndersonSubject: FW: sales@ - Sending mail server found on relays. - Permission??From: zinachuck@knights.ucf.edu [mailto:zinachuck@knights.ucf.edu] Sent: Tuesday, November 09, 2010 10:32 PMTo: salesSubject: sales@ - Sending mail server found on relays. - Permission?My name is Zineb Heater. I am an electrical engineering student at the University of Central Florida. My team members and I are working on our senior design project.? We are contacting you to ask for your permission to use a photo of a current?Transformer from your website in our senior design document. We would greatly appreciate the permission. Please find below a link to the photo we would like to use. youZineb Heater and the TeamRE: Permission?To see messages related to this one, group messages by conversation.11/15/10 Reply ?▼ ?Bill Bratly Add to contactsTo zinachuck@knights.ucf.eduFrom:Bill Bratly (pickerwest@)Sent:Mon 11/15/10 7:03 PMTo: zinachuck@knights.ucf.eduHotmail Active ViewHello Zineb,?Can you use the attached photo?? This is a relatively new series of relay and a true power relay.?Best Regards,Bill BratlyPicker Components Corp.(818) 997-3933(888) 997-3933 toll freeFax (818) 997-8903pickerwest@ ?From: zinachuck@knights.ucf.edu [mailto:zinachuck@knights.ucf.edu] Sent: Sunday, November 14, 2010 8:34 PMTo: sales@Subject: Permission?My name is Zineb Heater. I am an electrical engineering student at the University of Central Florida. My team members and I are working on our senior design project.? We are contacting you to ask for your permission to use a photo of a power relay from your website in our senior design document. We would greatly appreciate the permission. ?Thank youZineb Heater and The TeamRE: Permission?To see messages related to this one, group messages by conversation.11/25/10 Fiona Davisfiona.davis@To zinachuck@knights.ucf.eduFrom:Fiona Davis (fiona.davis@)Sent:Thu 11/25/10 2:47 PMTo: zinachuck@knights.ucf.eduHotmail Active ViewHello Zineb,?This is ok - l have attached the picture for you. Good luck with your design project.?Best regards,?FionaFrom: zinachuck@knights.ucf.edu [mailto:zinachuck@knights.ucf.edu] Sent: 24 November 2010 19:40To: fiona.davis@Subject: RE: PermissionHi Fiona,?We would like to use the Example application Diagram in this PDF file: photo of interest in page 2.?Thank youZineb Heater and the Team?From: fiona.davis@To: zinachuck@knights.ucf.eduSubject: RE: PermissionDate: Wed, 24 Nov 2010 09:19:00 +0000Hello Zineb,?Can l ask which photo you would like to use??Best regards,?FionaFrom: zinachuck@knights.ucf.edu [mailto:zinachuck@knights.ucf.edu] Sent: 24 November 2010 06:20To: info@us.Subject: Permission??My name is Zineb Heater. I am an electrical engineering student at the University of Central Florida. My team members and I are working on our senior design project.? We are contacting you to ask for your permission to use a photo of a Wireless Microcontroller from your website in our senior design document. We would greatly appreciate the permission. ?Thank youZineb Heater and The TeamFigure depicting power line communicationPPM figureSparkfun imageAD7755 and PIC FigureArduino pro mini size pictureDigi figures, all xbee related figuresTweet-a-watt and xbee adapter pinout imagesGoogle permissionfromDennis Kilgore?<dennyroxsox@>toconsult@dateSat, Nov 27, 2010 at 6:02 PMsubjectPhotograph permissions.mailed-hide details?6:02 PM (21 hours ago)?Hello,My name is Dennis and I am working on a senior design project for the University of Central Florida.? I was wondering if I could have permission to use the attached image in my work.?fromDennis Kilgore?<dennyroxsox@>todesktopmonitors@date Mon, Nov 29, 2010 at 8:34 PMsubjectPhotograph permissionsmailed-hide details?8:34 PM (18 hours ago)?Hello,My name is Dennis and I am working on a senior design project for the University of Central Florida.? I was wondering if I could have permission to use the attached image in my work.?fromDennis Kilgore?<dennyroxsox@>tosales@dateSat, Dec 4, 2010 at 6:06 PMsubjectPhotograph permissionsmailed-hide details?6:06 PM (21 hours ago)?Hello,My name is Dennis and I am working on a senior design project for the University of Central Florida.? I was wondering if I could have permission to use the attached image in my work.?fromDennis Kilgore?<dennyroxsox@>tosupport@dateSat, Dec 4, 2010 at 6:08 PMsubjectPhotograph permissionsmailed-hide details?6:08 PM (21 hours ago)?Hello,My name is Dennis and I am working on a senior design project for the University of Central Florida.? I was wondering if I could have permission to use the attached image in my work.?fromDennis Kilgore?<dennyroxsox@>towebmaster@dateSat, Dec 4, 2010 at 6:09 PMsubjectPhotograph permissionsmailed-hide details?6:09 PM (21 hours ago)?Hello,My name is Dennis and I am working on a senior design project for the University of Central Florida.? I was wondering if I could have permission to use the attached image in my work.? ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- https www municipalonlinepayments
- ece conferences 2019
- free online ece training hours
- ca ece workforce registry website
- list of ece classes
- california ece workforce registry
- ece bachelor degree
- ece classes online california
- ece colorado
- ece membership organizations free
- ece evaluation
- ece workforce registry california