UBC Undergraduate Research

LUZinda : a smart lighting system for the home Cramb, Megan; Marshall, Keara; Moreno, Sofia Apr 2, 2012

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata


52966-Cramb_M_et_al_ENPH_459_2012.pdf [ 7.95MB ]
JSON: 52966-1.0074465.json
JSON-LD: 52966-1.0074465-ld.json
RDF/XML (Pretty): 52966-1.0074465-rdf.xml
RDF/JSON: 52966-1.0074465-rdf.json
Turtle: 52966-1.0074465-turtle.txt
N-Triples: 52966-1.0074465-rdf-ntriples.txt
Original Record: 52966-1.0074465-source.json
Full Text

Full Text

    LUZinda: A SMART LIGHTING SYSTEM FOR THE HOME  Megan Cramb Keara Marshall Sofia Moreno  Project Sponsor: Dr. Cyril Leung  Engineering Physics 459 Engineering Physics The University of British Columbia April 2, 2012  Project Number 1211   ii Executive Summary   Tasked with designing a system to conserve energy in the home, a smart and autonomous lighting system known as LUZinda (luz is the Spanish word for light) was developed.  The design for LUZinda incorporates motion sensors and ambient light sensors that communicate wirelessly via XBee with an Arduino. This Arduino analyzes the information received from these sensors and signals to adjust the lighting environment.  The Arduino communicates with the artificial lighting sources in the room through the X10 protocol.  This is achieved by using an X10 two-way interface that communicates with other X10 modules attached to all of the artificial lighting sources.  Commands sent from the Arduino to the X10 modules via the two-way interface are able to dim, brighten, turn on, and turn off the lights independently.  A simple user interface was also designed.  This interface allows the user to tell LUZinda when they are satisfied with the lighting environment in the space. LUZinda is then able to “learn” and predict the user’s lighting preference, so it can adjust the lighting output automatically to ensure that the user is always satisfied with their environment.  After testing, it was found that the LUZinda system adds between 3 and 3.5- Watts to the overall lighting load.  However, given a room with two or more lights, this extra load is generally accounted for with the energy savings through dimming.  The more artificial lighting sources there are in a room, the more energy savings LUZinda provides.  Several recommendations have been made to further the flexibility and utility of LUZinda: the incorporation of zoning, the ability to distinguish between users and their varied tasks, creating a portable user interface for ease of use, designing and implementing an aesthetically appealing housing for sensor circuits and user interface, and improving the accuracy of motion detection.       iii TABLE OF CONTENTS   Executive Summary ……………………………………..……………..ii List of Figures ………………………………………..………….iv List of Tables ………………………………...………………….v Introduction …………………………………...……………….1 Discussion ……………………………………………………3           Methods and Theory ……………………………………………………3           System Flow Diagram …………………………………………………..10           Testing and Results …………………………………………………..11           Discussion of Results …………………………………………………..12 Conclusions …………………………………………………..14 Project Deliverables …………………………………………………..15           Deliverables            Financial Summary           Ongoing Commitments by Team Members  …………………………………………………..15  …………………………………………………..15  …………………………………………………..16 Recommendations …………………………………………………..17 References …………………………………………………..20 Appendices            LUZinda Code            Photosensor Datasheet            Motion Sensor Datasheet            System Design Sketches …………………………………………………..21  ………………………………………………..…21  ………………………………………………..…32  …………………………………………………..33  …………………………………………………..42    iv List of Figures   Figure 1: Description of X10 Signal Communication Using Existing Electrical Wiring  Figure 2: XBee Device  Figure 3: User Interface Flow Diagram During Learning Operation  Figure 4: User Interface Flow Diagram During Standard Operation  Figure 5: LUZinda System Flow Diagram  Figure 6: Power Used VS Dim Level of a Standard Desk Lamp Taken Using LUZinda     ………………………………………..6    ………………………………………..7  ………………………………………..8    ………………………………………..9    ……………………………………….10   ……………………………………….11             iii List of Tables   Table 1: PIR and Ultrasound Detection Comparison  ……………………………...4 Table 2: Power Used by LUZinda Components …………………………….12 Table 3: LUZinda Financial Summary   …………………………….14                                 1 Introduction  Energy conservation has been recognized as a major factor contributing to our impact on the environment.  As our global population surged to 7 billion in 2011, our planet’s natural resources are at the greatest risk of peril ever experienced. With the increasing number of people the earth needs to sustain, our draw on its dwindling natural resources is climbing.  This is forcing us to use riskier and riskier technologies, those that require greater damage to the surrounding environment, to meet our energy demand. By using less energy to complete tasks that once consumed an excess of energy, there is potential to reduce the population’s environmental footprint. An area where there is considerable potential for this to be achieved is in the home. More than one-third of the energy consumed in the United States is in buildings, and nearly two-thirds is in the form of electricity [3].  Furthermore, it has recently been shown that large energy savings, up to 40 percent, can be made with smarter lighting solutions [3]; whether it is an increase in the use of day lighting, load shedding or simply smart scheduling, there are numerous options for increased energy efficiency. Lights are often left on in a room after the occupant leaves or are turned on during bright, sunny days when ample light is already available. In addition, oftentimes lights are turned on because, while there may be a significant amount of natural light in a room, there is not quite enough light for a certain application, and a lot of energy may be wasted when a light could be turned on at a very dim setting rather than at full power.  By creating a smart lighting system called LUZinda (luz is the Spanish word for light) that can sense occupancy, current ambient light levels (natural and artificial), and perhaps even learn and predict movement and lighting needs, the potential for energy savings is significant.  It could also create a more efficient lifestyle where one wouldn’t have to worry about lighting levels. Lighting efficiency is a well-known and studied problem.  There are many attempted solutions already in existence, however these tend to focus more on large-scale industrial and commercial settings rather than smaller-scale residential applications.  LUZinda has combined several lighting control methods and technologies currently used in these industrial/commercial settings—such as occupancy sensors and ambient light sensors—into one simple module intended for the home.  This module consists of a wireless sensor network that   2 communicates with a central control unit connected to the existing power lines of a house. LUZinda is a smart, easy-to-install system and it aims to maintain user- specified lighting levels for occupant satisfaction. Dr. Cyril Leung of the Electrical and Computer Engineering Department at the University of British Columbia has sponsored the project.  The aim of this project is to reduce the energy consumption in the home by focusing on lighting management.  This has been attempted by creating a smart lighting network consisting of several fixtures that can cooperate to achieve the desired lighting conditions while maintaining lighting quality and efficiency.  It will be designed with the user in mind, ensuring that it is easy to install and use.  It will also follow the rules and guidelines of the Canadian Electrical Code. The following assumptions have been made in order to achieve a complete system that has the main functions of the original, ideal system: 1. The analog output signal of the light sensor can be wirelessly transmitted 2. Product design completed 3. Central control unit wirelessly commands interface to the power lines This report describes the design and technical background of LUZinda, and the conclusions drawn from testing.  The deliverables will be summarized, and recommendations will be made for future work and improvements to the system.      3 Discussion   METHODS AND THEORY The main objectives and guiding factors in the design of LUZinda were as follows: 1. Design a system able to determine and predict a user’s lighting environment preference 2. Design a system able to adjust to a user’s preferred lighting environment autonomously 3. Provide an easy-to-install lighting system 4. Provide an easy-to-use lighting system 5. Reduce overall energy consumption of lighting by adjusting lighting output to suit a user’s needs  Several technologies available on the market were altered and adapted to achieve these parameters. For the purposes of the system, it is essential to be able to detect the amount of ambient light in a space.  This allows LUZinda to know the current state of the lighting environment at all times, and provides the opportunity to determine if this amount is too much, too little, or just enough.  The space may have an abundance of natural light, reducing the need for artificial lighting.  As the ambient lighting changes throughout the day, so too does the amount of dimming in artificial lighting.  Thus, to achieve the greatest energy efficiency with the maximum amount of dimming while still providing a sufficient amount of light, a method of measuring the amount of ambient light in a space was needed. This was done using photoresistors, although any standard photosythetically active radiation (PAR) photodiode would suffice.  These analog devices are able to detect visible light, outputting a variable between 0 and 1023 depending on the amount of light detected. Another useful piece of information about the environment is whether or not it is occupied.  An occupancy sensor is a device that detects whether or not a room is in use.  This provides the option of turning lights off automatically to save energy if someone leaves a room.  This helps avoid lights being left on in an unoccupied room, using electricity, and wasting energy.   4 There are currently two types of occupancy sensors available: Ultrasonic sensors and Infrared sensors. Passive Infrared (PIR) sensors detect heat and movement; they respond to sudden changes in background heat energy.  This requires that the sensor be placed very carefully so as to allow a “line of sight”, because they cannot see around objects.  The sensitivity of these sensors also decreases with distance, which makes tuning them slightly more difficult. Ultrasonic sensors use sound waves to detect occupants.  A quartz crystal radiates high frequency (25-40kHz) sound waves whose reflected frequency is measured.  Movement within the room is detected from a shift in reflected frequency.  These sensors provide the ability to sense around objects given the surface of the object is hard enough. A comparison of these two technologies can be seen in Table 1. Table 1: PIR and Ultrasound Detection Comparison PIR Sensors Ultrasonic Sensors Sensitivity: Hand movement up to 10 ft. Upper body movement up to 20 ft. Full body movement up to 40 ft.   Totally restricted to detecting occupancy within “line of sight”   More sensitive than ultrasonic in situations where the occupant is moving laterally in front of the sensor rather than towards or away from the sensor  Not sensitive to small changes in the space, resulting in fewer false triggers unless a sudden heat change occurs in the same wavelength range as that emitted by humans  Sensitivity: Hand movement up to 25 ft. Upper body movement up to 30 ft. Full body movement up to 40+ ft. (In general, can cover a larger area than PIR sensors)  Less dependent on “line of sight” for occupancy; may detect occupancy behind objects/around corners if in enclosed space with hard surfaces  More sensitive than PIR in situations where the occupant is moving towards or away from the sensor rather than laterally   Ultrasonic sensors are more sensitive to small changes in the space, such as breezes from HVAC system or windows, resulting in more false triggers unless carefully calibrated   5 More effective for restricted- coverage areas such as aisles, outdoor and high-bay applications  Costs a little less to purchase  May result in false triggers in restricted- coverage areas, outdoor and high-bay applications due to “leakage” of waves  Costs a little more to purchase Source: [9]  The characteristics of PIR sensors seem to suit applications such as those similar to LUZinda.  A Panasonic AMN41121 standard detection PIR sensor was chosen.  More information on this product can be found in Appendix C. In addition, the information recorded by these sensors, the motion sensor and the ambient light sensor, needs to be analysed.  This requires the use of some sort of microprocessor.  For this, an Arduino Dieceimilia was used.  This small and powerful microcontroller was readily available and its open-source platform made it very easy to use.  This acts as the “brain” of LUZinda.  It receives as input the information provided by the sensors, analyses it, and determines which actions should be taken. To perform these actions, however, the Arduino needed a method of communicating with light sources in a space.  To create a system that was easy to install, it made sense to look at wireless solutions or at those that did not require electrical rewiring of the existing space.  This means that a system could theoretically be installed by the user—without the aide of a certified electrician— saving time and money. A method of home automation already available on the market is called X10. This protocol uses existing household wiring to transmit data between X10 devices.  Digital data is encoded in 120kHz signals and transmitted in bursts during AC zero crossings (see FIG. 1).  The data consists of an address (house code and unit code) and a command code. Two different types of X10 modules are needed in the LUZinda design: an X10 transmitter and an X10 receiver. A single X10 transmitter is required to send X10 signals to all light sources in the room.  Known as an X10 two-way interface, the PSC05 transmitter is told what signals to send by Arduino.  An RJ11 cable, commonly used as a telephone jack, connects the two-way interface to the Arduino. This interface is able to both send   6 and receive X10 commands, and it can transmit/receive to/from multiple light sources in a room. All lights being controlled by the interface, or transmitter, must be attached to a receiver.  This receiver, known as an X10 module, decodes the X10 commands sent by the interface and performs the commands on the light source it is controlling.  Both table and floor lamps are attached to an X10 lamp module, while the overhead light uses an X10 dimmer switch, replacing the standard light switch.  These modules receive the X10 command sent from the interface and control the lamp accordingly.  Lamps may be dimmed, brightened, turned off, or turned on.  Modules are necessary in decoding X10 signals sent from the interface.  FIG. 1: Description of X10 Signal Communication Using Existing Electrical Wiring Source: http://hometoys.com/emagazine.php?url=/htinews/feb99/articles/kingery/kingery13.html  Another aspect of wireless communication that improves the ease of use of LUZinda is having the sensors transmit wirelessly.  This allows for sensors to be placed discretely and strategically throughout a space to provide accurate and useful data collection.   7 FIG. 2: XBee Device Source: http://www.trossenrobotics.com/store/p/5977-XBee-Explorer-Regulated.aspx  A relatively simple device that was readily available, met all of our criteria, and that interfaced well with the Arduino was the XBee (as seen in FIG. 2), which uses the ZigBee protocol.  They are able to communicate both analog and digital signals, a necessary function for use with our ambient light sensors and occupancy sensors, respectively.  They use little power (up to 50mW) and can send and receive data. Each sensor is attached to an XBee that will read its output.  This XBee will communicate with another XBee attached to the Arduino.  Analog signals cannot be sent directly, but they can be converted to PWM and this can then be sent. These PWM signals need to be analyzed and converted back into analog signals by the Arduino. Due to time restrictions, the analog abilities of XBee were never realized for this stage of the design.  Thus, only motion sensors are able to communicate wirelessly while the photosensors must be hardwired to the Arduino. Finally, after this system had been designed, adjustments had to be made to make LUZinda easy to use.  A simple user interface was designed for this purpose. In many homes where automatic lighting exists, it is not used effectively because the method of control is complicated and unclear to anyone not trained in its operation. For example, many porch lights can be controlled by a motion sensor, but if this is overridden, it can be difficult to return it to automatic mode again. In this case, the light may be left on longer than is necessary, wasting power. While energy conservation and management is important, so is lighting quality. Lighting preferences can vary widely and there is a correlation between lighting satisfaction and occupant productivity [3].  This introduces the need for a system   8 that can “learn” to supply the perfect amount of light for individuals, for various activities.  In fact, it has been recently shown that it could be energy efficient on average, if occupants were allowed to work under their ideal lighting conditions [3]. For these reasons, LUZinda must be able to determine what the optimal lighting environment is based on a user’s preference.  This means that there must be some form of user input for LUZinda to decipher and interpret, in order to gain an understanding of the user’s needs.  Thus, LUZinda has two modes of operation: a “learning” mode and standard mode. During the first few days after install, LUZinda is under “learning” status.  This means that LUZinda is trying to determine the user’s preferred lighting output. This is achieved by having the user answer a simple question several times throughout the day for the entirety of the learning period (about 10 days).  The questions are displayed and answered using an LCD screen attached to the Arduino.  The screen has four buttons as input: Up, Down, Yes, and No.  The learning period interface is designed as follows in FIG. 3:  FIG. 3: User Interface Flow Diagram During Learning Operation Do you need more  light?  Yes  Increment light level by  one  No  Maintain light  output  Save and store light  level    9 After LUZinda has completed the learning period and has determined the user’s lighting threshold, standard operation starts.  In this setting, the user can either choose to accept the lighting environment provided automatically by LUZinda, determined from the sensor inputs and thresholds, or they may adjust the settings manually.  When in automatic mode, inputs from both motion and ambient light sensors are taken, and lights are turned on and adjusted according to the input from these sensors. If and when the user decides they need a more specific lighting environment, whether due to a specialized task or for another reason, they can adjust the light output using the push buttons on the LCD screen.  Doing so enters manual mode.  If there is not enough light in the room, the user simply has to adjust the brightness using the buttons on the interface and the network will adjust the lighting output accordingly.  They may also choose to have LUZinda remember these changes.  This will adjust the light threshold to include the settings just changed by the user.  It is explained as follows in FIG. 4:    FIG. 4: User Interface Flow Diagram During Standard Operation  Would you like to change the  current light levels?  Up  Down  Would you like LUZinda to  remember these changes?  Yes  Changes saved,  lighDng base  adjusted  No  Changes not  saved    10 In order for LUZinda to determine the threshold light level, the analog signal from the light sensor is saved when the user has answered “No” during the learning phase. This value is saved to the Arduino’s EEPROM memory. EEPROM consists of 1024 bytes, and each byte stores an integer value from zero to 255. LUZinda initializes all of the values to zero at the beginning of the learning phase. Throughout the entirety of the learning, when the user is satisfied with a certain light level, the EEPROM byte value corresponding to the ambient light level (0- 1023) is incremented by one. At the end of the learning phase the mean value of the user’s preferred light levels is calculated, and a range of ±15 is set around the mean value (to allow for slight variances in the analog information from the photosensor). This mean value is set as LUZinda’s threshold light level. Finally, in the standard operating setting, the user has the ability to manually override the automatic controls by increasing or decreasing the light levels. When the override occurs, the user is asked if they would like LUZinda to remember the changes. If the answer is “Yes”, the EEPROM byte value corresponding to the ambient light level (0-1023) is incremented by one and a new mean value is calculated. Again, this new mean value is set as LUZinda’s new threshold light level.  SYSTEM FLOW DIAGRAM       FIG. 5: LUZinda System Flow Diagram    Interface  Arduino  XBee  XBee  Ambient  Light Sensor  Occupancy  Sensor                 Wall Wired  Wireless X10 Module Lamp   11 TESTING AND RESULTS  LUZinda was installed in a 3-meter x 3-meter test room to imitate real-life conditions.  This room contains a desk lamp, an overhead ceiling lamp, and a 1- meter x 2-meter window.  This provided a variety of light sources within the room. The system was able to respond to different stimuli appropriately.  It was able to vary the output of each light source independently.  It provided a smooth transition between dimming and brightening, and was able to maintain a constant light output as per the user’s preference. Tasked with saving energy in the home, this was the main focus of testing.  Data was needed to verify that the system was not using more energy than it was saving. Dimming lights, a feature of our system, reduces the power used.  A lamp with X10 lamp module was plugged into a power meter; X10 commands were sent to this light to dim and brighten it.  The energy versus dim setting was recorded, and the process was repeated several times.  The data can be seen in FIG. 6 below.  FIG. 6: Power Used VS Dim Level of a Standard Desk Lamp Taken Using LUZinda  The power used by different components of the system was also recorded using the power meter.  The values taken are as follows in Table 2: 0  1  2  3  4  5  6  7  8  0  5  10  15  20  25  30  35  Po w er  (W )  Dim Level  Power Used (W) VS Dim Level  Brigthening  Dimming    12 Table 2: Power Used by LUZinda Components PSC05 Two-Way X10 Interface Standby 1.9 W Sending Commands 1.9 W Table Lamp 6.85 W Arduino with LCD Screen Standby 1.15 W Sending Commands 1.15 W Interface + Lamp Module + Arduino 3.35 W   DISCUSSION OF RESULTS It is clear from FIG. 6 that the power used by a lamp decreased as it dims.  This is true for any incandescent light.  This means that the more LUZinda is able to dim a light, the greater the energy savings will be. It was also imperative to determine the amount of power LUZinda needs to operate.  If this amount is greater than the savings the system generates, then it is clear that it is of no benefit to install. Any installation of LUZinda, whether with one sensor or ten, only needs a single interface.  This interface requires the greatest draw on power at 1.9-Watts constant (it doesn’t vary with sending or receiving a command, or with standby operation).  Each additional module or switch, needed for each separate light fixture in the space, only draws 50-miliWatts (or 0.05-Watts). With a single desk lamp (such as the one used during testing), it requires a dim setting of nearly 15 out of 32 to achieve a net-energy use of zero —that is, the dimmed lamp’s energy use with the system’s energy use is equal to the the energy use of just the lamp at full power.  This translates to a very dim and rather impractical light output.  However, if two lights are installed in the system, a net- energy use of zero is achieved with a much more practical and realistic dim setting. Therefore, since the main energy draw of the system is due to a single interface, with low-power modules and switches affording energy savings due to dimming, a system with multiple light sources provides the most energy savings.  The more   13 lights that are able to be dimmed, the more energy is saved to offset the high power usage of the interface.  Thus, a room with many light sources provides the greatest energy savings.   14 Conclusions   In creating a system to increase energy efficiency in the home, a smart lighting system named LUZinda was designed.  LUZinda combines a wireless sensor network and the X10 protocol to provide an easy-to-install system, requiring little to no costly electrical rewiring.  By creating a simple user interface, LUZinda focuses on user satisfaction in a lighting environment to provide consistent and efficient conditions.  While installing the LUZinda system adds to the overall electrical energy draw in a space, the total savings in decreased lighting output negates this added draw of power. In spaces where there are two or more lights, the system is able to reduce the net amount of power required to light a room to a satisfactory (or preferred) level for the user.  LUZinda, when used in a space with more than two artificial lighting sources, has achieved the guidelines of increasing the energy efficiency it the home.  It is easy to use, easy to install, able to predict a user’s preferred lighting environment, and able to autonomously adjust to these preferred settings.     15 Project Deliverables   DELIVERABLES  As discussed in the proposal for this system, the deliverables for this project are a working prototype with documentation provided in this report.  The final prototype has remained true to the original plan with the exception of the analog photosensors not being wireless.  The final design is as discussed previously in this report.   FINANCIAL SUMMARY  As can be seen from Table 3 below, this project has remained under the initial budget of $200.  Table 3: LUZinda Financial Summary # Description Quantity Vendors Cost/ea Purchased by: To be funded by: 1 X10 Two-way interface 1 Ebay ~$5 Jon Nakane Project Lab 2 RJ11 – phone jack 1 n/a  Project Lab Project Lab 3 X10 Lamp Module 2 AARTech Canada $19.99 Jon Nakane Project Lab 4 X10 Dimmer Switch 1 AARTech Canada $24.99 Jon Nakane Project Lab 5 MP Motion Sensor 1 Digikey $15.44 Jon Nakane Project Lab 6 Arduino Diecimila 1  $10 Project Lab Project Lab 7 Arduino LCD and KeyPad Shield 1  $12 Project Lab Project Lab 8 Belkin Smart Meter 1 Craig R. $0 n/a n/a 9 Photocell 2 Digikey $0.80 Project Lab Project Lab 10 Comparator LM311 2 Digikey $0.56 Project Lab Project Lab 11 9V batteries 2 Digikey $2.38 Project Lab Project Lab 12 Miscellaneous (i.e. breadboards, n/a n/a ~$10 Project Lab Project Lab   16 circuit components, wire, etc.) Total Cost ~$101.16 Project Lab Project Lab   ONGOING COMMITMENTS BY TEAM MEMBERS  While there are a few small design features that have not been completed (mainly the wireless communication ability of the photosensors), a functioning system has been implemented in the test-room.  The team will ensure that this prototype is functioning as expected, testing each component of the design, before submission, as follows: 1. Automatic control of lights through receiving and analyzing signals from one motion sensor and one ambient light sensor 2. User interface goes through learning phase and correctly stores user’s preferred light levels. 3. User interface smoothly enters standard operating phase, and correctly allows manual override, as well as, any changes made to the threshold light level.  Once this has been accomplished, the project is deemed successful and all future design alterations may be attempted by whoever pleases.  The team will remain available for contact if questions or further clarification are desired.   17 Recommendations   For this system to reach its full potential, a list of recommended improvements and alterations has been compiled.  They are detailed below.  1. Wireless Photosensors using XBee  According to several sources online, XBee’s have the ability to simply send analog signals via PWM.  After many hours of debugging, it was decided that this feature was not going to be incorporated into this design phase.  Using the XBee’s to send analog data from the photosensors wirelessly proved to be too time consuming for this stage of the design, but its incorporation would provide much more flexibility as to the placement of the light sensors.  This would also enable zoning (discussed below).  2. Zoning  The state and usage of a lighting environment change with the available daylight and the tasks being performed in the space.  By dividing the floor plan of a space into several zones, each having separate lighting controls, one can adjust the lighting in each zone to accommodate how it’s being used [8].  Individual dimming of each light source is necessary to deliver the appropriate light outputs for energy savings and user satisfaction [3].  A coordinated illumination approach exploiting zoning can be used to optimize the effects of meeting an occupants lighting preference while reducing the net energy usage [6].  Due to the limited amount of time in designing this system, only a single motion sensor and a single photosensor were implemented.  To fully take advantage of the capabilities of X10 control, of being able to control separate light sources differently using a single interface, it is recommended to install multiple sensors at different locations in the space.  This provides the opportunity for zoning—having different zones within a space that have different lighting environments for different requirements or tasks.  For instance, if a certain portion of a room is darker than others, this zone requires a greater lighting output.  This situation requires that this zone have a separate photosensor to determine the output of light needed to attain a satisfactory level.    18 By increasing the number of sensors in a space, one can incorporate zoning to achieve greater flexibility and function with LUZinda.  3. Task-Specific Lighting  Providing the possibility of predictive lighting, in all senses, would create a truly smart lighting system.  By incorporating a more detailed and planned approach to motion sensors, it is conceivable that LUZinda could one day determine a lighting environment based not only on a user’s lighting preference, but also on their preference according to the task being performed.  If the user were writing or reading, brighter task lighting would normally be preferred over softer, ambient light.  Having the ability to discern between different events, either through motion detected or by some other means, would provide a wealth of opportunity for LUZinda.  4. Energy Savings  Since installing LUZinda in the home adds roughly 3-Watts of power usage regardless of the number of lights being controlled, using the system with more lights will only increase energy savings.  Using this system with a single light may not provide savings, but using it with two or more lights will demonstrate energy savings.  For this reason, it is recommended that LUZinda be installed in larger, open spaces using several different artificial lighting sources.  5. Distinguishing Between Users  Different users often have different lighting preferences.  The current design of the system takes the average of these stored preferences to determine the lighting environment.  If LUZinda were able to distinguish one user from another, to discern a particular user’s preference from another’s, then the satisfaction with the produced lighting environment should only be increased. Distinguishing the presence of different users may be achieved through RFID tags, cameras, or by other means.  6. Accuracy of Motion Detection  It seems common for complaints about the accuracy of motion detection to arise.  Implementing a method of achieving motion detection while reducing the number of false triggers would ease these worries.  It would also further   19 increase electricity savings by decreasing the amount of time lights are wrongly turned on or left on.  7. Product Design  While a functioning system has been built and a conceptual design for the system housing has been provided, building this housing has not been attempted.  By doing this, the system would appear more complete and its aesthetics would be less obtrusive for a user to install.  This would increase its appeal to the masses.  8. Portable Interface  It is well understood that a user may not enjoy constantly entering their lighting preference during the system’s “learning” period, especially if this involves crawling to a narrow area near the wall receptacle.  For this reason, having a wireless, portable user interface would be ideal.  Somewhat like a TV remote, this interface allows the user to control LUZinda from afar if needed.  It may also be able to be mounted on a wall for storage and increased accessibility. Another option is to have a smart phone app that performs as this interface. With the increasing popularity of this technology, this idea could be attractive to users today.       20 References  [1]    M. Miki et al., “Proposal for an intelligent lighting system, and verification of control method effectiveness,” in Conference on Cybernetics and Intelligent Systems, Singapore, 2004, pp. 520-525.  [2]    C.-H. Tsai et al., “PIR-sensor-based lighting device with ultra-low standby power consumption,” in Instrumentation and Measurement Technology Conference, Taipei, 2011, pp. 1-6.  [3]    Y.-J. Wen and A.M. Agogino, “Wireless networked lighting systems for optimizing energy savings and user satisfaction,” in Wireless hive Networks Conference, Berkeley, CA, 2008, pp. 1-7.  [4]    A. Fernandez-Montes et al., “A study on saving energy in artificial lighting by making smart use of wireless sensor networks and actuators,” Network, vol. 23, no. 6, pp. 16-20, Dec 2009.  [5]    A. Lay-Ekuakille et al., “Sensor conditioning unit design for public lighting control,” Sensors, 2008, pp. 768-771.  [6]    Advantages of Dimmers. (n.d). Retrieved November 2, 2011, from http://www.sprags.com/advantages_of_dimmers.html  [7]    X10 Theory. (n.d.). Retrieved November 11, 2011, from http://www.smarthomeusa.com/info/x10theory/x10theory/#theory  [8]   V. Singhvi et al., “Intelligent light control using sensor networks,” in Proceedings of the 3rd International Conference on Embedded Network Sensor Systems, San Diego, CA. ACM, 2005.  [9]    Introduction to Occupancy Sensors. (n.d.). Retrieved November 12, 2011, from http://www.lightingdesignlab.com/articles/occ_sensor/intro_occsens.htm  [10]  How Dimmer Switches Work. (n.d.). Retrieved November 12, 2011, from http://home.howstuffworks.com/dimmer-switch2.htm     21 Appendix A: LUZinda Code   /* This sketch incorporates UserInterface_Learning.pde and UserInterface_Standard.pde into lightsensor.pde Combined by Megan Cramb on 25 Mar 2012 using code from Keara Marshall and Sofia Moreno Modified by Megan Cramb on 28 Mar 2012 -added UserInterface_Standard components Modified by Megan Cramb on 29 Mar 2012 -removed software reset (commented out) -added unit code before every command so program doesn't forget which light it's writing to --> should we remove the unit code from setup()?? -added proportional gain to lightsensing ("calc_p()") -added saving data to EEPROM ("save_data()") -added calculate mean ("calc_base()") --> still need to analyze data to find range Modified by Sofia Moreno on 01 Apr 2012 -changed sequence of some events and functions -removed test_phase() function -added transition from learning to standard phase -added occupancy LOW timer (i.e. when to turn off lights) -added variables that will stand in as new ranges--depending on current phase  */  //#include <psc05.h> //#include "Arduino.h" #include <x10.h> #include <x10constants.h> #include <LiquidCrystal.h> #include <EEPROM.h> #include <WProgram.h>  //constants/variables //x10 #define zcPin 2    //yellow #define dataPin 3  //blk  int lightSense = 1;         //analog pin1 on arduino int occupancySense = 11;    //digital pin11 on arduino int light = 0;              //initialize analog value read from lightsensor int occupancy = 0;          //initialize LOW occupancy int base;   22 int p = 2;                  //# times to write dim/bright command to light -- initial, later calculated proportional to diff b/w current & base light int range;  x10 myHouse = x10(zcPin, dataPin);  unsigned long time; unsigned long startTime;  //lcd screen int lcd_key     = 0; int lcd_but     = 0; int lcd_but2    = 0; int adc_key_in  = 0; boolean YES  = true; boolean NO   = true; boolean UP   = true; boolean DOWN = true; #define btnNO     0 #define btnRIGHT  0 #define btnUP     1 #define btnDOWN   2 #define btnYES    3 #define btnLEFT   3 #define btnSELECT 4 #define btnNONE   5 boolean learning = true; boolean standard = false; boolean testing = false;  LiquidCrystal lcd(8, 9, 4, 5, 6, 7);  //function declarations int read_LCD_buttons(); void learning_phase(); void standard_phase(); int calc_p(); void save_data(); int calc_base();  void setup() {   Serial.begin(9600);   pinMode(occupancySense, INPUT);    time = 0.0;   startTime = 0.0;   23    base = 150;          //can range from 0-1023   range = 30;          //initial range around low base level    myHouse.write(HOUSE_A, UNIT_1, 3);   myHouse.write(HOUSE_A, UNIT_3, 3);  ////EEPROM initialization -- ////can only write to EEPROM a limited number of times (100,000), commented out unless testing the data saving   /*   // write a 0 to all 512 bytes of the EEPROM   for (int i = 0; i < 1024; i++)     EEPROM.write(i, 0);   */ }  void loop() {   occupancy = digitalRead(occupancySense);   delay(100);    while (occupancy == LOW)   {       time = millis();        if (time-startTime >= 180000)    //if more than 3 minutes has passed while occupancy=LOW       //turn all lights off       myHouse.write(HOUSE_A, ALL_UNITS_OFF, 3);        occupancy = digitalRead(occupancySense);   }    while (occupancy == HIGH)   {     light = analogRead(lightSense);      startTime = millis();     Serial.println(startTime);     Serial.println(light);     delay(100);      if ( startTime >= 864000000)    // when 10 days have passed, enter standard phase        standard = true;      while (light > base + range)        //decrease light   24 level     {       p = calc_p();       //send DIM command       myHouse.write(HOUSE_A, UNIT_1, 3);       myHouse.write(HOUSE_A, DIM, p);       delay(200);       myHouse.write(HOUSE_A, UNIT_3, 3);       myHouse.write(HOUSE_A, DIM, p);       delay(600);           light = analogRead(lightSense);           Serial.println(light);           Serial.println(p);     }     while (light < base - range)    //increase light level     {       p = calc_p();       //send BRIGHT command       myHouse.write(HOUSE_A, UNIT_1, 3);       myHouse.write(HOUSE_A, BRIGHT, p);       delay(200);       myHouse.write(HOUSE_A, UNIT_3, 3);       myHouse.write(HOUSE_A, BRIGHT, p);       delay(600);           light = analogRead(lightSense);           Serial.println(light);           Serial.println(p);     }      if (learning == true)     {       range = 300;            //so as not to reverse any changes user made       learning_phase();     }      else if(standard == true)     {       if (learning == true)    //transition from learning to standard -- only once! when both are true       {         base = calc_base();         range = 15;            //narrow the range so during std op. light levels are as close to user's preference         learning = false;       }       standard_phase();     }   25      //check for occupancy     occupancy = digitalRead(occupancySense);   } }   //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// FUNCTIONS //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////   //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// // Read LCD Buttons // returns which button was pressed //////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////  int read_LCD_buttons() {   adc_key_in = analogRead(0);   if (adc_key_in > 1000) return btnNONE; // We make this the 1st option for speed reasons since it will be the most likely result   if (adc_key_in < 50)   return btnRIGHT;   if (adc_key_in < 195)  return btnUP;   if (adc_key_in < 380)  return btnDOWN;   if (adc_key_in < 555)  return btnLEFT;   if (adc_key_in < 790)  return btnSELECT;   return btnNONE;  //when no button pressed }  //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// // Learning Phase // asks the user if they need more light and saves data when // user is satisfied //////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////  void learning_phase() {   lcd.setCursor(0,0);   26   lcd.print("Do you need more");   lcd.setCursor(0,1);   lcd.print("light?");    lcd.setCursor(10,1);   lcd_key = read_LCD_buttons();    if(lcd_key == btnLEFT)          //User needs more light   {       lcd.setCursor(10,1);       lcd.print("YES");       //increase light level       //send BRIGHT command       myHouse.write(HOUSE_A, UNIT_1, 2);       myHouse.write(HOUSE_A, BRIGHT, 2);       delay(200);       myHouse.write(HOUSE_A, UNIT_3, 2);       myHouse.write(HOUSE_A, BRIGHT, 2);       delay(500);       lcd.clear();              ///// clears screen until it is ready to receive an answer again   }    else if(lcd_key == btnRIGHT)          //Current light level is adequate   {       lcd.setCursor(10,1);       lcd.print("NO"); ////////////////////////////////////////add in code here to save data (EEPROM)//////////////////////////////////////////       //save_data();        delay(500);       lcd.clear();   }    lcd.setCursor(10,1);   lcd.print("   "); }  //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// // Standard Phase // Set after learning phase, regular operation, manual // override //////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////    27 void standard_phase() {   lcd_key = read_LCD_buttons();    YES = true;   NO = true;   UP = true;   DOWN = true;    lcd.setCursor(0,0);   lcd.print("Would you like to change the current light levels?");    switch(lcd_key)   {   case btnYES:     {       while(YES == true)       {         lcd.clear();         lcd.print("Use UP or DOWN,"); //to adjust light levels         lcd.setCursor(0,1);         lcd.print("then press YES");          delay(300);          lcd_but = read_LCD_buttons();          switch(lcd_but)         {         case btnSELECT:           {             YES = false;             break;           }         case btnYES:           {             while(UP == true)             {               lcd.clear();               lcd.print("Would you like Luzinda to remember these changes?");                delay(500);                lcd_but2 = read_LCD_buttons();    28               switch(lcd_but2)               {               case btnYES:                 {                   while(YES == true)                   {                     lcd.clear();                     lcd.setCursor(6,0);                     lcd.print("YES"); ///////////////////////////////////////////////// add code to save data (EEPROM) /////////////////////////////////////////////////                     //save_data();                     //base = calc_base();                     lcd.setCursor(0,1);                     lcd.print("Changes saved");                     delay(1000);                     YES = false;                     NO = false;                     UP = false;                     lcd.clear();                     break;                   }                   break;                 }               case btnNO:                 {                   while(NO == true)                   {                     lcd.clear();                     lcd.setCursor(6,0);                     lcd.print("NO");                     lcd.setCursor(0,1);                     lcd.print("Changes not saved");                     delay(1000);                     UP = false;                     NO = false;                     YES = false;                     lcd.clear();                     break;                   }                   break;                 }               case btnSELECT:                 {                   lcd.clear();                   lcd.print("Changes not saved");                   delay(1500);   29                   UP = false;                   YES = false;                   NO = false;                   lcd.clear();                   break;                 }               }             }           }         case btnUP:           {             //increase light output             myHouse.write(HOUSE_A, UNIT_1, 3);             myHouse.write(HOUSE_A, BRIGHT, 2);             delay(200);             myHouse.write(HOUSE_A, UNIT_3, 3);             myHouse.write(HOUSE_A, BRIGHT, 2);           }         case btnDOWN:           {             //decrease light output             myHouse.write(HOUSE_A, UNIT_1, 3);             myHouse.write(HOUSE_A, DIM, 2);             delay(200);             myHouse.write(HOUSE_A, UNIT_3, 3);             myHouse.write(HOUSE_A, DIM, 2);           }         }       }       break;     }   case btnNO:     {       lcd.clear();       lcd.setCursor(6,0);       lcd.print("NO");       delay(1000);       break;     }   default:       break;   } }  //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// // Calculating P // returns a value=p that is proportional to the difference   30 // between ambient light levels and the base light level //////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////  int calc_p() {   int diff = base - light;   int new_diff = abs(diff);   if (new_diff > 200)   {     p = 4;   }   else if (200 > new_diff > 100)   {     p = 3;   }   else if (new_diff < 100)   {     p = 2;   }   return p; }  //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// // Save Data // saves the number of times the user is satisfied with a // current light level to the Arduino's EEPROM memory //////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////  /* void save_data() {   int address = light;   byte value = EEPROM.read(address);  //current number of times this light setting was saved   if (value == 254)   {     Serial.print("max value reached");             //so that value stored will not go above 255 or reset to 0   }   else if (value < 254)   {     value = value + 1;                 //increment the number of times this light setting was saved     EEPROM.write(address, value);      //store this value in the corresponding light level address in memory   31   }    Serial.print(address);   Serial.print("\t");   Serial.print(value, DEC);   Serial.println(); } */  //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// // Calculate the Base // returns the mean value of the light levels the user has // been satisfied with over the learning period //////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////  /* int calc_base() {   int value = 0;      //number of times corresponding light value was saved   int sum = 0;   int n = 0;          //number of times data was stored   int mean = 0;   //read current values from memory, add up all light sensing values,   //find mean   for(int i=0; i<1023; i++)   {   value = EEPROM.read(i);   sum = sum + value*i;   n = n + value;   }   mean = sum / n;   return mean; } */       32 Appendix B: Photosensor Datasheet   33 Appendix C: Motion Sensor Datasheet                       34    35    36    37     38                          39    40    41                         42 Appendix D: System Design Sketches       43  Features: • 4 push buttons: Up, Down, Yes, No • Large, backlit LCD screen • Portability • Wireless communication with LUZinda base station • Finger grips on sides   44  Includes: • X10 Two-Way Interface • Arduino Features: • Simply plug-and-go • Status LED on face    45  Includes: • Dimmable switch • Status LED • Built-in motion sensor • Touch/tap design      46  Includes: • 9-Volt battery • XBee • Photosensor Features: • Small design • Wall mountable (with stick pad) • Sensor window for protection (made of plastic) • Latch to easily replace battery


Citation Scheme:


Citations by CSL (citeproc-js)

Usage Statistics



Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            async >
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:


Related Items