04.01.2015 Views

Global, Diffuse and Direct Pyranometer - Of the Clux

Global, Diffuse and Direct Pyranometer - Of the Clux

Global, Diffuse and Direct Pyranometer - Of the Clux

SHOW MORE
SHOW LESS

Transform your PDFs into Flipbooks and boost your revenue!

Leverage SEO-optimized Flipbooks, powerful backlinks, and multimedia content to professionally showcase your products and significantly increase your reach.

<strong>Global</strong>, <strong>Diffuse</strong> <strong>and</strong> <strong>Direct</strong> <strong>Pyranometer</strong><br />

by<br />

Eirik Albrigtsen<br />

Bachelor Thesis in<br />

Energy <strong>and</strong> Power Engineering<br />

Grimstad, June 6, 2006


Table of Contents<br />

Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1<br />

Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1<br />

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1<br />

1 The Sun 3<br />

1.1 Position of <strong>the</strong> Sun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3<br />

1.1.1 Julian Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3<br />

1.1.2 True Anomaly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4<br />

1.1.3 Ecliptic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4<br />

1.1.4 Equatorial Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5<br />

1.1.5 Observer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5<br />

1.1.6 Useful Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6<br />

1.1.7 Sunrise <strong>and</strong> Sunset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7<br />

1.2 Solar Radiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8<br />

1.2.1 Irradiance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8<br />

1.2.2 Insolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8<br />

1.2.3 Solar Irradiance Spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8<br />

1.2.4 Ground Spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9<br />

1.2.5 Atmospheric Extinction <strong>and</strong> Air Mass . . . . . . . . . . . . . . . . . . . . . . 10<br />

1.2.6 Simple Estimation Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11<br />

1.2.7 <strong>Diffuse</strong> <strong>and</strong> <strong>Direct</strong> Components . . . . . . . . . . . . . . . . . . . . . . . . . . 12<br />

1.3 Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br />

1.3.1 Parallel Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br />

1.3.2 Stepper Motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br />

1.3.3 Tracker at an Angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15<br />

2 Development 16<br />

2.1 Stepper Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br />

2.1.1 ULN2003A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br />

2.1.2 Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17<br />

2.1.3 Possible Complications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17<br />

2.1.4 Two Bit Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br />

2.2 Solar Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br />

2.2.1 Silicon Cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br />

2.2.2 Voltage Amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19<br />

2.2.3 Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19<br />

2.2.4 NI-DAQ mx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20<br />

2.3 LabVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20<br />

2.3.1 Sol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21<br />

2.3.2 DAQ Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23<br />

2.3.3 Corrective Spider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23<br />

1


2.3.4 Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24<br />

2.3.5 Read Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24<br />

2.3.6 Write Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25<br />

2.3.7 Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26<br />

2.4 Physical Realization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28<br />

2.4.1 Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28<br />

2.4.2 Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28<br />

2.4.3 Constructional Implications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29<br />

2.4.4 Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30<br />

2.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30<br />

Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31<br />

2


List of Figures<br />

1 <strong>Diffuse</strong> radiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1<br />

2 <strong>Direct</strong> radiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2<br />

1.1 Annual mean insolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8<br />

1.2 Solar irradiance spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9<br />

1.3 Spectral response curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10<br />

1.4 Annual mean insolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11<br />

1.5 Irradiance components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12<br />

1.6 Parallel port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br />

1.7 Six wire steppers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14<br />

1.8 Half-step sequence <strong>and</strong> directions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14<br />

2.1 ULN2003A - overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br />

2.2 ULN2003A - each driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br />

2.3 Circuit diagram - stepper control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17<br />

2.4 Two bit full-step sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br />

2.5 Two bit circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br />

2.6 PV cell equivalent circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br />

2.7 PV cell IV curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19<br />

2.8 Voltage Amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19<br />

2.9 Circuit diagram - voltage amplifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20<br />

2.10 LabVIEW Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20<br />

2.11 sol.vi - Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21<br />

2.12 sol.vi - UI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21<br />

2.13 daq-tasks.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23<br />

2.14 corrector.vi - Code <strong>and</strong> UI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23<br />

2.15 step.vi - UI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24<br />

2.16 step.vi - Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24<br />

2.17 read-reset.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25<br />

2.18 write-step.vi - Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25<br />

2.19 write-step.vi - UI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26<br />

2.20 DAQ false case structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26<br />

2.21 main.vi - UI <strong>and</strong> code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27<br />

2.22 Stepper circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28<br />

2.23 Solar circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28<br />

2.24 Lego construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29<br />

2.25 Measurement Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30<br />

3


Abstract<br />

The instrument used to measure <strong>the</strong> various components of radiation is called a pyranometer. The<br />

common, commercial pyranometer design uses a <strong>the</strong>rmopile, setting up a voltage proportional to<br />

<strong>the</strong> radiation based on temperature readings. This necessitates temperature compensation, as well<br />

as a good budget. Commercial pyranometers with good functionality are very expensive <strong>and</strong> fragile.<br />

The aim of this work is to construct a prototype for a cheap pyranometer of similar qualities as<br />

<strong>the</strong>ir commercial counterparts. Using photovoltaic silicon cells, instead of <strong>the</strong>rmocouples, we will<br />

measure <strong>the</strong> global irradiance as well as its direct <strong>and</strong> diffuse components to great accuracy. The<br />

latter requires a tracking system to ei<strong>the</strong>r block out surrounding ’reflections’, or block out <strong>the</strong> Sun<br />

itself.<br />

We start out by laying down <strong>the</strong> <strong>the</strong>ory for a cheap two-axis tracking system with focus on <strong>the</strong><br />

astronomical calculations that is needed for <strong>the</strong> tracker. Additional calculations that will improve<br />

<strong>the</strong> functionality of <strong>the</strong> pyranometer will also have some focus.<br />

The concepts of solar irradiance, atmospheric attenuation, air mass, spectral- <strong>and</strong> cosine responses<br />

will be covered to show <strong>the</strong> reliability <strong>and</strong> significance of our results. As a precursor <strong>the</strong><br />

chosen solutions, <strong>the</strong> <strong>the</strong>ory of stepper motors, <strong>and</strong> how <strong>the</strong> parallel port works, will be explained<br />

briefly. Finally, we explain <strong>the</strong> workings of <strong>the</strong> chosen electrical circuitry <strong>and</strong> <strong>the</strong> flow of <strong>the</strong><br />

LabVIEW code written for our pyranometer.<br />

This document was written for people who possess certain familiarity with ma<strong>the</strong>matics <strong>and</strong><br />

electronics. As for programming in LabVIEW; <strong>the</strong> ability to underst<strong>and</strong> <strong>and</strong> manipulate basic code<br />

is paramount if this solution is to be replicated successfully. On <strong>the</strong> o<strong>the</strong>r h<strong>and</strong>, <strong>the</strong> code itself is<br />

not hard to underst<strong>and</strong> with for people with some experience.


Introduction<br />

<strong>Pyranometer</strong>, from Greek: pyr; fire, ano; sky<br />

A pyranometer is <strong>the</strong> main instrument used to measure <strong>the</strong> global solar irradiance (radiation). It<br />

measures <strong>the</strong> sun’s energy from all directions (2π steradian) in <strong>the</strong> hemisphere in <strong>the</strong> plane above<br />

<strong>the</strong> instrument. A proper pyranometer use a flat plate covered with <strong>the</strong>rmopiles that absorbs<br />

sunlight <strong>and</strong> produces a voltage proportional to <strong>the</strong> temperature. However, a less expensive <strong>and</strong><br />

less fragile instrument can be built from a simple circuit <strong>and</strong> a silicon photovoltaic cell.<br />

The problem with <strong>the</strong>se cells, however, is that <strong>the</strong>y do not measure <strong>the</strong> whole spectrum, meaning<br />

it will have to rely on parts of <strong>the</strong> spectrum <strong>and</strong> amplify <strong>the</strong> measured value to correlate with a<br />

professional pyranometer. It is <strong>the</strong>refore advisable to gain access to professional pyranometer<br />

readings to calibrate a photovoltaic pyranometer. Section 1.2 will look at this more closely.<br />

The typical use of a pyranometer is for measurement of <strong>the</strong> global horizontal solar irradiance. For<br />

this purpose, it is placed in a horizontal orientation <strong>and</strong> sufficiently high above <strong>the</strong> surroundings<br />

so that it has a clear, hemispheric view of <strong>the</strong> entire sky with no shading or reflecting trees or<br />

buildings within this field of view.<br />

The global horizontal irradiance can be split up into two components, <strong>the</strong> direct irradiance (<strong>the</strong><br />

beam from <strong>the</strong> sun), <strong>and</strong> <strong>the</strong> diffuse irradiance. The latter is composed of photons scattered by <strong>the</strong><br />

atmosphere, <strong>and</strong>/or reflected by various surfaces if <strong>the</strong> pyranometer is located above ground level.<br />

For ground level <strong>the</strong> diffuse component is usually around 5 → 26% [10].<br />

Ma<strong>the</strong>matically, <strong>the</strong> global horizontal irradiance I g is equal to<br />

I g = I b cos z + I d (1)<br />

Where I b is <strong>the</strong> beam irradiance, <strong>and</strong> I d is <strong>the</strong> diffuse. The beam irradiance measured on a horizontal<br />

pyranometer is smaller than that of a pyrheliometer – which is pointed at <strong>the</strong> sun, <strong>and</strong> shielded from<br />

everything else – by a factor of cos z, where z is <strong>the</strong> angle of incidence. A pyranometer stationed on<br />

ground level for <strong>the</strong> purpose of measuring <strong>the</strong> beam irradiance, must first measure <strong>the</strong> global <strong>and</strong><br />

diffuse components, usually done by two separate instruments, <strong>and</strong> divide <strong>the</strong> difference by cos z.<br />

Ano<strong>the</strong>r solution is to simply make both a pyrheliometer <strong>and</strong> a global pyranometer, <strong>and</strong> from that,<br />

calculate <strong>the</strong> diffuse. This, intuitively, seems like a much better solution as a diffuse sun shading<br />

tracker is likely to result in ei<strong>the</strong>r too much shading – because of <strong>the</strong> detachment of cell <strong>and</strong> tracker<br />

– or periodical measurement of reflected beam irradiance from ground level if <strong>the</strong> cell is placed on<br />

<strong>the</strong> tracker.<br />

.<br />

Figure 1: Normal way to measure <strong>the</strong> diffuse radiation [10]<br />

1


A simple photovoltaic pyrheliometer can be constructed simply by placing <strong>the</strong> cell on top of<br />

<strong>the</strong> tracker, <strong>and</strong> encasing it in some sort of tube with <strong>the</strong> proper dimensions. The global irradiance<br />

can in turn, be measured by a free, horizontally placed cell.<br />

.<br />

Figure 2: Thermopile design pyrheliometer, measuring <strong>the</strong> direct radiation [10]<br />

However, to be able to track <strong>the</strong> sun with a pyrheliometer, we need two angles, <strong>the</strong> angle of<br />

incidence z, <strong>and</strong> <strong>the</strong> position of <strong>the</strong> sun along <strong>the</strong> horizon called <strong>the</strong> azimuth angle.<br />

2


Chapter 1<br />

The Sun<br />

This chapter covers <strong>the</strong> <strong>the</strong>oretical part of <strong>the</strong> project. It starts out with <strong>the</strong> equations needed to<br />

locate <strong>the</strong> sun using spherical geometry, <strong>and</strong> utilizes this foundation to cover additional elements<br />

for functionality in <strong>the</strong> development. We will look at some topics on solar irradiance <strong>and</strong> what we<br />

can expect to achieve in future measurements. Finally, <strong>the</strong> <strong>the</strong>ory of stepper motors <strong>and</strong> how to<br />

<strong>the</strong> parallel port works, will be explained briefly, as a precursor to <strong>the</strong> applications in chapter two.<br />

1.1 Position of <strong>the</strong> Sun<br />

The following equations follow a basic astronomical scheme to calculate <strong>the</strong> position of celestial<br />

bodies in <strong>the</strong> sky. We have tried to indicate what each formula actually means, albeit quite briefly.<br />

The section also goes a little beyond what’s strictly necessary to simply control a tracker, but it’ll<br />

prove a nice addition to a pyranometer interface as you’ll see later. The first five sections are here<br />

derived from Dr. Louis Strous’ equations <strong>and</strong> algorithms on his web page [13] (where <strong>the</strong> explanations<br />

goes a bit fur<strong>the</strong>r) <strong>and</strong> has proven to be very accurate.<br />

Five factors must be considered in order to locate <strong>the</strong> sun in <strong>the</strong> sky relative to <strong>the</strong> observer:<br />

1. Time 1.1.1<br />

2. Speed of orbit (not constant) 1.1.2<br />

3. Position on <strong>the</strong> ecliptic 1.1.3<br />

4. The axial tilt (skewed rotation axis) 1.1.4<br />

5. Position of <strong>the</strong> observer 1.1.5<br />

1.1.1 Julian Calendar<br />

Before we jump into <strong>the</strong>se calculations, it is convenient to express <strong>the</strong> date <strong>and</strong> time in a more<br />

ma<strong>the</strong>matically compatible decimal scheme to simplify <strong>the</strong>m. The astronomical st<strong>and</strong>ard is <strong>the</strong><br />

Julian Day Number J, a system effectively smacking year, month, day, hour, <strong>and</strong> minutes (<strong>and</strong><br />

additional subdivisions if such precision is necessary) into a single real number. This can be read<br />

as <strong>the</strong> number of whole days elapsed since January 1. 4713 B.C. midnight UTC.<br />

For algorithmic simplicity, we have modified Strous’ equations [14] a little to compensate for<br />

current time, <strong>the</strong> local time zone <strong>and</strong> daylight savings time.<br />

Definition 1.1.1 Suppose it is day number d of month number m of year y in <strong>the</strong> Gregorian<br />

calendar (negative years <strong>and</strong> with a year 0). With <strong>the</strong> local hour h in 24 hour format, compensated<br />

3


y <strong>the</strong> local Greenwich time zone tz <strong>and</strong> daylight savings time dst (active = 1, inactive = 0),<br />

current minute i, second sc, <strong>the</strong> Julian day number J can <strong>the</strong>n be calculated:<br />

1. If m is less than 3, <strong>the</strong>n replace m by m + 12 <strong>and</strong> y by y − 1.<br />

2. Calculate: k = d +<br />

h − tz − dst<br />

24<br />

3. The Julian Day Number J is equal to<br />

J = ⌊<br />

+ i<br />

1440 + sc<br />

86400 − 1522.5<br />

1461 · (y + 4716) 153 · (m + 1)<br />

⌋ + ⌊ ⌋ − ⌊ y<br />

4<br />

5 100 ⌋ + ⌊ y<br />

400 ⌋ + k (1.1)<br />

Where ⌊x⌋ means <strong>the</strong> floor of x, <strong>the</strong> closest whole number less than or equal to x. As an<br />

interesting example, (J − ⌊J⌋) · 100% is a percentage measure of how long into <strong>the</strong> day we are<br />

(12:00 UTC is <strong>the</strong> zero point).<br />

1.1.2 True Anomaly<br />

Because we observe <strong>the</strong> sun from a body rotating around it, we see our motion along <strong>the</strong> ecliptic<br />

(plane of <strong>the</strong> Earth’s orbit) reflected in <strong>the</strong> apparent motion of <strong>the</strong> sun.<br />

Definition 1.1.2 The mean anomaly M is <strong>the</strong> position of <strong>the</strong> earth relative to its perihelion (point<br />

in <strong>the</strong> orbit that is closest to <strong>the</strong> sun) if <strong>the</strong> orbit were a circle. It is given by:<br />

M = 357.5291 ◦ + 0.98560028 ◦ (J − J 2000 ) (1.2)<br />

where J 2000 = 2451545, <strong>the</strong> latest Julian epoch (January 1. 2000 A.D.).<br />

However, since our orbit is an elliptic one, <strong>the</strong> speed of <strong>the</strong> Earth varies <strong>and</strong> <strong>the</strong> mean anomaly is<br />

in turn inaccurate, though only with about ±2 ◦ .<br />

Definition 1.1.3 The true anomaly ν is <strong>the</strong> true position of <strong>the</strong> earth relative to its perihelion,<br />

measured in degrees. The difference between <strong>the</strong> true anomaly <strong>and</strong> <strong>the</strong> mean anomaly is called <strong>the</strong><br />

Equation of Center, C.<br />

1.1.3 Ecliptic<br />

ν = M + C (1.3)<br />

C = 1.9148 sin (M) + 0.0200 sin (2M) + 0.0003 sin (3M)<br />

Since <strong>the</strong> perihelion is not a very expedient point of origin, <strong>the</strong> ecliptical longitude λ has been<br />

defined as our position along <strong>the</strong> ecliptic relative to <strong>the</strong> vernal equinox. The vernal equinox occurs<br />

when <strong>the</strong> sun, <strong>the</strong> Earth <strong>and</strong> <strong>the</strong> first point of Aries all fall on an intersecting line.<br />

Definition 1.1.4 With <strong>the</strong> distance from <strong>the</strong> perihelion to <strong>the</strong> vernal equinox being 102.9372 ◦ , <strong>the</strong><br />

ecliptical longitude, λ, is equal to λ = ν + 102.9372 ◦<br />

Conversely, if you’re looking at <strong>the</strong> sun from <strong>the</strong> Earth, you’d look exactly in <strong>the</strong> opposite direction<br />

than if you’d look at <strong>the</strong> planet from <strong>the</strong> sun, so <strong>the</strong>se angles are 180 ◦ apart.<br />

λ sun = ν + 102.9372 ◦ + 180 ◦ (1.4)<br />

Interestingly, λ sun (being referred to <strong>the</strong> equinox) determines <strong>the</strong> beginning of (astronomical) spring<br />

when λ sun =0 ◦ . In fact, every whole 90 ◦ multiple of λ sun marks <strong>the</strong> beginning of a new season.<br />

The ecliptical latitude β sun is <strong>the</strong> perpendicular distance to <strong>the</strong> sun, <strong>and</strong> negligible in most<br />

calculations.<br />

4


1.1.4 Equatorial Coordinates<br />

Since <strong>the</strong> axis of rotation is not perpendicular, but ra<strong>the</strong>r tilted 23.45 ◦ to <strong>the</strong> side, it causes <strong>the</strong><br />

Earth to waltz around <strong>the</strong> sun like a predictably unstable humming top. The equatorial system<br />

incorporates this tilt in <strong>the</strong> equations, by packing <strong>the</strong> Earth inside a large, imaginary sphere (known<br />

as <strong>the</strong> celestial sphere) whose axis of rotation is perpendicular (i.e. points at <strong>the</strong> same North as<br />

that of <strong>the</strong> sun).<br />

Definition 1.1.5 The declination δ of <strong>the</strong> Earth, in <strong>the</strong> equatorial coordinate system, is <strong>the</strong> angle<br />

between <strong>the</strong> celestial equator <strong>and</strong> <strong>the</strong> true equator in <strong>the</strong> direction of <strong>the</strong> sun. It is given simply by<br />

δ sun = arcsin (sin(λ sun ) · sin(23.45 ◦ )) (1.5)<br />

Definition 1.1.6 The right ascension α is <strong>the</strong> equatorial equivalent of longitude, measuring how<br />

many hours (15 ◦ per hour) since <strong>the</strong> Earth passed <strong>the</strong> vernal equinox. Expressed modulo 360.<br />

( sin λsun · cos (23.45 ◦ )<br />

)<br />

α sun = arctan<br />

(1.6)<br />

cos λ sun<br />

It’s important to remember that all numerical calculations involving arctan must ei<strong>the</strong>r have a<br />

double input function to determine which quadrant we’re located in, or include if tests to determine<br />

this manually. O<strong>the</strong>rwise you can expect <strong>the</strong>m to flip over at <strong>the</strong> equinoxes, or whenever <strong>the</strong>y cross<br />

180 or 0. This is why sin λ<br />

cos λ<br />

is not reduced to tan λ.<br />

1.1.5 Observer<br />

The last variables needed to calculate <strong>the</strong> position of <strong>the</strong> sun are your geographical location; latitude<br />

φ north, <strong>and</strong> longitude I w west.<br />

Definition 1.1.7 The rotation angle of <strong>the</strong> Earth θ, measuring <strong>the</strong> sidereal time of <strong>the</strong> celestial<br />

meridian, is given by<br />

θ = 280.1600 ◦ + 360.9856235 ◦ (J − J 2000 ) − I w (1.7)<br />

Definition 1.1.8 The hour angle H measures how long it’s been – in sidereal time – since <strong>the</strong><br />

celestial body passed through <strong>the</strong> celestial meridian.<br />

H = θ − α (1.8)<br />

Definition 1.1.9 The angular distance from <strong>the</strong> horizon <strong>and</strong> up to <strong>the</strong> sun, <strong>the</strong> sun’s height in <strong>the</strong><br />

sky, is called <strong>the</strong> altitude h. Similarly, <strong>the</strong> position along <strong>the</strong> horizon, measured from south to west,<br />

is called <strong>the</strong> azimuth A. 1 h = arcsin (sin φ sin δ + cos φ cos δ cos H) (1.9)<br />

(<br />

)<br />

sin H<br />

A = arctan<br />

cos H sin φ − tan δ cos φ<br />

(1.10)<br />

Definition 1.1.10 The zenith angle z is <strong>the</strong> angular distance from <strong>the</strong> <strong>the</strong> sun to zenith, i.e. <strong>the</strong><br />

complement of <strong>the</strong> altitude.<br />

z = 90 ◦ − h (1.11)<br />

Note that <strong>the</strong>re are simplified, but less accurate, formulas for <strong>the</strong> hour angle 1.8, <strong>and</strong> declination<br />

1.5 that lets you bypass some of <strong>the</strong> equations used here for o<strong>the</strong>r less elaborate ones. Check out<br />

Power of <strong>the</strong> Sun [11] for more detail into this. Verily, nei<strong>the</strong>r approach drains much power from a<br />

CPU, but <strong>the</strong> extra precision given by Strous’ equations [14] might be superfluous for <strong>the</strong> tracking<br />

part. It does, however, add nice accuracy for <strong>the</strong> pyranometer interface.<br />

1 These relationships work simply because all <strong>the</strong> angles are referred to <strong>the</strong> vernal equinox.<br />

5


1.1.6 Useful Limits<br />

The hour angle at sunset H ss , <strong>and</strong> at sunrise H sr can found [11][14] by setting h = h 0 = −0.83 into<br />

equation 1.9<br />

( sin (−0.83 ◦ )<br />

) − sin φ sin δ<br />

H ss = arccos<br />

cos φ cos δ<br />

(1.12)<br />

The solution for H sr is here simply −H ss .<br />

The reason for not setting h = 0 is to compensate for two problems. First, half of <strong>the</strong> sun is<br />

still technically visible along <strong>the</strong> horizon when h = 0. Second, <strong>the</strong> atmosphere, tends to bend light<br />

downwards, making <strong>the</strong> sun seem higher in <strong>the</strong> sky than it really is. The error, when using h = 0<br />

to find <strong>the</strong> time for sunset, is up to ten minutes.<br />

An interesting property here, <strong>and</strong> this only applies to <strong>the</strong> latitudes above ±66.55 ◦ ;<br />

1. if tan δ · tan φ ≥ 1 <strong>the</strong> sun won’t set that day<br />

2. if tan δ · tan φ ≤ −1 <strong>the</strong> sun won’t rise that day<br />

The hours of daylight ω s is quickly calculable with H ss mod 360 [11]<br />

ω s = 2H ss<br />

15<br />

(1.13)<br />

It is of interest to note here that although <strong>the</strong> hours of daylight vary from month to month<br />

except at <strong>the</strong> equator (where tan φ = 0), <strong>the</strong>re are always 4, 380 hours of daylight in a year [11]<br />

(non leap year) at any location on <strong>the</strong> earth.<br />

H ss may also be substituted into equation 1.10 to get <strong>the</strong> azimuth at sunset.<br />

Ano<strong>the</strong>r limit that may be obtained is <strong>the</strong> maximum <strong>and</strong> minimum noontime solar altitude<br />

angle by substituting H = 0 in equation 1.9<br />

h max = 90 ◦ − |φ − δ| (1.14)<br />

To find <strong>the</strong> extreme values at your location, simply substitute δ for δ min = −23.45 to get <strong>the</strong><br />

noontime altitude at winter solstice, <strong>and</strong> by δ max = 23.45 to get <strong>the</strong> highest altitude at summer<br />

solstice.<br />

Note that noon is used here as astronomical noon when H = 0, <strong>the</strong> time when <strong>the</strong> sun is at <strong>the</strong><br />

highest point. This tends to deviate a bit from <strong>the</strong> twelve o’clock noon.<br />

6


1.1.7 Sunrise <strong>and</strong> Sunset<br />

Having found <strong>the</strong> hour angle for sunrise <strong>and</strong> sunset quite easily, we would like to use this to calculate<br />

backwards <strong>and</strong> find <strong>the</strong> time of it. This is a ra<strong>the</strong>r complicated process, since simply turning <strong>the</strong><br />

local sidereal time around to find <strong>the</strong> Julian date won’t work as too much information is lost in <strong>the</strong><br />

trigonometry <strong>and</strong> modular arithmetic.<br />

The way out is a guessing algorithm, derived from Strous’ more universal one [14].<br />

1. n ∗ = [J] − (0.324 + H target + I w ) · 360 −1<br />

where [J] is <strong>the</strong> current Julian day roundest to <strong>the</strong> nearest integer<br />

2. J ∗ = (0.324 + H target + I w ) · 360 −1 + [n]<br />

where [n] is n ∗ rounded to <strong>the</strong> nearest integer<br />

3. J target = J ∗ + 0.0053 sin M + 0.0069 sin (2λ sun )<br />

4. (Optional) To improve accuracy, calculate <strong>the</strong> hour angle for J target <strong>and</strong> take<br />

J target = J target + (H target − H improved ) · 360 −1<br />

This can be repeated until J target no longer changes. However, <strong>the</strong> estimate will change by<br />

about 3 minutes as λ sun <strong>and</strong> M changes throughout <strong>the</strong> day, so no need to overdo it (unless<br />

you recalculate M <strong>and</strong> λ sun as well).<br />

To, for instance, obtain <strong>the</strong> Julian date at sunset, it’s sufficient to simply substitute H target with<br />

H ss . A quick manipulation of <strong>the</strong> Julian day number yields <strong>the</strong> real target hour T h, i.e. <strong>the</strong> hour<br />

value with a decimal value to indicate where in <strong>the</strong> hour it happens.<br />

T h = (J target − ⌊J target ⌋ + 0.5) · 24 + tz + dst mod 24 (1.15)<br />

Here tz is <strong>the</strong> local timezone, <strong>and</strong> dst <strong>the</strong> daylight savings variable. Fur<strong>the</strong>r manipulation to get<br />

<strong>the</strong> date is useless to us since <strong>the</strong> day in question is always today!<br />

7


1.2 Solar Radiation<br />

1.2.1 Irradiance<br />

The rate at which solar energy reaches a unit area at <strong>the</strong> Earth is called <strong>the</strong> solar irradiance or<br />

solar radiation. The intensity of <strong>the</strong> radiation leaving <strong>the</strong> sun is relatively constant. Therefore, <strong>the</strong><br />

intensity of solar radiation at a distance of 1 AU (average Earth-Sun distance) is called <strong>the</strong> solar<br />

constant I sc <strong>and</strong> has a currently accepted of 1367W/m 2 value [10]. This value is measured at a<br />

plane perpendicular to <strong>the</strong> sun’s rays on <strong>the</strong> top of <strong>the</strong> atmosphere. This value varies with 6.8%,<br />

as <strong>the</strong> distance to to <strong>the</strong> sun varies with 3.4% [15] (5.1 million km).<br />

The part of this that passes through <strong>the</strong> atmosphere <strong>and</strong> hits <strong>the</strong> ground, is called <strong>the</strong> global<br />

solar irradiance. This is composed of <strong>the</strong> diffuse component; light scattered by <strong>the</strong> atmosphere,<br />

<strong>and</strong> <strong>the</strong> direct component; light coming directly from <strong>the</strong> sun in a beam.<br />

1.2.2 Insolation<br />

Earth receives a total amount of radiation determined by its cross section πr 2 , but as <strong>the</strong> planet<br />

rotates this energy is distributed across <strong>the</strong> entire surface area 4πr 2 . Hence, <strong>the</strong> average incoming<br />

solar radiation, known as <strong>the</strong> solar insolation, is 1/4th <strong>the</strong> solar constant or 342 W/m.<br />

As shown in figure 1.1, <strong>the</strong> insolation diminishes <strong>the</strong> fur<strong>the</strong>r away one gets from <strong>the</strong> equator, as<br />

<strong>the</strong> intensity varies with <strong>the</strong> cosine of <strong>the</strong> angle of incidence, or in our case, <strong>the</strong> zenith angle 1.11.<br />

The annual insolation mean for <strong>the</strong> south of Norway is a meager 45W/m 2 , but on a clear summer’s<br />

day, <strong>the</strong> daily solar insolation can reach 354W/m 2 [3].<br />

.<br />

Figure 1.1: Annual mean insolation at top of <strong>the</strong> atmosphere [2]<br />

1.2.3 Solar Irradiance Spectrum<br />

The extraterrestrial solar irradiance spectrum is <strong>the</strong> wavelength range of <strong>the</strong> sun’s rays as seen<br />

outside <strong>the</strong> atmosphere. It’s distributed relatively smooth, see <strong>the</strong> blue line in figure 1.2, with <strong>the</strong><br />

8


most frequent wavelength being around 500nm (which, when isolated, is percieved as green).<br />

It is interesting to note that about 45 percent of <strong>the</strong> sun’s energy comes to us at wavelengths<br />

in <strong>the</strong> visible spectrum, (nominally between 0.3 <strong>and</strong> 0.7 micrometers). Also, note that only a little<br />

more than 1 percent of <strong>the</strong> sun’s energy at shorter wavelengths (UV <strong>and</strong> X-solar radiation) <strong>and</strong> <strong>the</strong><br />

rest (54 percent) is in <strong>the</strong> infrared (IR) region [10]. The spectrum of <strong>the</strong> sun’s radiation changes<br />

as it passes through <strong>the</strong> earth’s atmosphere, as indicated by <strong>the</strong> orange line.<br />

1.2.4 Ground Spectrum<br />

As solar radiation passes through <strong>the</strong> earth ’s atmosphere, it is absorbed (<strong>the</strong> reason for some<br />

atmospheric heating), reflected (<strong>the</strong> reason astronauts can see <strong>the</strong> earth from outer space), scattered<br />

(<strong>the</strong> reason one can read this book in <strong>the</strong> shade under a tree), <strong>and</strong> transmitted directly (<strong>the</strong> reason<br />

<strong>the</strong>re are shadows). At <strong>the</strong> surface of <strong>the</strong> earth, <strong>the</strong> sun has a lower intensity, a different color, <strong>and</strong><br />

a different shape from that observed above <strong>the</strong> atmosphere. The magnitude of <strong>the</strong>se effects can be<br />

seen in figures 1.4 <strong>and</strong> 1.2.<br />

The solar radiation spectrum extends roughly from 300 to 2800 nm (as shown in figure 1.2) at<br />

<strong>the</strong> surface.<br />

Figure 1.2: Solar irradiance spectrum at top of <strong>the</strong> atmosphere <strong>and</strong> <strong>the</strong> direct irradiance at sea<br />

level. The difference between <strong>the</strong> two amount to atmospheric attenuation <strong>and</strong> scattering. [8]<br />

It follows that a pyranometer should cover that spectrum with a spectral sensitivity that is as<br />

flat as possible. With a photovoltaic pyranometer, however, this is simply not possible. A solar cell<br />

responds differently to <strong>the</strong> actualy spectrum than what a professional pyranometer does – on <strong>the</strong><br />

o<strong>the</strong>r h<strong>and</strong> it does get away with <strong>the</strong> temperature compensation. In general, a solar cell can only<br />

utilize a part of <strong>the</strong> spectrum so <strong>the</strong> producers concentrate on hitting <strong>the</strong> biggest chunk. Figure<br />

1.3 shows how this works.<br />

9


Figure 1.3: Example of a distorted wavelength scale plot. The relative spectral response of a silicon<br />

photovoltaic cell is shown, indicating that it can utilize 58 percent of <strong>the</strong> sun’s energy. [10]<br />

.<br />

1.2.5 Atmospheric Extinction <strong>and</strong> Air Mass<br />

The solar spectrum on Earth is not constant, <strong>and</strong> dependends on a variaety of factors, such as <strong>the</strong><br />

temporal condition of <strong>the</strong> atmosphere, level of ozone or o<strong>the</strong>r atmospheric gasses, but most of all,<br />

<strong>the</strong> apparent size of <strong>the</strong> atmosphere. As <strong>the</strong> sun gets closer to <strong>the</strong> horizon, <strong>the</strong> sun’s rays has to<br />

travel through more <strong>and</strong> more atmosphere to reach your location. The air mass is <strong>the</strong> ratio of <strong>the</strong><br />

distance a sunray has to travel through <strong>the</strong> earths atmosphere, to <strong>the</strong> distance it would travel if<br />

<strong>the</strong> sun were directly overhead. In o<strong>the</strong>r words, air mass = 1 if <strong>the</strong> Sun is in zenith, <strong>and</strong> air mass<br />

= 2 is at z around 60 ◦ . The secant of <strong>the</strong> zenith angle 1.11 is common approximation for angles<br />

less than 60 ◦ .<br />

More accurately, <strong>the</strong> air mass, as a function of <strong>the</strong> zenith angle z can be calculated as follows<br />

[10]<br />

1<br />

Air mass =<br />

cos z + 0.50572(96.07955 − z) −1.6364 (1.16)<br />

In this equation, <strong>the</strong> air mass at sunset (z = 90 ◦ ) is about 37 which explains why <strong>the</strong>re’s so little<br />

radiation around that time. Note that this can only provide an intuitive estimation of what we<br />

can expect at best. The atmospheric attenuation is a nonlinear process [9], <strong>and</strong> unique for each<br />

10


.<br />

Figure 1.4: Annual mean insolation at <strong>the</strong> surface (from HadCM3’s climate model [2])<br />

wavelenght as indicated by figure 1.2. This will most likely prove to be a problem for proportional<br />

measurements when <strong>the</strong> air mass gets big; <strong>the</strong> spectral response of <strong>the</strong> solar cell is constant, while<br />

everything except <strong>the</strong> red part of <strong>the</strong> spectrum is torn away – incidentally <strong>the</strong> part we have most<br />

problems with measuring.<br />

1.2.6 Simple Estimation Model<br />

A very simple half-sine model – which is very close to what a clear day graph will look like – for <strong>the</strong><br />

<strong>the</strong>oretical maximum irradiance as a function of time of sunrise <strong>and</strong> sunset can be easily calculated<br />

[10].<br />

(<br />

)<br />

T h − T h sunrise<br />

I = I noon · sin π<br />

(1.17)<br />

T h sunset − T h sunrise<br />

T h sunrise <strong>and</strong> T h sunset is here <strong>the</strong> target hour 1.15 obtained by reverse-engineering <strong>the</strong> hour angle<br />

at sunrise <strong>and</strong> sunset 1.12. It follows that T h, <strong>the</strong> current target hour should follow <strong>the</strong> same<br />

relative unit of measurement. Setting T h to h + i/60 should be sufficient – h being <strong>the</strong> current<br />

hour, <strong>and</strong> i <strong>the</strong> current minute.<br />

This model still suffer from <strong>the</strong> same flaws as <strong>the</strong> more advanced models; it needs <strong>the</strong> noontime<br />

irradiance I noon , as well as optimal wea<strong>the</strong>r conditions to work. However, since our pyranometer<br />

needs to be calibrated after this anyway, we might as well go out on a limb <strong>and</strong> interpolate a daily<br />

maximum from a few days worth of measurement from L<strong>and</strong>vik wea<strong>the</strong>r station [1], a station close<br />

to our location.<br />

Setting I noon = 1000W/m 2 seems to be a constantly reinforcing bet for <strong>the</strong> summer [10][17][1],<br />

<strong>and</strong> in <strong>the</strong> pyranometer interface code it will be left to this value to yield reasonable maximum<br />

approximations during <strong>the</strong> season.<br />

Technically, one could easily extend <strong>the</strong> usability of this by creating a similar half-sine model<br />

for I noon based on an interpolation of monthly readings from <strong>the</strong> wea<strong>the</strong>rstation, but <strong>the</strong>re aren’t<br />

enough data readily available for this at <strong>the</strong> moment.<br />

11


1.2.7 <strong>Diffuse</strong> <strong>and</strong> <strong>Direct</strong> Components<br />

If <strong>the</strong> global irradiance is all that hits a horizonal surface, <strong>the</strong>n this can be broken down into<br />

two components; what comes directly from <strong>the</strong> sun, <strong>and</strong> what seems to come from all around (<strong>the</strong><br />

diffuse). If we measure what comes directly from <strong>the</strong> sun with a horizontal solar cell, <strong>the</strong>n <strong>the</strong> global<br />

.<br />

Figure 1.5: The two components of <strong>the</strong> global irradiance [10]<br />

irradiance I g is <strong>the</strong> sum of <strong>the</strong> direct I b,h <strong>and</strong> <strong>the</strong> diffuse I d . However, if we measure <strong>the</strong> direct<br />

component with a cell tilted towards <strong>the</strong> sun, <strong>the</strong>n this (I d ) might at times seem bigger than <strong>the</strong><br />

global horizontal. This is because <strong>the</strong> cell absorbs a bigger part of <strong>the</strong> sunlight (<strong>the</strong> cosine effect).<br />

In o<strong>the</strong>r words, to calculate <strong>the</strong> diffuse (horizontal) component from <strong>the</strong> direct (tilted towards <strong>the</strong><br />

sun) <strong>and</strong> global (horizontal) irradiance, we need to turn equation 1 around.<br />

12


1.3 Tracking<br />

An accurate azimuth <strong>and</strong> altitude angle from section 1 are paramount for tracking <strong>the</strong> sun. The<br />

principle is simply to mount one motor onto <strong>the</strong> o<strong>the</strong>r, let one follow <strong>the</strong> azimuth, <strong>and</strong> <strong>the</strong> o<strong>the</strong>r<br />

control <strong>the</strong> altitude, <strong>and</strong> thus it’s able to cover any point within 2π steradian, i.e. its hemispheric<br />

view. NI LabVIEW 8.0 will st<strong>and</strong> for <strong>the</strong> tracker control <strong>and</strong> <strong>the</strong> required programming is to be<br />

found in in section 2.3.<br />

1.3.1 Parallel Port<br />

A two-axis tracker needs two motors, <strong>and</strong> in our case those two are six-wire stepper motors 1.3.2,<br />

necessitating a total of eight out ports to run properly. A basic reset system – to help <strong>the</strong> program<br />

position <strong>the</strong> motors – will also be incorporated, with <strong>the</strong> reset signals for each motor being read<br />

through two r<strong>and</strong>om status ports.<br />

There are eight data out ports are accessible from<br />

<strong>the</strong> data register (base address), while ano<strong>the</strong>r four out<br />

ports, some inverted, are accessible from <strong>the</strong> control<br />

register (base address+2). A total of five in ports can<br />

be read through <strong>the</strong> status register (base address+1) 2 .<br />

To actually access <strong>the</strong> port from LabVIEW is not more<br />

difficult than to place a prepared subroutine on your<br />

diagram.<br />

The base address should be obtainable (in Windows)<br />

from <strong>the</strong> System Information program. It’s <strong>the</strong><br />

first I/O port address under Components → Ports →<br />

Parallel, but it’s almost always at <strong>the</strong> default value of<br />

0x378.<br />

A high output signal should be interpreted electronically<br />

as setting <strong>the</strong> port to 5V , while a sending a low<br />

signal is equivalent to grounding it.<br />

The plan is to utilize <strong>the</strong> eight data bits to control<br />

<strong>the</strong> stepper motors through <strong>the</strong> appropriate electrical<br />

circuitry.<br />

Figure 1.6: Parallel port, face of a female<br />

connector. [6]<br />

1.3.2 Stepper Motors<br />

To track <strong>the</strong> Sun, we need motors capable of incremental<br />

adjustments. A stepper motor, almost identical to<br />

<strong>the</strong> kind found in an old 5.25” floppy drive, is capable of this.<br />

The six-wires from <strong>the</strong> steppers we have available are: two pairs of connectors for <strong>the</strong> motor<br />

coils, a total of four wires, <strong>and</strong> two wires in addition connected to each center of <strong>the</strong> coil. Fivewire<br />

motors often follow <strong>the</strong> exact same scheme, with <strong>the</strong> exception that <strong>the</strong>ir center tap is wound<br />

toge<strong>the</strong>r, which is perfectly fine for this project. Four wire steppers are bipolar steppers, <strong>and</strong> have<br />

no center tap. These typically require more advanced drive circuitry that is not covered here.<br />

To control a stepper, you’ll need to be able to send currents from <strong>the</strong> center-taps <strong>and</strong> through<br />

one of <strong>the</strong> coils. Doing so will put up a magnetic field perpendicular to <strong>the</strong> current, i.e. in <strong>the</strong><br />

opposite direction of <strong>the</strong> resultant direction of <strong>the</strong> current through <strong>the</strong> coil. By choosing which way<br />

to send <strong>the</strong> current on each coil, <strong>the</strong> motor can start to spin given <strong>the</strong> correct sequence of fields.<br />

2 LabVIEW, at least version 7 or newer, includes <strong>the</strong> Parallel Port Read <strong>and</strong> Write Loop.vi that can be of great<br />

help for testing functionality.<br />

13


(a) The coil endings connected to switches<br />

(b) Motor does one step when switch 3 <strong>and</strong> 4 are closed<br />

Figure 1.7: Six wire steppers<br />

For simplicity, we define <strong>the</strong> vectorial field from coil 1 B coil1 is to be called A + if its sum points<br />

upwards, <strong>and</strong> conversely A − if it’s pointing downwards. From coil 2, similarly, B coil2 is B + to <strong>the</strong><br />

right, <strong>and</strong> B − to <strong>the</strong> left. See figure 1.8.<br />

Using all eight directions to drive it around is not strictly necessary, only four adjacent ones are<br />

needed, but this obviously limits <strong>the</strong> precision by a factor of two. It’s, however, what is referred to<br />

as full-step mode, <strong>and</strong> <strong>the</strong> step angle (degree rotation per step) listed at <strong>the</strong> motors usually refer<br />

to this when it actually can operate with double accuracy.<br />

(a) <strong>Direct</strong>ions for half-step mode<br />

(b) Sequence for half-step mode<br />

Figure 1.8: Half-step sequence <strong>and</strong> directions<br />

In half-step mode, <strong>the</strong> most accurate motor used does 400 steps per revolution, or 0.9 ◦ per<br />

step. Figure 1.8(b) describes how a full gear rotation in half-step mode is possible by setting <strong>the</strong><br />

switches in <strong>the</strong> shown sequence. The switches are here closed if <strong>the</strong> value is 1 <strong>and</strong> open if 0.<br />

To identify <strong>the</strong> correct wires for coil 1 <strong>and</strong> 2, simply measure <strong>the</strong> resistance over all <strong>the</strong> wires.<br />

If you get an infinite resistance, <strong>the</strong>n <strong>the</strong> wires are from two different coils. If you get resistance x<br />

14


over wire A <strong>and</strong> B, <strong>and</strong> 2x over A <strong>and</strong> C, <strong>the</strong>n B must be <strong>the</strong> center tap of coil A → C. Identifying<br />

which coil is which, or <strong>the</strong> ’polarity’ is unnecessary because of <strong>the</strong> symmetry in <strong>the</strong> motor. If <strong>the</strong><br />

motor seems to be stuttering at <strong>the</strong> same place, simply reverse <strong>the</strong> polarity on one coil (if nothing<br />

else is wrong). If <strong>the</strong> motor is going in <strong>the</strong> wrong direction, switch coil 1 with coil 2, or use a<br />

reversed stepping sequence.<br />

1.3.3 Tracker at an Angle<br />

One of <strong>the</strong> primary specifications requested for this tracker was that it could be placed at an angle,<br />

i.e. tilting <strong>the</strong> pyranometers horizontal plane. This has a series of implications.<br />

1. The altitude used to control <strong>the</strong> motor tracker altitude will vary with <strong>the</strong> azimuth.<br />

2. The incidence angle on <strong>the</strong> cell measuring <strong>the</strong> global irradiance will vary with <strong>the</strong> azimuth.<br />

3. If <strong>the</strong> global pyranometer is tilted, it will measure parts of reflected beam irradiance <strong>and</strong><br />

exclude <strong>the</strong> diffuse component coming from behind it.<br />

The first two can be compensated for, but <strong>the</strong> third cannot. Thus, under ideal circumstances, <strong>the</strong><br />

global pyranometer should remain horizontal. Following, at any rate, is a few ma<strong>the</strong>matical tricks<br />

to compensate for <strong>the</strong> two.<br />

If a two-axis tracker is tilted β degrees, <strong>the</strong> new altitude, relative to <strong>the</strong> tilted plane is given by<br />

h new = h + β cos A (1.18)<br />

Where A is <strong>the</strong> azimuth angle. However, this is only holds if <strong>the</strong> plane tilts downwards towards<br />

<strong>the</strong> south (azimuth zero). To find <strong>the</strong> new altitude with <strong>the</strong> tilted plane pointing γ degrees away<br />

from azimuth zero, measured clockwise from south, <strong>the</strong> final relationship becomes<br />

h new = h + β cos (A − γ) (1.19)<br />

Similar solution for <strong>the</strong> incidence angle on <strong>the</strong> pyranometer (<strong>the</strong> apparent zenith angle of <strong>the</strong><br />

pyranometer)<br />

z new = z + β cos (A − γ) (1.20)<br />

As opposed to <strong>the</strong> pyrheliometer with <strong>the</strong> tracker, a change in <strong>the</strong> apparent zenith angle changes<br />

<strong>the</strong> value of what we measure.<br />

1. Actual measurement from G = D ∗ + B cos z new<br />

2. Wanted measurement from G = D + B cos z<br />

The diffuse component is irreconcilably distorted, but <strong>the</strong> change in direct irradiance can be compensated<br />

as follows<br />

G true = G measured − B(cos z − cos z new ) (1.21)<br />

15


Chapter 2<br />

Development<br />

In this chapter we will take a look at <strong>the</strong> development part of <strong>the</strong> project. This will include <strong>the</strong><br />

electrical interaction between LabVIEW <strong>and</strong> <strong>the</strong> stepper motors, as well as <strong>the</strong> circuitry needed<br />

for <strong>the</strong> solar cells. The basic flow of <strong>the</strong> code will be explained briefly at <strong>the</strong> end. The pros <strong>and</strong><br />

cons of <strong>the</strong> chosen implementation, will be discussed throughout <strong>the</strong> chapter, <strong>and</strong> at <strong>the</strong> end, our<br />

prototype will introduce itself <strong>and</strong> flaunt its abilities.<br />

2.1 Stepper Circuit<br />

2.1.1 ULN2003A<br />

For a practical realization of <strong>the</strong> switches in section 1.3.2, we have used <strong>the</strong> IC ULN2003A - Seven<br />

Darlington Arrays (data sheet attached).<br />

It would, of course, be expedient to have eight inputs for a chip,<br />

since we need <strong>the</strong> outputs from eight data bits, <strong>and</strong> indeed, ULN2805A<br />

[12] does provide such a scheme. Unfortunately, it was not what was<br />

available at <strong>the</strong> time.<br />

The ULN2XXX series has an open collector output, meaning that<br />

<strong>the</strong> output gets grounded through transistor when corresponding input<br />

line goes to high state. The corollary to this is that <strong>the</strong> previous switch<br />

pattern 1.8(b) is exactly what needs to be written to <strong>the</strong> parallel port.<br />

Figure 2.1: ULN2003A -<br />

overview [7]<br />

Figure 2.2: ULN2003A - Each driver (COM is pin 9). [7]<br />

16


2.1.2 Circuit<br />

The following figure shows our solution for <strong>the</strong> stepper control. The multitudes of resistors are<br />

pull-ups to help avoid floating logic gates. Pin 18 through 25 are ground returns for all <strong>the</strong> parallel<br />

port registers, <strong>and</strong> are here connected to <strong>the</strong> common ground from our power supply, which is an<br />

old PC PSU. As suggested in <strong>the</strong> datasheet [7], <strong>the</strong> common line is here connected to <strong>the</strong> supply<br />

line that feeds <strong>the</strong> motors for a cheap over-voltage protection.<br />

Figure 2.3: Circuit layout, two axis motor control. Drawn on <strong>the</strong> left is <strong>the</strong> female connector input<br />

from <strong>the</strong> parallel port. All resistors are 10 k.Ω<br />

2.1.3 Possible Complications<br />

Current over-voltage protection is widely considered dangerous. Given we only run <strong>the</strong> motors at 5<br />

volts, <strong>and</strong> it has proven to work well in test runs, it is still a risky decision if it’s to stay permanent.<br />

The problem is as follows. When we cut <strong>the</strong> connection to ground by setting a low input to <strong>the</strong><br />

respective ULN driver input, <strong>the</strong> motor coil will resist <strong>the</strong> change (V L = L di<br />

dt<br />

) <strong>and</strong> send a spike back<br />

through <strong>the</strong> transistor to ground. With <strong>the</strong> ground connected to <strong>the</strong> parallel port in addition to<br />

<strong>the</strong> power supply, this is a dangerous solution, <strong>and</strong> has in certain situations been known to break<br />

entire mo<strong>the</strong>rboards [5].<br />

The common way to solve this is to ei<strong>the</strong>r put clamping diodes between each motor coil <strong>and</strong><br />

ground [5], or a zener diode (a few volts above <strong>the</strong> running voltage) between <strong>the</strong> common port on<br />

<strong>the</strong> ULN <strong>and</strong> <strong>the</strong> power supply [6].<br />

17


2.1.4 Two Bit Drive<br />

F ields B1 B2<br />

A + B + 1 1<br />

A − B + 0 1<br />

A − B − 0 0<br />

A + B − 1 0<br />

Figure 2.4: The two bit<br />

full-step sequence<br />

An alternative design – which in hindsight is more than good enough<br />

given <strong>the</strong> external gears used 2.4 – features one motor in full-step mode.<br />

Full-step mode is only half as accurate, but can be driven by only two<br />

bit signals, while half-step requires all four. This is because in full step<br />

mode, while utilizing only <strong>the</strong> diagonal 1.8(a) resultant fields, <strong>the</strong> field<br />

from each coil is ei<strong>the</strong>r positive or negative as opposed to half-step mode<br />

where it sometimes turned off completely. The circuit can <strong>the</strong>n be driven<br />

like this<br />

Figure 2.5: Two bit full-step drive [4]<br />

2.2 Solar Circuit<br />

As suggested earlier, our pyranometer is basically just comprised of two solar cells <strong>and</strong> a voltage amplifier.<br />

To underst<strong>and</strong> what necessitated <strong>the</strong>se amplifiers, one must first look at <strong>the</strong> characteristics<br />

of a PV cell.<br />

2.2.1 Silicon Cell<br />

Figure 2.6: PV cell equivalent circuit<br />

[16]<br />

A PV cell can be modeled as a current source with a diode<br />

<strong>and</strong> resistance in parallel, in addition to a series resistance. In<br />

this model, only <strong>the</strong> photo current I pv from <strong>the</strong> current source<br />

itself is proportional to <strong>the</strong> sunlight hitting it. The voltage<br />

V measured over <strong>the</strong> terminals equals (I pv − I d − I p )R s from<br />

KCL, <strong>and</strong> here both <strong>the</strong> diode current I d <strong>and</strong> <strong>the</strong> current<br />

through <strong>the</strong> shunt resistance I p will obliterate any idea of a<br />

proportional measurement as I pv changes. The solution to<br />

this debacle is to (almost) short <strong>the</strong> terminals, causing <strong>the</strong><br />

voltage to drop so close to zero it will eliminate I d <strong>and</strong> I p .<br />

V sc = (I pv )R s (2.1)<br />

If you want <strong>the</strong> cell to drop to about 100mV for full sunlight, <strong>the</strong>n calculate <strong>the</strong> resistance required<br />

for such a drop, 0.1/I sc,max = R, <strong>and</strong> connect it to <strong>the</strong> terminals. Our cell produces about 0.04A<br />

in full sunlight, which indicates a resistance of no larger than 2.5Ω. A resistance of 0.8Ω which we<br />

have used, will thus cause a bigger voltage drop, <strong>and</strong> will help us cope with additional resistances<br />

in <strong>the</strong> long wires (measured to about 0.4Ω sum for <strong>the</strong> direct measuring cell), <strong>and</strong> o<strong>the</strong>r internal<br />

resistances.<br />

18


Figure 2.7: IV curve for a photovoltaic cell. The diagonal lines indicate <strong>the</strong> output at different<br />

resistances at <strong>the</strong> terminals, <strong>and</strong> here R 1 < R 2 < R 3 . Only V R1 is proportional to <strong>the</strong> sunlight.<br />

2.2.2 Voltage Amplifier<br />

Figure 2.8: A simple voltage amplifier<br />

With <strong>the</strong> amplification factor being R 1 /R G − 1.<br />

2.2.3 Circuit<br />

To measure such a small voltage, it’s necessary to amplify it<br />

electrically first, lest our proportional measurement is brutalized<br />

by noise or internal resistances of <strong>the</strong> voltmeter. A basic<br />

amplification like <strong>the</strong> one below, works as follows.<br />

1. The voltage at <strong>the</strong> operational amplifier’s plus gate is V sc ,<br />

so it must be <strong>the</strong> same at <strong>the</strong> o<strong>the</strong>r.<br />

2. The current from <strong>the</strong> minus gate through <strong>the</strong> potentiometer<br />

is I = V sc /R G<br />

3. But <strong>the</strong> current can’t come from <strong>the</strong> operational amplifier<br />

itself, so it must come from V out <strong>and</strong> pass through R 1<br />

V out = I(R G + R 1 ) = V sc /R G (R G + R 1 )<br />

V out = V sc (1 + R 1<br />

R G<br />

) (2.2)<br />

With R G as a 10kΩ potentiometer, <strong>and</strong> R 1 = 1MΩ, <strong>the</strong> amplification factor AF can be tuned from<br />

100 <strong>and</strong> up, but with precise adjustments limited to factors less than 1000.<br />

Practically, <strong>the</strong> amplifier causes a certain offset which I’ve not been able to eliminate. When<br />

<strong>the</strong> cell is completely covered, <strong>and</strong> with <strong>the</strong> AF set to about 800, <strong>the</strong> offset is exactly one volt.<br />

This should make it easy to take care of once signals are being interpreted by code.<br />

19


Figure 2.9: Voltage amplifiers for V sc .<br />

We have <strong>the</strong> used IC LM234AN - low power quad operational amplifiers (data sheet attached)<br />

to amplify <strong>the</strong> two signals. With <strong>the</strong> supply set to 5V , <strong>the</strong> maximum output is 3.5V . Supply <strong>and</strong><br />

ground are taken from <strong>the</strong> NI-DAQ mx, which we will also use to transport <strong>the</strong> amplified voltages<br />

to LabVIEW.<br />

2.2.4 NI-DAQ mx<br />

The NI USB-6008 is a multifunction data acquisition device for LabVIEW. It’s available at National<br />

Instruments for 1200, − NOK. The data sheet is attached, although <strong>the</strong> accompanying instructions<br />

are pretty much self-explanatory.<br />

It will measure <strong>the</strong> global irradiance voltage on AI1, <strong>the</strong> direct irradiance voltage on AI2, <strong>and</strong><br />

deliver supply <strong>and</strong> ground from AO0 <strong>and</strong> AO1.<br />

2.3 LabVIEW<br />

Figure 2.10: LabVIEW Hierarchy<br />

For a simplified <strong>and</strong> structured code, big chunks have been isolated <strong>and</strong> saved as substructures<br />

(sub-vi’s). The main control panel, which you can see is on <strong>the</strong> top, will be saved for <strong>the</strong> end to<br />

20


give a clearer view of how everything connects.<br />

The hierarchy is a little simplified, <strong>the</strong>re’s twenty or more sub-vi’s below DAQ measure (as<br />

indicated by <strong>the</strong> blue DAQ Assist block), but <strong>the</strong>y’re auto generated <strong>and</strong> don’t really contribute<br />

to <strong>the</strong> big picture.<br />

2.3.1 Sol<br />

sol.vi contains possibly <strong>the</strong> biggest chunks in terms of pure code. The massive math formula node,<br />

containing most of <strong>the</strong> equations presented in this document, is actually many times larger than<br />

what is shown on <strong>the</strong> image, with <strong>the</strong> code itself presented on <strong>the</strong> next page. The multitude of<br />

unused variables on <strong>the</strong> top is just a product of LabVIEW’s requirements.<br />

Figure 2.11: sol.vi - Code. Looks simple, but <strong>the</strong> math inside <strong>the</strong> formula node goes beyond what<br />

is shown<br />

Figure 2.12: sol.vi - UI. Calculating <strong>the</strong> position of <strong>the</strong> sun <strong>and</strong> a bunch of interesting statistics<br />

21


What is transferred to <strong>the</strong> control panel is <strong>the</strong> option to change your location <strong>and</strong> timezone –<br />

definitely recommended if you don’t live here. The optional time <strong>and</strong> date is just <strong>the</strong>re for toying<br />

around, <strong>and</strong> to check if things really work. Outputs are <strong>the</strong> cluster of information as well as <strong>the</strong><br />

azimuth <strong>and</strong> altitude.<br />

Program 1 sol.vi - Math Node Contents<br />

if(m


5. Sunset <strong>and</strong> sunrise hour (multiplied by 3600 to help LabVIEW convert it in <strong>the</strong> UI), <strong>and</strong> <strong>the</strong><br />

half-sine global irradiance model.<br />

2.3.2 DAQ Tasks<br />

A .vi for reading <strong>the</strong> two amplified voltage signals, <strong>and</strong> keeping <strong>the</strong> supply voltage connected. The<br />

new DAQ Assist blocks used are a vast simplification from earlier versions.<br />

(a) Code<br />

(b) UI<br />

Figure 2.13: daq-tasks.vi<br />

2.3.3 Corrective Spider<br />

The corrective spider corrects <strong>the</strong> altitude <strong>and</strong> global irradiance as functions of <strong>the</strong> inclination angle<br />

<strong>and</strong> position of inclination (see section 1.3.3 - Tracker at an angle). Additionally, it makes use of <strong>the</strong><br />

math node to remove <strong>the</strong> offset from <strong>the</strong> amplification circuit, <strong>and</strong> multiply <strong>the</strong> measured voltage<br />

with <strong>the</strong> amplification constant [W/V m 2 ].<br />

Figure 2.14: corrector.vi - Code <strong>and</strong> UI<br />

23


Program 2 corrector.vi - Math Node Contents<br />

k=pi/180;<br />

hn=h+b*cos((A-g)*k);<br />

z=(90-h)+b*cos((A-g)*k);<br />

G=(Gv-1.01)*AF; //offset 1.01V<br />

B=(Bv-1.01)*AF;<br />

D=G-B*sin(h*k);<br />

T=G-B*(sin(h*k)-cos(z*k));<br />

An=mod(A+90,360); //A internally referred to east (reset pos)<br />

if(hn location (else step down)<br />

Figure 2.15: step.vi - UI.<br />

Figure 2.16: step.vi - Code<br />

2.3.5 Read Reset<br />

read-reset.vi polls <strong>the</strong> two in-ports on <strong>the</strong> parallel port for changes. These control <strong>the</strong> reset functions<br />

for <strong>the</strong> two axes. If <strong>the</strong> switch was just pushed (step number low) <strong>the</strong>n <strong>the</strong> vi ignores subsequent<br />

pushes to avoid stagnation.<br />

24


(a) Code<br />

(b) UI<br />

Figure 2.17: read-reset.vi<br />

2.3.6 Write Step<br />

This is <strong>the</strong> part of <strong>the</strong> program that exports <strong>the</strong> step signal (position of <strong>the</strong> switches) to <strong>the</strong> circuit<br />

board. It takes <strong>the</strong> newly modified step number from step.vi <strong>and</strong> picks out <strong>the</strong> appropriate signal<br />

based on <strong>the</strong> step number modulo 8. A reversed motor array is <strong>the</strong>re to avoid physically switching<br />

cables if you mistook <strong>the</strong> polarity or which way external gears went.<br />

Figure 2.18: write-step.vi - Code.<br />

25


Figure 2.19: write-step.vi - UI.<br />

2.3.7 Control Panel<br />

The figure on <strong>the</strong> next page is pretty dense, but that’s mostly because all <strong>the</strong> earlier outputs –<br />

except a couple that’s been deliberately neglected – come toge<strong>the</strong>r in <strong>the</strong> control panel. The basic<br />

flow is that two shift registers starts stepping down from 2000 (or 500 depending on <strong>the</strong> motor) until<br />

<strong>the</strong> respective reset switches are physically in, at which point <strong>the</strong> pyrheliometer points towards <strong>the</strong><br />

east at horizon level. This means that <strong>the</strong> tracker needs to be placed in such a way that tracker<br />

points to <strong>the</strong> east when it hits <strong>the</strong> switch. After <strong>the</strong> position has been reset, <strong>the</strong> shift register is<br />

set to 0, <strong>and</strong> <strong>the</strong> tracker starts its intended sequence in <strong>the</strong> direction of <strong>the</strong> sun.<br />

The two integers going to <strong>the</strong> step.vi is <strong>the</strong> respective motor’s required steps for a complete<br />

rotation, <strong>and</strong> if <strong>the</strong>y are connected to external gears, this needs to be figured out manually. The<br />

best way is just to play around with <strong>the</strong> code, set <strong>the</strong> shift register to a massive value, <strong>and</strong> subtract<br />

<strong>the</strong> stop value after a few rotations. The mean number of steps per single rotation should suffice.<br />

The DAQ switch removes <strong>the</strong> necessity to have <strong>the</strong> DAQ mx plugged in<br />

when just testing <strong>the</strong> code. It gives an example reading of 1.8V from <strong>the</strong><br />

global amplifier <strong>and</strong> a 1.5V from <strong>the</strong> direct amplifier. Obviously, <strong>the</strong> diffuse<br />

reading is rarely reasonable with this setting as we’ve fed it a contradiction<br />

(global > (tilted) direct at low altitudes).<br />

To see <strong>the</strong> stepping sequence without connecting <strong>the</strong> stepper circuit,<br />

Figure 2.20: DAQ<br />

false case structure<br />

you must do this from write-step.vi. This is because <strong>the</strong> switches works<br />

perhaps <strong>the</strong> opposite way of what you might expect, pressed in, <strong>the</strong>y split<br />

<strong>the</strong> respective in-port from connection to ground, <strong>and</strong> when <strong>the</strong> parallel port<br />

isn’t plugged in, <strong>the</strong>y’re always on.<br />

26


Figure 2.21: main.vi - UI <strong>and</strong> code<br />

27


2.4 Physical Realization<br />

2.4.1 Circuits<br />

The circuits as realized from <strong>the</strong> sketches in section 2.1 <strong>and</strong> 2.2.<br />

Figure 2.22: Stepper circuit<br />

Figure 2.23: Solar circuit shown in <strong>the</strong> vicinity of <strong>the</strong> global cell<br />

2.4.2 Construction<br />

As shown in figure 2.24, our pyrheliometer is a simple Lego construction. In some areas, this<br />

construction excels with its simplicity, in o<strong>the</strong>rs, not quite so. Prime example of <strong>the</strong> pros is <strong>the</strong><br />

gears; <strong>the</strong>y’ve increased <strong>the</strong> accuracy of o<strong>the</strong>rwise inaccurate steppers two <strong>and</strong> threefold. The<br />

peculiar placement of <strong>the</strong> switches is a product of a failed experiment; getting it all to run on 5V .<br />

Turns out it’s not enough momentum even with a long arm <strong>and</strong> a perpendicular force (R × F ), so<br />

it’s all being run on 12V even though it’s more than we strictly need.<br />

Obviously, this is just a prototype, it’s not designed for prolonged usage as it, for instance,<br />

is not waterproof. There are, however, two key implications with certain design aspects of this<br />

construction that we feel would be of interest.<br />

28


Figure 2.24: Lego construction with two integrated stepper motors<br />

2.4.3 Constructional Implications<br />

Placing reset buttons limit <strong>the</strong> total area <strong>the</strong> tracker can cover, necessitating more bypass coding.<br />

In our code <strong>the</strong>y also represent <strong>the</strong> zero point, meaning that if you place <strong>the</strong> buttons elsewhere,<br />

<strong>the</strong>n <strong>the</strong> reset behavior must also be altered.<br />

One thing to note here is that if <strong>the</strong> tracker is to be placed at an angle facing up towards sunset,<br />

<strong>the</strong>n <strong>the</strong> altitude relative to <strong>the</strong> tracker will become less than zero, an impossible value for this<br />

construction.<br />

Similarly, if <strong>the</strong> tracker is placed at an angle at any point of <strong>the</strong> day, <strong>the</strong> compensated altitude<br />

may become greater than 90 ◦ at locations with smaller latitudes. The easiest way out of this is<br />

simply to design <strong>the</strong> altitude for semicircular rotation, but if 0 → 90 ◦ is all you can spare, than <strong>the</strong><br />

angles may be simply flipped with <strong>the</strong> code below. If <strong>the</strong> switch is placed at azimuth zero, <strong>the</strong>n<br />

<strong>the</strong> code segment on <strong>the</strong> next page should elude inauspicious collisions.<br />

Ano<strong>the</strong>r problem with our construction is <strong>the</strong> acceptance angle of <strong>the</strong> pyrheliometer. A professional<br />

pyrheliometer has a 5 ◦ acceptance angle [10], implicitly redefining <strong>the</strong> magnitude of <strong>the</strong><br />

direct component (<strong>the</strong> size of <strong>the</strong> solar disk is less than 0.6 ◦ ). Our construction pushed this angle<br />

up a little bit to accommodate a rectangular cell – because if you shade one part, <strong>the</strong> voltage drops<br />

dramatically. However, inherent in such an elliptic tube directed towards <strong>the</strong> sun, are focal points.<br />

29


Program 3 Flipping algorithm for altitudes greater than 90 ◦ . A is <strong>the</strong> azimuth angle<br />

if(h>90)<br />

{h=180-h; A=mod(A+180,360);}<br />

The rays are reflected of <strong>the</strong> inside of <strong>the</strong> tube resulting in an amplification of <strong>the</strong> true value.<br />

To bypass this amplification, we suggest that <strong>the</strong> inside of <strong>the</strong> tube is coated with an absorbing<br />

material (like black paint), or <strong>the</strong> voltage reading amplified with a different factor than that of <strong>the</strong><br />

global.<br />

2.4.4 Calibration<br />

To calibrate <strong>the</strong> amplification for <strong>the</strong> voltage, we have made a series of measurements. First we<br />

measured <strong>the</strong> radiation at Friday, June 2, 2006, at noon to find <strong>the</strong> proper amplification factor. The<br />

idea is that if this factor is well calibrated, <strong>the</strong> subsequent measurements should correlate with our<br />

source [1]. L<strong>and</strong>vik wea<strong>the</strong>r station [1] tells us that <strong>the</strong>ir last two hours readings have been stable,<br />

R G <strong>Of</strong>fset Voltage Range Voltage Mean<br />

<strong>Global</strong> 1.11kΩ 1.01V 1.82 → 1.88V 1.85V<br />

<strong>Direct</strong> 1.23kΩ 1.01V 1.60 → 1.65V 1.63V<br />

Figure 2.25: Measurement Results at H ∈ < −10 ◦ , 5 ◦ > (13:05 → 13:45 true noon), at June 1,<br />

2006<br />

<strong>and</strong> <strong>the</strong> 13:00 to 14:00 mean being 848W/m 2 . This indicates an amplification of 1000W/m 2 V . The<br />

direct measurements also seem reasonable enough to use <strong>the</strong> same amplification.<br />

Fur<strong>the</strong>r measurements has shown that this correlates to ±100W/m 2 with L<strong>and</strong>vik. This has<br />

only been tested with quick checks throughout <strong>the</strong> day, as my testing location does not have a<br />

complete hemispheric view. This kills off diffuse radiation <strong>and</strong> utterly destroys sunrise <strong>and</strong> sunset<br />

values. It’s, however, reasonable to assume <strong>the</strong>se values are not very accurate since our cell reacts<br />

very poorly to red light.<br />

The offset of about 1V is very expedient for our cells as <strong>the</strong> maximum output we’ve experienced<br />

is <strong>the</strong>n 2V . Scaling wise, this reveals a problem in <strong>the</strong> choice of <strong>the</strong> potentiometers, <strong>the</strong>y’re<br />

unnecessarily big, <strong>and</strong> <strong>the</strong>refore difficult to accurately adjust. With a small calculator cell like <strong>the</strong><br />

one shown in figure 2.23, we would suggest to ra<strong>the</strong>r replace <strong>the</strong> 1MΩ resistor with one of 5MΩ<br />

thus decreasing <strong>the</strong> difficulty of calibrating it.<br />

2.5 Conclusion<br />

It is perfectly feasible to construct an advanced pyranometer from cheap electric components.<br />

Although our project is most favorable for companies already in possession of LabVIEW <strong>and</strong> <strong>the</strong><br />

DAQ-mx, it’s still a far cheaper solution than what most <strong>the</strong>rmopile oriented pyranometers offer.<br />

Also, if LabVIEW doesn’t suit your purpose, <strong>the</strong> code could easily be ported to ano<strong>the</strong>r language.<br />

As compared to a professional pyranometer, <strong>the</strong> scores correlate pretty well with our inauspicious<br />

location in mind. The reading is definitely proportional to <strong>the</strong> sunlight, but <strong>the</strong> cell’s spectral<br />

response will render our readings at <strong>the</strong> beginning <strong>and</strong> end of <strong>the</strong> day dubious at best. For best<br />

results, we would recommend that it’s calibrated side by side with a professional pyranometer.<br />

The ideas listed in this report are worth considering when one wishes to acquire a pyranometer.<br />

If <strong>the</strong> global <strong>and</strong> diffuse component of <strong>the</strong> irradiance is not needed, <strong>the</strong> process of making it can<br />

be reduced to simply building <strong>and</strong> calibrating <strong>the</strong> solar circuit 2.2 <strong>and</strong> <strong>the</strong> effort is almost void.<br />

30


Bibliography<br />

[1] Bioforsk, L<strong>and</strong>bruksmeteorologisk tjeneste,<br />

http://lmt.bioforsk.no/lmt/index.phptype=&wea<strong>the</strong>rstation=29 [01.06.2006].<br />

[2] William M. Connolley, Hadley centre coupled model, version 3,<br />

http://en.wikipedia.org/wiki/Image:Insolation.png [30.05.2006].<br />

[3] Norwegian Research Council <strong>and</strong> <strong>the</strong> NVE, Nye fornybare energikilder, KanEnergi AS, 2001.<br />

[4] Ian Harries, Stepper motor controller connection diagrams,<br />

http://www.doc.ic.ac.uk/~ih/doc/stepper/control2/connect.html [28.05.2006].<br />

[5] Jason Johnson, Working with stepper motors,<br />

http://www.eio.com/jasstep.htm [1.06.2006].<br />

[6] Douglas W. Jones, A worked stepping motor example,<br />

http://www.netmotion.com/htm_files/advisory/advisor_example.htm [1.05.2006].<br />

[7] Allegro MicroSystems, Uln2003a datasheet,<br />

http://www.ortodoxism.ro/datasheets/allegromicrosystems/2001.pdf [30.05.2006].<br />

[8] NASA, Solar irradiance spectrum,<br />

http://en.wikipedia.org/wiki/Image:MODIS_ATM_solar_irradiance.jpg [30.05.2006].<br />

[9] J. Palmer <strong>and</strong> A. C. Davenhall, The ccd photometric calibration cookbook, 2001,<br />

http://www.starlink.rl.ac.uk/star/docs/sc6.htx/sc6.html#stardoccontents<br />

[30.05.2006].<br />

[10] William B. Stine <strong>and</strong> Michael Geyer, Power From The Sun chp. 2,<br />

http://www.powerfrom<strong>the</strong>sun.net/book.htm [30.05.2006].<br />

[11] , Power From The Sun chp. 3,<br />

http://www.powerfrom<strong>the</strong>sun.net/book.htm [30.05.2006].<br />

[12] STMicroelectronics, Uln2805a datasheet,<br />

http://www.st.com/stonline/products/literature/ds/1536.pdf [30.05.2006].<br />

[13] Dr. Louis Strous, Julian day number, 2006,<br />

http://www.astro.uu.nl/~strous/AA/en/reken/juliaansedag.html#juli<strong>and</strong>ay<br />

[30.05.2006].<br />

[14] , Position of <strong>the</strong> sun, 2006,<br />

http://www.astro.uu.nl/~strous/AA/en/reken/zonpositie.html [30.05.2006].<br />

[15] Wikipedia, Milankovitch cycles,<br />

http://en.wikipedia.org/wiki/Milankovitch_cycles [30.05.2006].<br />

31


[16] , Solar cell,<br />

http://en.wikipedia.org/wiki/Solar_cell [30.05.2006].<br />

[17] , Solar insolation,<br />

http://en.wikipedia.org/wiki/Insolation [30.05.2006].<br />

32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!