# Introduction

With the increasing awareness of sustainable and green building, more and more people are concerned with the efficiency of energy use at home and at work. For our ECE 476 Final Project, we developed a microcontroller-based, interior illumination system – The Heliostat Skylight. By reflecting light that would otherwise be lost, the Heliostat Skylight will enable users to conserve energy by producing increased light levels and for a longer duration than normally possible. Although our project concept is simple, we hope that by allowing people to use a little bit less electricity every day, over time, this will accumulate to be an enormous benefit for society.

# High Level Design

A. Background
In our design, the Heliostat Skylight can be in two operation modes:
1. Sun Tracking is used when the sun is low in the horizon and early and late in the day, throughout the day during winter months and all year long in northern lattitudes. By aligning to the position of the sun, the Heliostat Skylight reflects light down into the space which would otherwise be lost due to the low incident angle.

2. Sun Protection comes in handy in hot summer days when there is excessive sunlight. Diffusive reflective material used at the back of each reflector panel can block the harshest rays of the sun and maintains a soft indoor lighting condition. This reduces heat load and glare, and enhances the use of natural daylight, thereby reducing the operating costs of the building.
B. Background Math
As shown in the schematic, assume the incident angle of sunlight is theta, the included angle of reflective panel and the skylight is beta, then the effective illumination level is proportional to A in conventional skylight, and B in the heliostat skylight.
For theta < beta, A=9″sin (theta) and B=9″sin(theta)+4sin(beta-theta).
For theta > beta, A=9″sin (theta) and B=9″sin(theta)-9sin(theta-beta).
In our design, we chose beta to be 60 degrees. We can quantitatively evaluate the performance of conventional skylight verses our heliostat skylight by comparing the value of A and B. Tracking the sun�s movement generates up to more than 2 times the light levels in the space below. In the summer, when the sun is directly overhead, the reflective panel actually lower light level and solar heat gain 50%.
C. Design Concept
At the beginning of the day, when the sensor detects light, the heliostat enters Sun Tracking Mode. The secondary motor hoists the mirrors upwards at a tilt of 60 degrees and motor angle data is recorded, given that the heliostat is not in Cloudy Mode.
It then checks which sensor has a higher light level, and rotates accordingly. If the sensors are both underneath the cloudymode-threshold, the Cloudy Mode state is entered. In this state, the heliostat turns from its last recorded position to the 180 degree position, back and forth, until a light source is detected from the sensors again. Note that if the heliostat goes into Cloudy Mode at the initialization, it operates from the last recorded position of the backed up data from the day before.

The heliostat turns off using the secondary motor, if it is under the off-threshold.

In order to drive our skylight to face the sun, 2 sensor outputs need to be sampled and compared continuously. The ADC condition was initialized by setting the following:

We connected the Vcc with the Aref input of the Atmega644, this ADMUX setting allowed us to use the Vcc(5V) for voltage reference in analog to digital conversion. The output of the TSL13S Light-to-Voltage Converter ranges from 0 for no light to 5 volt for direct illumination.

Then in the Timer1 compare match ISR, the internal ADC, specifically ADC2 and ADC3, in Mega644 was switched repeatedly to sample the two sensor inputs. The TIMER1_COMPA_vect was executed every 1mSec, thus we was able to obtain updated information from sensor every 2mSec, which is good enough for sun tracking purpose. Moreover, because the rate of ADC is 125,000Hz, so 1mSec is definitely enough time for the conversion to complete. The following code was included in TIMER1_COMPA_vect to read the two sensor outputs.