Professional Documents
Culture Documents
Trilumen Final Report
Trilumen Final Report
Final Report
CECS 490a CSULB College of Engineering
December 17, 2014
Chi Tong 008911056
Nicolas Vicente 008028824
Adrian Quezada 008738429
FALL 2014
The Trilumen system is an automated daylight harvesting lighting control system meant to
reduce energy consumption in the home. The system uses the Insteon Dimmer along with
other components to adjust light level based on the natural light coming into the home.
Page |1
Table of Contents
I) Team Members .......................................................................................................................................... 3
II) Introduction .............................................................................................................................................. 6
III) Project Overview...................................................................................................................................... 7
IV) Technology Overview .............................................................................................................................. 8
V) Existing Products .................................................................................................................................... 10
VI) Specifications ......................................................................................................................................... 16
A) User..................................................................................................................................................... 16
B) Technical ............................................................................................................................................. 16
C) Physical ............................................................................................................................................... 16
VII) User Interface ....................................................................................................................................... 17
A. Installation .......................................................................................................................................... 17
B. Standard Mode ................................................................................................................................... 17
C. Adjusting Lighting Level ...................................................................................................................... 17
D. Manual Override Mode ...................................................................................................................... 18
VIII) Theory .................................................................................................................................................. 19
IX) Hardware ............................................................................................................................................... 20
Top Level Block Diagram ......................................................................................................................... 20
2nd Level Block Diagram ......................................................................................................................... 21
Block Diagram Description ...................................................................................................................... 22
X) Software.................................................................................................................................................. 24
Software Flow Diagram ........................................................................................................................... 24
Software Design ...................................................................................................................................... 27
Figure 1 Description ............................................................................................................................ 27
Figure 2 Description Hardware Interrupt......................................................................................... 28
Figure 3 Description Website control / System Interrupt ................................................................ 28
Figure 4 Description Light Level Updating ....................................................................................... 29
XI) Schedule................................................................................................................................................. 30
Hardware Task List .................................................................................................................................. 30
Software Task List ................................................................................................................................... 31
Gantt Chart ............................................................................................................................................. 32
XII) Cost ....................................................................................................................................................... 33
Page |2
XIII) Conclusion............................................................................................................................................ 37
XIV) Appendix .............................................................................................................................................. 39
Page |3
I) Team Members
Student: Adrian Quezada
Major: Computer Engineering
Minor: Computer Science
School: California State University, Long Beach
Class Standing: Senior
Responsibility: Sensors and project integration
Interests: Formerly involved with various
Engineering organizations at California State
University, Long Beach. Enjoys taking part in organizational activities, community
service events, playing soccer, and hanging out with friends.
Page |4
Page |5
Page |6
II) Introduction
The Trilumen system is an automated daylight harvesting lighting control system
meant to reduce the light bulb energy consumption while seamlessly adjusting the
lighting in the room. Our system is made to run with the Insteon system by controlling a
dimmer through one of their modules. Instead of having the light bulb completely on
when they do not need to be or having the lights off when it is starting to get slightly
dark, we will have it on somewhere in between. The system will be set up to adjust the
light intensity level of the light bulb through the Insteon dimmer based on the sunlight
currently making into the room. Data display and settings of the system will be handled
through the Trilumen website.
Page |7
Page |8
Page |9
So once we found the difference, we had to look for how to make a photo-sensor
detect only light intensity of light within the range of 400 to 500 nanometres. We found
that photodiodes can be made to work within a specific light frequency. So we decided
to use a photodiode that has been made to work around the blue color spectrum.
P a g e | 10
V) Existing Products
*Most of the companies do not specify price for full system and prices not released by
company directly one must talk to a designated representative. The parts nonetheless
can be found separately.
Leviton Functionality:
3 levels:
Level 1 - Minimal hold off feature leaves all lights off is lighting is still ok
Occupancy sensor, OSP power pack, optional manual override.
Level 2 - Ambient light hold off. Dimmers, occupancy sensors, OSP power pack, OSA20
Add-a-Relay
Level 3 - MiniZ Daylight harvesting Controller, 5 button control station
Sensor detects lighting by foot candles by usually detecting the lighting bouncing off the
ground
Advantage/Disadvantages
Advantages: there are different levels of daylight harvesting, prices are not displayed
but there should be a varying price based on the features and services provided.
Disadvantages: might be extremely costly and need to integrate a new system to your
home
System made for larger spaces, like school rooms and gyms, not so much for homes.
P a g e | 11
Cost: Photocell ~ $70 or up, Occupancy Sensor ~ $60, Power packs ~$15, Add-a-relay
~$15, MiniZ daylight harvesting system ~$430, and a 5 button control station price was
not available.
P a g e | 12
SHARP - Have energy saving idea by using Energy-saving LED luminaires, motion
sensors, and a brightness sensor
Advantage/Disadvantages
Advantages: Digital Addressable lighting interface ballasts are used so they have their
own interface to control lighting which is different than the others.
Disadvantages Not enough information for product.
Cost: Not disclosed
Osram Sylvania / Encelium - Have energy saving idea by using Energy-saving LED
luminaires, motion sensors, and a brightness sensor
Advantage/Disadvantages
Advantages: Data collection through sensor, switch, light fixture, and data is managed
through ECU, data stored on local network and/or cloud, then collectively visualized on
PC.
Disadvantages Not enough information for product.
P a g e | 13
P a g e | 14
P a g e | 15
The Insteon module is interconnected to the Rasberry Pi, the 8051, and
photodiodes. We kept the 8051 and photodiode circuit separate from the raspberry pi to
add complexity to our project by not utilizing the Pi for all functionality. The diode sensor
are aimed toward the surface that the customer point of interest such as a desk.
Furthermore, since the module has a power cord it can be moved from surface to
surface. We will be using a bulb that is a warm white and because it does not have a
prominent blue color spectrum frequency the photodiode will be able to differentiate the
natural light with that of the artificial light. The Insteon module communicates with an
insteon dimmer to address adequate light changes.
Insteon components are a onetime purchase and has no monthly fees so one the
few components are purchased you will not have to worry about monthly fees.
P a g e | 16
VI) Specifications
A) User
Power LED
B) Technical
Clear Photodiode:
o Detects light intensity all visible light wavelength
o Detects light intensity better at higher wavelengths
o 5 volt input
Raspberry Pi:
o 5 Volts
o RAM: 256 MB
8051:
o 5 Volts
o 4K Bytes of Memory
C) Physical
Size: 7 x 4 x 1
Sensor attached
P a g e | 17
B. Standard Mode
The user will not have to do anything to the module once it has been activated.
The user can however check the lighting level of the LED lightbulb and the received
light intensity from both the sunlight and the overall light in the room. In order for the
system to control the rooms LED light bulb, the rooms light switch must be turned on.
When it is light switch is off, the LED light bulb ignores all incoming signals and remains
off.
P a g e | 18
P a g e | 19
VIII) Theory
When it comes to adjusting the brightness of the light bulb, we need to adjust the
lighting only when it is daytime. Sun starts setting around 4pm during standard time,
5pm during daylight savings time. Checking the light intensity every 5 to 10 minutes
should adequately adjust the lighting so the lighting in the room does not go through a
noticeable change.
In order to calculate how much of the light should be turned on, we will have to
make the light bulbs brightness inversely proportional to the amount of light being
received. So from the light intensity input we receive from the photodiode, we will have
to scale it to a range from 0 to100 percent. This percentage gives us how much light we
are receiving, so from here we will inverse this percentage by subtracting it from 100%.
Our final percentage will be the level at which we will set out light bulb at, so long as it
does not exceed the maximum output allowed.
P a g e | 20
IX) Hardware
Top Level Block Diagram
Trilumen Unit
Home Router
Insteon Dimmer
Trilumen Website
P a g e | 21
Regular Photodiode
Microcontroller
Insteon Module
(AT89C51-8 bits)
Override Button
Raspberry Pi
Override LED
Home Router
Insteon Dimmer
P a g e | 22
One blue color photodiode to calculate how much light coming from the sun.
One regular photodiode to calculate the total amount of light in the room.
One override push button to stop the sensor from sending data to the dimmer,
which stop the dimmer from adjusting its lighting level.
One override LED to show that the system is in override mode after pressing the
override push button.
Insteon Module:
The Insteon module will be contact by the 8-bit microcontroller to send out the changes
that need to be made. The signals coming from the microcontroller will be sending via
serial communication RS232 protocol. After that, the Insteon module will also update
the needed signals with the dimmer to adjust the lighting level in the room.
Insteon Dimmer:
The Insteon dimmer will be the focal point of the design since it will be in charge of
adjusting the light level according to the information sending from Insteon module. The
data coming from the Insteon module will be sending via power line since that is the
way Insteon system communicating with one another.
P a g e | 23
Raspberry Pi:
The raspberry pi will take the serial data coming from the 8-bit microcontroller
(AT89C51) via serial communication (RS232) and prepare it to be displayed on the
Internet. The Trilumen team will also be using a Cat5e Ethernet cable to connect the
Raspberry Pi with the home Internet router, in order to upload the collected data to the
Trilumen website.
Trilumen Website:
The Trilumen website will be set up to show the Trilumen team weekly progress as well
as the collected data coming from the Raspberry Pi. Three types of data will be shown
on the website coming from the Raspberry Pi are:
1. The total amount of light in the room.
2. The amount of sunlight in the room.
The brightness level of the room.
P a g e | 24
Figure 1
X) Software
Start:
System
Idle
Ask Raspberry Pi for time if night time (8 pm) turn system off
No
Receive input from the photo sensors
1 blue colored photo diode on Insteon integrated
module, 1 photo-sensor to display overall lighting
No
Yes
Wait
If before 4 pm || after 6 am Counter ==
Timer Interrupt
Tracker(check hourly) if 4-8 pm check (5 Min)
RESTART
Else loop here
P a g e | 25
Start
System Override
(Hardware
Interrupt Button)
Figure 2
Daylight
harvesting photo
sensor check is set
to off and manual
light control on
Yes
Interrupt
Return to top level
software flowchart
Website Control
Figure 3
Start
System Control
Tab on website
Raspberry Pi
checks data base /
(8051) proportion
calculation
Insteon dimmer
gets output from
Insteon module
based on the
calculations
Return to top level
software flowchart
P a g e | 26
Figure 3
Light level updating
8051 differentiates
value to send to
database
monitored by
raspberry Pi and
Insteon module.
(Based on
proportions
calculation)
Update
Threshold met
Raspberry Pi gets
data to update
Website
P a g e | 27
Software Design
Figure 1 Description
Start:
This state would initialize the module that will be utilized including the integrated circuit
with our photodiodes and 8051 chip and Insteon/Raspberry Pi module, Website runs
separately.
State 2:
Check if website or hardware interrupts have been set. If so which one and jump to
designated interrupt.
State 3:
Check for time of day if night time system idle otherwise continue.
State 4:
In this state there will be a test for the blue color spectrum frequency and whether there
is a difference in the light intensity between the photo sensors (Blue color enhanced and
clear photodiodes).
State 5:
If the lighting is over a certain threshold than it will go to another state to continue
checking for other variables otherwise the program will be sent to wait for a designated
interval of time and then begin the checking for a change in lighting again at the initial
state.
State 6:
In this state the program will check whether in fact the natural light outside is brighter or
lower than that of artificial light inside and determine the new state.
State 7:
This state consists of sending data through the 8bit processor to transmit a change to
the Insteon module to communicate to the need for the brightness of the Insteon bulb to
increase or decrease in brightness.
P a g e | 28
State 8:
The newly collected data will be stored on a data base and utilized by the raspberry pi
to update a website regarding use and changes to the Insteon bulb based on a inverse
proportion calculation in regards to the natural light.
This state will loop to the state until the desired threshold value is set by inverse
proportion calculation
State 9: This state waits for a designated amount of time to recheck if there are any
changes to the light levels which is checked by state six. If the designated amount of
time has not passed the program will stay in this state until it has completed the
allocated time delay. If the time between 6 am to 4pm is found set timer to check hourly,
if after 4 pm and before 8 pm check every 5 min. If after 8 pm before 6 am set to idle. If
there is no timer interrupt loop until interrupt and end to state 2.
Figure 2 Description Hardware Interrupt
State 1: The Trilumen harvesting unit is turned off and manual control for lighting is
established
State 2: The 8051 takes control of the lighting levels by setting the intensity to fully on
or 100% and blocks the website from making changes to the Trilumen unit.
State 3: Wait for a hardware interrupt if no interrupt loop to State 2 otherwise go to state
4.
State 4: Leave loop and go back to top level flowchart.
Figure 3 Description Website control / System Interrupt
State 1: Log on to trilumen.weebly.com and select System Control tab.
State 2: Light statistics displayed from both clear photodiode senor and blue color
enhanced photodiode by use of the Raspberry Pi and the database.
State 3: User input for light
State 4: Raspberry Pi checks data base that was updated by the inverse proportion
calculation performed by the 8051.
State 5: Insteon dimmer gets output from Insteon module based on the calculations.
State 6: Return to Top Level Flowchart.
P a g e | 29
P a g e | 30
XI) Schedule
Hardware Task List
1. Photo Sensor Concept Design - (Adrian, Nick, and Chi) In this task the team
will construct initial concept of photo sensor light differentiation and buy
components for initial and further testing. (Tentative Completion: February 2015)
2. Design circuit board - (Adrian, Nick, and Chi) In this task the team will construct
the design of the layout and integration of parts for the circuit board. (Tentative
Completion: February 2015)
3. Test photo sensor - (Adrian, Nick, and Chi) In this task the team will test the
integration of the photo-sensor and the microcontroller (Tentative Completion:
March 2015)
4. Solder circuit board - (Adrian, Nick, and Chi) In this task the team will take part
in soldering the circuit board. (Tentative Completion: April 2015)
5. Build 3D model for product casing - (Nick) In this task Nick will design the model
for encasing the initial product casing as well as adjustments needed to
accommodate any changes.(Tentative Completion: March 2014)
6. Test communication Microcontroller & Insteon Module- (Adrian, Nick, and
Chi) In this task the team will perform the integration of the microcontroller with
that of the 1st Insteon modem which connects directly to the wall outlet
(Tentative Completion: April 2015)
7. Test Insteon Dimmer Interaction with Insteon Module - (Adrian, Nick, and
Chi) In this task the team will perform the integration of the Insteon light bulb with
that from the 1st Insteon Modem (Tentative Completion: April 2015)
P a g e | 31
P a g e | 32
Gantt Chart
Week:
Tasks
Photo Senor
Concept Design
Deign Circuit
Board
Program
Microcontroller
Test Photodiode
Solder Circuit
Build 3D casing
Communication:
Microcontroller
and Insteon
Module
Test Insteon
Dimmer
Interaction with
Insteon Module
Program
Raspberry Pi
Set up website /
Interface
Final Test Run
1
H/S
Name
H
Adrian
H
Nick
S
Chi
H/S
H
H
Chi
Adrian
Nick
H/S
Adrian
H/S
Nick
S
Chi
S
C, N, A
H/S
C, N, A
10
11
12
13
14
15
P a g e | 33
XII) Cost
Circuit Design for photo-sensor and Microcontroller
Quantity 1 8051 chip
$5.5
Operating Temperature.................................. -55C to +125C
Storage Temperature..................................... -65C to +150C
Voltage on Any Pin with Respect to Ground .....................................-1.0V to +7.0V
Maximum Operating Voltage............................................ 6.6V
DC Output Current...................................................... 15.0 mA
P a g e | 34
Possible candidate
P a g e | 35
Quantity 1 - $49.99
Quantity 1 - Donated
Size: 7 x 4 x 1
5 Volts
P a g e | 36
Push Button
Quantity 1 - $3
Metal , Plastic
P a g e | 37
XIII) Conclusion
We are looking to have our Trilumen system be as practical and efficient as
possible. We learned a lot from looking into this project, especially because of how
vague our original idea was. The first big snag we ran into was how to have sensor
detect just sunlight versus artificial lighting. After some digging through the internet, we
found the answer we were seeking though the properties of light from different light
sources and a special photodiodes. Seeing what ranges of light waves and their
intensities the sun and different light bulbs produce, we found our difference. In order to
detect these differences we found special photodiodes that detect light intensity at
specific light wavelengths, thus solving our problem.
The next bump we ran into was electricity cost reduction; both how and where in
the system it mattered most. Our original idea had us adjusting the brightness of an
Insteon LED light bulb. With this idea, our system would have been limited to just
Insteon light bulbs. The other problem we ran into was the fact that LED light bulbs in
general spend far less energy than their more common counterparts. So to have our
system be more adaptable, we switched our focus into adjusting lighting through the
use of a dimmer. By doing this we would be able to dim any light bulb, especially ones
that spend more energy like incandescent light bulbs.
This project also got us to understand how it feels to make important decisions
on what to include in major group project and how much time to give ourselves to
complete those parts. We had long discussions on what or how to make certain parts of
our system. So we nearly to the end of the semester we kept making changes.
P a g e | 38
Though we have not gotten very far in the actual implementation and small scale
experiments, we have a more detailed and concrete view of what we want our product
to accomplish. We will definitely start off the implementation first with testing individual
components to see if any changes will need to be made to our design. We will just have
to continue experimenting and learning how to make the product possible.
P a g e | 39
XIV) Appendix
8051 Info:
http://www.atmel.com/images/doc0265.pdf
Acuity:
http://www.sensorswitch.com/literature/abc_product_brochure.pdf
Leviton:
http://www.leviton.com/
Light Wavelength Image:
http://housecraft.ca/wp-content/uploads/2012/09/spectral_responses2.png
Osram Sylvania ELOGIC:
http://assets.sylvania.com/assets/Documents/ecs106_sensor_switch.a8d55a5d-5fc04931-a420-537255ea1424.pdf
Raspberry Pi Info:
http://www.raspberrypi.org/