91
CHAPTER 1: INTRODUCTION: 1.1 PROJECT BACKGROUND: As the range of applications for solar energy increases, so it needs for improved materials and methods used to harness this power source. There are several factors that affect the efficiency of the collection process. Major influences on overall efficiency include solar cell efficiency, intensity of source radiation and storage techniques. The materials used in solar cell manufacturing limit the efficiency of a solar cell. This makes it particularly difficult to make considerable improvements in the performance of the cell, and hence restricts the efficiency of the overall collection process. Therefore, the most attainable method of improving the performance of solar power collection is to increase the mean intensity of radiation received from the source 1.2 JUSTIFICATION FOR THE PROJECT: There are three distinct methods of increasing the mean intensity of solar radiation received by a solar array. These include focusing 1

Sun Tracking System Using Micro Controller

Embed Size (px)

Citation preview

Page 1: Sun Tracking System Using Micro Controller

CHAPTER 1

INTRODUCTION

11 PROJECT BACKGROUND

As the range of applications for solar energy increases so it needs

for improved materials and methods used to harness this power source

There are several factors that affect the efficiency of the collection process

Major influences on overall efficiency include solar cell efficiency intensity

of source radiation and storage techniques The materials used in solar cell

manufacturing limit the efficiency of a solar cell This makes it particularly

difficult to make considerable improvements in the performance of the cell

and hence restricts the efficiency of the overall collection process

Therefore the most attainable method of improving the performance of solar

power collection is to increase the mean intensity of radiation received from

the source

12 JUSTIFICATION FOR THE PROJECT

There are three distinct methods of increasing the mean intensity of

solar radiation received by a solar array These include focusing the incident

rays tracking the path of the sun using fixed control algorithms and

dynamic tracking

The first method involves focusing incident rays onto a rigid array

this allows incident rays to reach the array normal to the array surface The

second method uses a controller device to determine the position of the sun

with reference to the current day month and year The dynamic tracking is

1

similar to this method however sensors are used to determine the current

position of the radiation source

Currently there are a number of variations on each of these methods

The research undertaken in this thesis is directed towards the design of a

dynamic tracking system The dynamic tracking system was chosen because

it proposed the most accurate method of maintaining maximum power

collection possible

13 DEFINITION OF PROJECT

The objective of this thesis is to design a Sun Tracking Solar Array

System The concise definition of this system is as follows A

microcontrolled solar array that actively tracks the sun so that maximum

power is received by the array at all times This is achieved by using sensors

to locate the suns position at any instance and aligning the array using the

microcontroller so that all incident rays are normal to the array surface

14 SCOPE OF PROJECT

The scope of this project only encompasses the design of the

tracking system There has been no formal consideration of optimizing

power used by the tracking device or the affect of heat on the performance

of the array

2

15 PROJECT OVERVIEW

The remaining chapters detail the research design and analysis

performed during the course of the thesis project

Chapter 2 discusses theory associated with solar cell technology and the

optimizing of power received by an array This incorporates a review of

relevant literature and current designs in the field of sun tracking

Chapter 3 explains the methodology used while forming a solution to the

problem and the design considerations undertaken in this process

Chapter 4 gives an analysis of the design and data obtained during testing

Chapter 5 concludes the report by discussing the effectiveness of the

tracking system and possible applications This chapter also suggests some

further research areas and future design proposals

3

CHAPTER 2

BACKGROUND THEORY

21 INTRODUCTION

Before beginning the design of the tracking system it was

necessary to obtain some background information on solar cells and methods

of energy collection It was equally important to research the various

tracking systems available To obtain this information a study of relevant

literature was conducted This study involved a review of solar cell theory

an investigation into the sources of loss in solar systems and an examination

of current tracking methods

22 SOLAR CELL THEORY

Nuclear fusion reactions on the suns surface supply earth with solar

energy This energy is primarily released in the form of electromagnetic

radiation in the ultraviolet infrared and radio spectral regions (wavelengths

from 02 to3microm)Presently the most efficient means of harnessing this

power source is the solar cell which converts solar radiation directly into

electricity Solar cells are fabricated from various semiconductor materials

using numerous device configurations and selecting single-crystal

polycrystal and amorphous thin-film structures To following theory

considers the silicon p-n junction cell because it acts as

1Reference device for all solar cells

2The solar cell has a single energy bandgap

4

When the cell is exposed to the solar spectrum a photon with

energy less than Eg makes no contribution to the cell output A photon with

energy greater than Eg contributes an energy Eg to the cell output and the

remaining energy is wasted as heat The idealized equivalent circuit of the

cell is shown in Figure 1(b) where a constant-current source is in parallel

with the junction The source IL results from the excitation of excess carriers

by solar radiation Rs is the diode saturation current and RL is the load

resistance

(b) Figure 1 (a) Energy-band diagram of a silicon p-n junction solar

cell under solar irradiation (b) Idealised equivalent circuit of a solar cell

5

A typical schematic representation of a solar cell is shown in Figure 2 It

consists of a shallow p-n junction formed on the surface (eg by diffusion)

a front ohmic contactstripe and fingers a back ohmic contact that covers the

entire back surface and an antireflection coating on the front surface

6

23 CONVERTING PHOTONS TO ELECTRONS

The solar cells that you see on calculators and satellites are

photovoltaic cells or modules (modules are simply a group of cells

electrically connected and packaged in one frame) Photovoltaics as the

word implies (photo = light voltaic = electricity) convert sunlight directly

into electricity Once used almost exclusively in space photovoltaics are

used more and more in less exotic ways

They could even power your house How do these devices work

Photovoltaic (PV) cells are made of special materials called semiconductors

such as silicon which is currently the most commonly used Basically when

light strikes the cell a certain portion of it is absorbed within the

semiconductor material This means that the energy of the absorbed light is

transferred to the semiconductor The energy knocks electrons loose

allowing them to flow freely

PV cells also all have one or more electric fields that act to force

electrons freed by light absorption to flow in a certain direction This flow of

electrons is a current and by placing metal contacts on the top and bottom of

the PV cell we can draw that current off to use externally For example the

current can power a calculator This current together with the cells voltage

(which is a result of its built-in electric field or fields) defines the power (or

wattage) that the solar cell can produce Thats the basic process but theres

really much more to it Lets take a deeper look into one example of a PV

cell the single crystal silicon cell

7

24 WHEN LIGHT HITS THE CELL

When light in the form of photons hits our solar cell its energy frees

electron-hole pairs Each photon with enough energy will normally free

exactly one electron and result in a free hole as The effect of the electric

field in a PV cell If this happens close enough to the electric field or if free

electron and free hole happen to wander into its range of influence the field

will send the electron to the N side and the hole to the P side

This causes further disruption of electrical neutrality and if we

provide an external current path electrons will flow through the path to their

original side (the P side) to unite with holes that the electric field sent there

doing work for us along the way The electron flow provides the current and

the cells electric field causes a voltage With both current and voltage we

have power which is the product of the two How much sunlight energy

does our PV cell absorb Unfortunately the most that our simple cell could

absorb is around 25 percent and more likely is 15 percent or less

25 ENERGY LOSS

Solar cell absorbs only about 15 percents of the sunlights energy

Visible light is only part of the electromagnetic spectrum Electromagnetic

radiation is not monochromatic -- it is made up of a range of different

wavelengths and therefore energy levels (See How Special Relativity

Works for a good discussion of the electromagnetic spectrum) Light can be

separated into different wavelengths and we can see them in the form of a

rainbow Since the light that hits our cell has photons of a wide range of

energies it turns out that some of them wont have enough energy to form an

electron-hole pair

8

Theyll simply pass through the cell as if it were transparent Still

other photons have too much energy Only a certain amount of energy

measured in electron volts (eV) and defined by our cell material (about 11

eV for crystalline silicon) is required to knock an electron loose We call

this the band gap energy of a material

If a photon has more energy than the required amount then the extra

energy is lost (unless a photon has twice the required energy and can create

more than one electron-hole pair but this effect is not significant) These

two effects alone account for the loss of around 70 percent of the radiation

energy incident on our cell Our band gap also determines the strength

(voltage) of our electric field and if its too low then what we make up in

extra current (by absorbing more photons) we lose by having a small

voltage Remember that power is voltage times current

The optimal band gap balancing these two effects is around 14 eV

for a cell made from a single material We have other losses as well Our

electrons have to flow from one side of the cell to the other through an

external circuit We can cover the bottom with a metal allowing for good

conduction but if we completely cover the top then photons cant get

through the opaque conductor and we lose all of our current (in some cells

transparent conductors are used on the top surface but not in all) If we put

our contacts only at the sides of our cell then the electrons have to travel an

extremely long distance

9

26 OPERATION OF A PV CELL

Silicon is a semiconductor -- its not nearly as good as a metal for

transporting current Its internal resistance (called series resistance) is fairly

high and high resistance means high losses To minimize these losses our

cell is covered by a metallic contact grid that shortens the distance that

electrons have to travel while covering only a small part of the cell surface

Even so some photons are blocked by the grid which cant be too small or

else its own resistance will be too high

27 MAXIMIZING POWER OBTAINED FROM SOLAR CELLS

Through experiments conducted during research it was concluded

that the current obtained from solar cells is influenced by the angle at which

incident rays strike the cell surface By using a stationary light source and

adjusting the angle at which the light rays strike the cell a plot of current

delivered vs angle of incidence can be created This property of solar cells is

confirmed by the data contained in Table 1 and illustrated by figure(3)

Table 1 current delivered for various incidence

10

After considering the experimental data obtained it can be stated that

to maintain maximum power output from a solar array the angle of

incidence must be held at zero degrees Hence the array must constantly face

the sun This requires a tracking system that can continuously align the array

into the desired position

11

28 SOLAR CELL TESTING PRINCIPLE

Measurement of solar cells and solar irradiance measurements are

closely linked Solar radiation on the ground is changing all the time this

change is not only reflected in the total irradiance but also its intrinsic

details of the spectral irradiance are also constantly changes this has brought

about the first solar cell measurements have been very great difficulties As

the solar cell is a spectrum selective components and its optical sensitivity

of the distribution of the solar spectrum changes with changes in the same

total irradiance and spectral irradiance of different light sources the solar

cells electrical properties of the output will be quite different

In order to achieve the unity of solar cell measurement value the

International Electro technical Commission first standard solar spectral

irradiation has been stipulated All the ground with solar standard conditions

of measurement is used AM15 standard solar spectral distribution the

spectral distribution of the data from specific meteorological conditions

atmospheric absorption of solar spectral distribution under the condition of

the measured values

The main technical parameters of solar cells is the spectral response of

solar cells short-circuit current and open circuit voltage and photoelectric

conversion efficiency of solar cells As a solar cell measuring the project

usually carried out the following two aspects of the test - the standard solar

cells under the conditions of the solar spectrum in the standard short-circuit

current in the solar simulator calibration and measurement of solar cells

under the V - A characteristics measurements

12

Calculate the standard solar spectrum under the condition of the

photoelectric conversion efficiency of solar cells Unable to get with the

standard AM15 solar spectral distribution consistent with artificial light so

can not directly measure the solar cells under the conditions of solar

radiation in the standard short-circuit current

The solar cell measurement laboratories usually a very complicated

method to achieve the standard AM15 solar spectrum solar cells under

short-circuit current measurements and traceability to the international

benchmark measure light irradiation this process is known as solar

calibration

IV characteristics of solar cell measurement method is to first use of

solar cells with the measured spectral response similar to the standard solar

cell to set the sun simulator under standard test conditions of irradiance and

then measured in the sun simulator under test solar cells IV characteristic

curve as measured with the standard solar cell solar cell spectral response

similar to so this alternative measurement method can overcome the out due

to the spectral distribution of solar simulator

281 CHINArsquoS SOLAR CELL TECHNOLOGY DEVELOPMENT

TEST

The seventies of last century Tianjin Institute in solar power research

and development applications at the same time invested considerable human

and material resources the establishment of a solar cell measuring

laboratory began solar cell calibration and testing of technology research

13

The main testing equipment including domestic and imported A-

grade solar simulator for the measurement of electrical properties and the

development of phase-locked amplification technology based on solar

spectral response measurement system

The initial goal was to establish an accurate solar as a standard

industry-wide baseline measurement of solar cells In the meantime a

variety of solar cell calibration technique has been fully developed mainly

including mountain calibration ground spectral calibration spectral

calibration laboratories aircraft calibration calibration of the space shuttle

and many other calibration techniques have been developed and tried and

eventually the formation of Tianjin Institute of the standard solar power

system and Tianjin Institute of the standard solar power in mainland China

has been widely promoted and applied

The early eighties Chinas solar cell testing technology has gradually

matured As an emerging industry the importance of products measurement

of the standardization work so organized industry-wide testing experts has

established a national solar photovoltaic energy systems Standardization

Committee specializing in solar cell measuring testing and product quality

standards of the drafting of and development work The initial goal is to

achieve the solar value products industry-wide unity has formulated the

solar cell calibration method general norms mono crystalline silicon

solar cells space-solar temperature coefficient measurement method

single crystal general norms of silicon solar cells on the ground with the

solar components of the environment experimental methods on the

ground with standard solar cells space with standard solar cells

14

282 CHINArsquoS SOLAR CELL TECHNOLOGY INTERNATIONAL

ADVANCED LEVEL TEST

The early nineties the state investment fund special transformation

transformation of Tianjin Institute of solar power testing laboratory to

establish a set of a standard solar cell measuring device Include the

laboratory a standard solar cell calibration system and two standard solar

value transfer systems greatly improves the level of the labs solar cell

testing and capacity On this basis the establishment of a Ministry of

Information Industry E-205 metering stations specializing in solar testing

Dell LATITUDE D410 Battery for the Chinese solar industry to provide

accurate

Value of solar cells is also a unity in the world to be a difficult

problem To this end the international advanced solar testing laboratory

trying to achieve through international comparison of the solar value unity

throughout the world The most famous and most successful of an

international alignment is PEP `93 solar cells compared to international

standards it is the US Department of Energy project By the United States

Renewable Energy Laboratory led 10 countries around the world have 13

well-known solar testing laboratories to participate

Each laboratory provides two standard solar cell calibration data is not

standard sample all 23 standard solar cell through a variety of laboratory

calibration back to back to form after the international solar cell base WPVS

(world photovoltaic scale) Tianjin Power Research Institute (MII 205

metering stations) participated in this sub-standard solar activities in the

international comparison

15

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 2: Sun Tracking System Using Micro Controller

similar to this method however sensors are used to determine the current

position of the radiation source

Currently there are a number of variations on each of these methods

The research undertaken in this thesis is directed towards the design of a

dynamic tracking system The dynamic tracking system was chosen because

it proposed the most accurate method of maintaining maximum power

collection possible

13 DEFINITION OF PROJECT

The objective of this thesis is to design a Sun Tracking Solar Array

System The concise definition of this system is as follows A

microcontrolled solar array that actively tracks the sun so that maximum

power is received by the array at all times This is achieved by using sensors

to locate the suns position at any instance and aligning the array using the

microcontroller so that all incident rays are normal to the array surface

14 SCOPE OF PROJECT

The scope of this project only encompasses the design of the

tracking system There has been no formal consideration of optimizing

power used by the tracking device or the affect of heat on the performance

of the array

2

15 PROJECT OVERVIEW

The remaining chapters detail the research design and analysis

performed during the course of the thesis project

Chapter 2 discusses theory associated with solar cell technology and the

optimizing of power received by an array This incorporates a review of

relevant literature and current designs in the field of sun tracking

Chapter 3 explains the methodology used while forming a solution to the

problem and the design considerations undertaken in this process

Chapter 4 gives an analysis of the design and data obtained during testing

Chapter 5 concludes the report by discussing the effectiveness of the

tracking system and possible applications This chapter also suggests some

further research areas and future design proposals

3

CHAPTER 2

BACKGROUND THEORY

21 INTRODUCTION

Before beginning the design of the tracking system it was

necessary to obtain some background information on solar cells and methods

of energy collection It was equally important to research the various

tracking systems available To obtain this information a study of relevant

literature was conducted This study involved a review of solar cell theory

an investigation into the sources of loss in solar systems and an examination

of current tracking methods

22 SOLAR CELL THEORY

Nuclear fusion reactions on the suns surface supply earth with solar

energy This energy is primarily released in the form of electromagnetic

radiation in the ultraviolet infrared and radio spectral regions (wavelengths

from 02 to3microm)Presently the most efficient means of harnessing this

power source is the solar cell which converts solar radiation directly into

electricity Solar cells are fabricated from various semiconductor materials

using numerous device configurations and selecting single-crystal

polycrystal and amorphous thin-film structures To following theory

considers the silicon p-n junction cell because it acts as

1Reference device for all solar cells

2The solar cell has a single energy bandgap

4

When the cell is exposed to the solar spectrum a photon with

energy less than Eg makes no contribution to the cell output A photon with

energy greater than Eg contributes an energy Eg to the cell output and the

remaining energy is wasted as heat The idealized equivalent circuit of the

cell is shown in Figure 1(b) where a constant-current source is in parallel

with the junction The source IL results from the excitation of excess carriers

by solar radiation Rs is the diode saturation current and RL is the load

resistance

(b) Figure 1 (a) Energy-band diagram of a silicon p-n junction solar

cell under solar irradiation (b) Idealised equivalent circuit of a solar cell

5

A typical schematic representation of a solar cell is shown in Figure 2 It

consists of a shallow p-n junction formed on the surface (eg by diffusion)

a front ohmic contactstripe and fingers a back ohmic contact that covers the

entire back surface and an antireflection coating on the front surface

6

23 CONVERTING PHOTONS TO ELECTRONS

The solar cells that you see on calculators and satellites are

photovoltaic cells or modules (modules are simply a group of cells

electrically connected and packaged in one frame) Photovoltaics as the

word implies (photo = light voltaic = electricity) convert sunlight directly

into electricity Once used almost exclusively in space photovoltaics are

used more and more in less exotic ways

They could even power your house How do these devices work

Photovoltaic (PV) cells are made of special materials called semiconductors

such as silicon which is currently the most commonly used Basically when

light strikes the cell a certain portion of it is absorbed within the

semiconductor material This means that the energy of the absorbed light is

transferred to the semiconductor The energy knocks electrons loose

allowing them to flow freely

PV cells also all have one or more electric fields that act to force

electrons freed by light absorption to flow in a certain direction This flow of

electrons is a current and by placing metal contacts on the top and bottom of

the PV cell we can draw that current off to use externally For example the

current can power a calculator This current together with the cells voltage

(which is a result of its built-in electric field or fields) defines the power (or

wattage) that the solar cell can produce Thats the basic process but theres

really much more to it Lets take a deeper look into one example of a PV

cell the single crystal silicon cell

7

24 WHEN LIGHT HITS THE CELL

When light in the form of photons hits our solar cell its energy frees

electron-hole pairs Each photon with enough energy will normally free

exactly one electron and result in a free hole as The effect of the electric

field in a PV cell If this happens close enough to the electric field or if free

electron and free hole happen to wander into its range of influence the field

will send the electron to the N side and the hole to the P side

This causes further disruption of electrical neutrality and if we

provide an external current path electrons will flow through the path to their

original side (the P side) to unite with holes that the electric field sent there

doing work for us along the way The electron flow provides the current and

the cells electric field causes a voltage With both current and voltage we

have power which is the product of the two How much sunlight energy

does our PV cell absorb Unfortunately the most that our simple cell could

absorb is around 25 percent and more likely is 15 percent or less

25 ENERGY LOSS

Solar cell absorbs only about 15 percents of the sunlights energy

Visible light is only part of the electromagnetic spectrum Electromagnetic

radiation is not monochromatic -- it is made up of a range of different

wavelengths and therefore energy levels (See How Special Relativity

Works for a good discussion of the electromagnetic spectrum) Light can be

separated into different wavelengths and we can see them in the form of a

rainbow Since the light that hits our cell has photons of a wide range of

energies it turns out that some of them wont have enough energy to form an

electron-hole pair

8

Theyll simply pass through the cell as if it were transparent Still

other photons have too much energy Only a certain amount of energy

measured in electron volts (eV) and defined by our cell material (about 11

eV for crystalline silicon) is required to knock an electron loose We call

this the band gap energy of a material

If a photon has more energy than the required amount then the extra

energy is lost (unless a photon has twice the required energy and can create

more than one electron-hole pair but this effect is not significant) These

two effects alone account for the loss of around 70 percent of the radiation

energy incident on our cell Our band gap also determines the strength

(voltage) of our electric field and if its too low then what we make up in

extra current (by absorbing more photons) we lose by having a small

voltage Remember that power is voltage times current

The optimal band gap balancing these two effects is around 14 eV

for a cell made from a single material We have other losses as well Our

electrons have to flow from one side of the cell to the other through an

external circuit We can cover the bottom with a metal allowing for good

conduction but if we completely cover the top then photons cant get

through the opaque conductor and we lose all of our current (in some cells

transparent conductors are used on the top surface but not in all) If we put

our contacts only at the sides of our cell then the electrons have to travel an

extremely long distance

9

26 OPERATION OF A PV CELL

Silicon is a semiconductor -- its not nearly as good as a metal for

transporting current Its internal resistance (called series resistance) is fairly

high and high resistance means high losses To minimize these losses our

cell is covered by a metallic contact grid that shortens the distance that

electrons have to travel while covering only a small part of the cell surface

Even so some photons are blocked by the grid which cant be too small or

else its own resistance will be too high

27 MAXIMIZING POWER OBTAINED FROM SOLAR CELLS

Through experiments conducted during research it was concluded

that the current obtained from solar cells is influenced by the angle at which

incident rays strike the cell surface By using a stationary light source and

adjusting the angle at which the light rays strike the cell a plot of current

delivered vs angle of incidence can be created This property of solar cells is

confirmed by the data contained in Table 1 and illustrated by figure(3)

Table 1 current delivered for various incidence

10

After considering the experimental data obtained it can be stated that

to maintain maximum power output from a solar array the angle of

incidence must be held at zero degrees Hence the array must constantly face

the sun This requires a tracking system that can continuously align the array

into the desired position

11

28 SOLAR CELL TESTING PRINCIPLE

Measurement of solar cells and solar irradiance measurements are

closely linked Solar radiation on the ground is changing all the time this

change is not only reflected in the total irradiance but also its intrinsic

details of the spectral irradiance are also constantly changes this has brought

about the first solar cell measurements have been very great difficulties As

the solar cell is a spectrum selective components and its optical sensitivity

of the distribution of the solar spectrum changes with changes in the same

total irradiance and spectral irradiance of different light sources the solar

cells electrical properties of the output will be quite different

In order to achieve the unity of solar cell measurement value the

International Electro technical Commission first standard solar spectral

irradiation has been stipulated All the ground with solar standard conditions

of measurement is used AM15 standard solar spectral distribution the

spectral distribution of the data from specific meteorological conditions

atmospheric absorption of solar spectral distribution under the condition of

the measured values

The main technical parameters of solar cells is the spectral response of

solar cells short-circuit current and open circuit voltage and photoelectric

conversion efficiency of solar cells As a solar cell measuring the project

usually carried out the following two aspects of the test - the standard solar

cells under the conditions of the solar spectrum in the standard short-circuit

current in the solar simulator calibration and measurement of solar cells

under the V - A characteristics measurements

12

Calculate the standard solar spectrum under the condition of the

photoelectric conversion efficiency of solar cells Unable to get with the

standard AM15 solar spectral distribution consistent with artificial light so

can not directly measure the solar cells under the conditions of solar

radiation in the standard short-circuit current

The solar cell measurement laboratories usually a very complicated

method to achieve the standard AM15 solar spectrum solar cells under

short-circuit current measurements and traceability to the international

benchmark measure light irradiation this process is known as solar

calibration

IV characteristics of solar cell measurement method is to first use of

solar cells with the measured spectral response similar to the standard solar

cell to set the sun simulator under standard test conditions of irradiance and

then measured in the sun simulator under test solar cells IV characteristic

curve as measured with the standard solar cell solar cell spectral response

similar to so this alternative measurement method can overcome the out due

to the spectral distribution of solar simulator

281 CHINArsquoS SOLAR CELL TECHNOLOGY DEVELOPMENT

TEST

The seventies of last century Tianjin Institute in solar power research

and development applications at the same time invested considerable human

and material resources the establishment of a solar cell measuring

laboratory began solar cell calibration and testing of technology research

13

The main testing equipment including domestic and imported A-

grade solar simulator for the measurement of electrical properties and the

development of phase-locked amplification technology based on solar

spectral response measurement system

The initial goal was to establish an accurate solar as a standard

industry-wide baseline measurement of solar cells In the meantime a

variety of solar cell calibration technique has been fully developed mainly

including mountain calibration ground spectral calibration spectral

calibration laboratories aircraft calibration calibration of the space shuttle

and many other calibration techniques have been developed and tried and

eventually the formation of Tianjin Institute of the standard solar power

system and Tianjin Institute of the standard solar power in mainland China

has been widely promoted and applied

The early eighties Chinas solar cell testing technology has gradually

matured As an emerging industry the importance of products measurement

of the standardization work so organized industry-wide testing experts has

established a national solar photovoltaic energy systems Standardization

Committee specializing in solar cell measuring testing and product quality

standards of the drafting of and development work The initial goal is to

achieve the solar value products industry-wide unity has formulated the

solar cell calibration method general norms mono crystalline silicon

solar cells space-solar temperature coefficient measurement method

single crystal general norms of silicon solar cells on the ground with the

solar components of the environment experimental methods on the

ground with standard solar cells space with standard solar cells

14

282 CHINArsquoS SOLAR CELL TECHNOLOGY INTERNATIONAL

ADVANCED LEVEL TEST

The early nineties the state investment fund special transformation

transformation of Tianjin Institute of solar power testing laboratory to

establish a set of a standard solar cell measuring device Include the

laboratory a standard solar cell calibration system and two standard solar

value transfer systems greatly improves the level of the labs solar cell

testing and capacity On this basis the establishment of a Ministry of

Information Industry E-205 metering stations specializing in solar testing

Dell LATITUDE D410 Battery for the Chinese solar industry to provide

accurate

Value of solar cells is also a unity in the world to be a difficult

problem To this end the international advanced solar testing laboratory

trying to achieve through international comparison of the solar value unity

throughout the world The most famous and most successful of an

international alignment is PEP `93 solar cells compared to international

standards it is the US Department of Energy project By the United States

Renewable Energy Laboratory led 10 countries around the world have 13

well-known solar testing laboratories to participate

Each laboratory provides two standard solar cell calibration data is not

standard sample all 23 standard solar cell through a variety of laboratory

calibration back to back to form after the international solar cell base WPVS

(world photovoltaic scale) Tianjin Power Research Institute (MII 205

metering stations) participated in this sub-standard solar activities in the

international comparison

15

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 3: Sun Tracking System Using Micro Controller

15 PROJECT OVERVIEW

The remaining chapters detail the research design and analysis

performed during the course of the thesis project

Chapter 2 discusses theory associated with solar cell technology and the

optimizing of power received by an array This incorporates a review of

relevant literature and current designs in the field of sun tracking

Chapter 3 explains the methodology used while forming a solution to the

problem and the design considerations undertaken in this process

Chapter 4 gives an analysis of the design and data obtained during testing

Chapter 5 concludes the report by discussing the effectiveness of the

tracking system and possible applications This chapter also suggests some

further research areas and future design proposals

3

CHAPTER 2

BACKGROUND THEORY

21 INTRODUCTION

Before beginning the design of the tracking system it was

necessary to obtain some background information on solar cells and methods

of energy collection It was equally important to research the various

tracking systems available To obtain this information a study of relevant

literature was conducted This study involved a review of solar cell theory

an investigation into the sources of loss in solar systems and an examination

of current tracking methods

22 SOLAR CELL THEORY

Nuclear fusion reactions on the suns surface supply earth with solar

energy This energy is primarily released in the form of electromagnetic

radiation in the ultraviolet infrared and radio spectral regions (wavelengths

from 02 to3microm)Presently the most efficient means of harnessing this

power source is the solar cell which converts solar radiation directly into

electricity Solar cells are fabricated from various semiconductor materials

using numerous device configurations and selecting single-crystal

polycrystal and amorphous thin-film structures To following theory

considers the silicon p-n junction cell because it acts as

1Reference device for all solar cells

2The solar cell has a single energy bandgap

4

When the cell is exposed to the solar spectrum a photon with

energy less than Eg makes no contribution to the cell output A photon with

energy greater than Eg contributes an energy Eg to the cell output and the

remaining energy is wasted as heat The idealized equivalent circuit of the

cell is shown in Figure 1(b) where a constant-current source is in parallel

with the junction The source IL results from the excitation of excess carriers

by solar radiation Rs is the diode saturation current and RL is the load

resistance

(b) Figure 1 (a) Energy-band diagram of a silicon p-n junction solar

cell under solar irradiation (b) Idealised equivalent circuit of a solar cell

5

A typical schematic representation of a solar cell is shown in Figure 2 It

consists of a shallow p-n junction formed on the surface (eg by diffusion)

a front ohmic contactstripe and fingers a back ohmic contact that covers the

entire back surface and an antireflection coating on the front surface

6

23 CONVERTING PHOTONS TO ELECTRONS

The solar cells that you see on calculators and satellites are

photovoltaic cells or modules (modules are simply a group of cells

electrically connected and packaged in one frame) Photovoltaics as the

word implies (photo = light voltaic = electricity) convert sunlight directly

into electricity Once used almost exclusively in space photovoltaics are

used more and more in less exotic ways

They could even power your house How do these devices work

Photovoltaic (PV) cells are made of special materials called semiconductors

such as silicon which is currently the most commonly used Basically when

light strikes the cell a certain portion of it is absorbed within the

semiconductor material This means that the energy of the absorbed light is

transferred to the semiconductor The energy knocks electrons loose

allowing them to flow freely

PV cells also all have one or more electric fields that act to force

electrons freed by light absorption to flow in a certain direction This flow of

electrons is a current and by placing metal contacts on the top and bottom of

the PV cell we can draw that current off to use externally For example the

current can power a calculator This current together with the cells voltage

(which is a result of its built-in electric field or fields) defines the power (or

wattage) that the solar cell can produce Thats the basic process but theres

really much more to it Lets take a deeper look into one example of a PV

cell the single crystal silicon cell

7

24 WHEN LIGHT HITS THE CELL

When light in the form of photons hits our solar cell its energy frees

electron-hole pairs Each photon with enough energy will normally free

exactly one electron and result in a free hole as The effect of the electric

field in a PV cell If this happens close enough to the electric field or if free

electron and free hole happen to wander into its range of influence the field

will send the electron to the N side and the hole to the P side

This causes further disruption of electrical neutrality and if we

provide an external current path electrons will flow through the path to their

original side (the P side) to unite with holes that the electric field sent there

doing work for us along the way The electron flow provides the current and

the cells electric field causes a voltage With both current and voltage we

have power which is the product of the two How much sunlight energy

does our PV cell absorb Unfortunately the most that our simple cell could

absorb is around 25 percent and more likely is 15 percent or less

25 ENERGY LOSS

Solar cell absorbs only about 15 percents of the sunlights energy

Visible light is only part of the electromagnetic spectrum Electromagnetic

radiation is not monochromatic -- it is made up of a range of different

wavelengths and therefore energy levels (See How Special Relativity

Works for a good discussion of the electromagnetic spectrum) Light can be

separated into different wavelengths and we can see them in the form of a

rainbow Since the light that hits our cell has photons of a wide range of

energies it turns out that some of them wont have enough energy to form an

electron-hole pair

8

Theyll simply pass through the cell as if it were transparent Still

other photons have too much energy Only a certain amount of energy

measured in electron volts (eV) and defined by our cell material (about 11

eV for crystalline silicon) is required to knock an electron loose We call

this the band gap energy of a material

If a photon has more energy than the required amount then the extra

energy is lost (unless a photon has twice the required energy and can create

more than one electron-hole pair but this effect is not significant) These

two effects alone account for the loss of around 70 percent of the radiation

energy incident on our cell Our band gap also determines the strength

(voltage) of our electric field and if its too low then what we make up in

extra current (by absorbing more photons) we lose by having a small

voltage Remember that power is voltage times current

The optimal band gap balancing these two effects is around 14 eV

for a cell made from a single material We have other losses as well Our

electrons have to flow from one side of the cell to the other through an

external circuit We can cover the bottom with a metal allowing for good

conduction but if we completely cover the top then photons cant get

through the opaque conductor and we lose all of our current (in some cells

transparent conductors are used on the top surface but not in all) If we put

our contacts only at the sides of our cell then the electrons have to travel an

extremely long distance

9

26 OPERATION OF A PV CELL

Silicon is a semiconductor -- its not nearly as good as a metal for

transporting current Its internal resistance (called series resistance) is fairly

high and high resistance means high losses To minimize these losses our

cell is covered by a metallic contact grid that shortens the distance that

electrons have to travel while covering only a small part of the cell surface

Even so some photons are blocked by the grid which cant be too small or

else its own resistance will be too high

27 MAXIMIZING POWER OBTAINED FROM SOLAR CELLS

Through experiments conducted during research it was concluded

that the current obtained from solar cells is influenced by the angle at which

incident rays strike the cell surface By using a stationary light source and

adjusting the angle at which the light rays strike the cell a plot of current

delivered vs angle of incidence can be created This property of solar cells is

confirmed by the data contained in Table 1 and illustrated by figure(3)

Table 1 current delivered for various incidence

10

After considering the experimental data obtained it can be stated that

to maintain maximum power output from a solar array the angle of

incidence must be held at zero degrees Hence the array must constantly face

the sun This requires a tracking system that can continuously align the array

into the desired position

11

28 SOLAR CELL TESTING PRINCIPLE

Measurement of solar cells and solar irradiance measurements are

closely linked Solar radiation on the ground is changing all the time this

change is not only reflected in the total irradiance but also its intrinsic

details of the spectral irradiance are also constantly changes this has brought

about the first solar cell measurements have been very great difficulties As

the solar cell is a spectrum selective components and its optical sensitivity

of the distribution of the solar spectrum changes with changes in the same

total irradiance and spectral irradiance of different light sources the solar

cells electrical properties of the output will be quite different

In order to achieve the unity of solar cell measurement value the

International Electro technical Commission first standard solar spectral

irradiation has been stipulated All the ground with solar standard conditions

of measurement is used AM15 standard solar spectral distribution the

spectral distribution of the data from specific meteorological conditions

atmospheric absorption of solar spectral distribution under the condition of

the measured values

The main technical parameters of solar cells is the spectral response of

solar cells short-circuit current and open circuit voltage and photoelectric

conversion efficiency of solar cells As a solar cell measuring the project

usually carried out the following two aspects of the test - the standard solar

cells under the conditions of the solar spectrum in the standard short-circuit

current in the solar simulator calibration and measurement of solar cells

under the V - A characteristics measurements

12

Calculate the standard solar spectrum under the condition of the

photoelectric conversion efficiency of solar cells Unable to get with the

standard AM15 solar spectral distribution consistent with artificial light so

can not directly measure the solar cells under the conditions of solar

radiation in the standard short-circuit current

The solar cell measurement laboratories usually a very complicated

method to achieve the standard AM15 solar spectrum solar cells under

short-circuit current measurements and traceability to the international

benchmark measure light irradiation this process is known as solar

calibration

IV characteristics of solar cell measurement method is to first use of

solar cells with the measured spectral response similar to the standard solar

cell to set the sun simulator under standard test conditions of irradiance and

then measured in the sun simulator under test solar cells IV characteristic

curve as measured with the standard solar cell solar cell spectral response

similar to so this alternative measurement method can overcome the out due

to the spectral distribution of solar simulator

281 CHINArsquoS SOLAR CELL TECHNOLOGY DEVELOPMENT

TEST

The seventies of last century Tianjin Institute in solar power research

and development applications at the same time invested considerable human

and material resources the establishment of a solar cell measuring

laboratory began solar cell calibration and testing of technology research

13

The main testing equipment including domestic and imported A-

grade solar simulator for the measurement of electrical properties and the

development of phase-locked amplification technology based on solar

spectral response measurement system

The initial goal was to establish an accurate solar as a standard

industry-wide baseline measurement of solar cells In the meantime a

variety of solar cell calibration technique has been fully developed mainly

including mountain calibration ground spectral calibration spectral

calibration laboratories aircraft calibration calibration of the space shuttle

and many other calibration techniques have been developed and tried and

eventually the formation of Tianjin Institute of the standard solar power

system and Tianjin Institute of the standard solar power in mainland China

has been widely promoted and applied

The early eighties Chinas solar cell testing technology has gradually

matured As an emerging industry the importance of products measurement

of the standardization work so organized industry-wide testing experts has

established a national solar photovoltaic energy systems Standardization

Committee specializing in solar cell measuring testing and product quality

standards of the drafting of and development work The initial goal is to

achieve the solar value products industry-wide unity has formulated the

solar cell calibration method general norms mono crystalline silicon

solar cells space-solar temperature coefficient measurement method

single crystal general norms of silicon solar cells on the ground with the

solar components of the environment experimental methods on the

ground with standard solar cells space with standard solar cells

14

282 CHINArsquoS SOLAR CELL TECHNOLOGY INTERNATIONAL

ADVANCED LEVEL TEST

The early nineties the state investment fund special transformation

transformation of Tianjin Institute of solar power testing laboratory to

establish a set of a standard solar cell measuring device Include the

laboratory a standard solar cell calibration system and two standard solar

value transfer systems greatly improves the level of the labs solar cell

testing and capacity On this basis the establishment of a Ministry of

Information Industry E-205 metering stations specializing in solar testing

Dell LATITUDE D410 Battery for the Chinese solar industry to provide

accurate

Value of solar cells is also a unity in the world to be a difficult

problem To this end the international advanced solar testing laboratory

trying to achieve through international comparison of the solar value unity

throughout the world The most famous and most successful of an

international alignment is PEP `93 solar cells compared to international

standards it is the US Department of Energy project By the United States

Renewable Energy Laboratory led 10 countries around the world have 13

well-known solar testing laboratories to participate

Each laboratory provides two standard solar cell calibration data is not

standard sample all 23 standard solar cell through a variety of laboratory

calibration back to back to form after the international solar cell base WPVS

(world photovoltaic scale) Tianjin Power Research Institute (MII 205

metering stations) participated in this sub-standard solar activities in the

international comparison

15

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 4: Sun Tracking System Using Micro Controller

CHAPTER 2

BACKGROUND THEORY

21 INTRODUCTION

Before beginning the design of the tracking system it was

necessary to obtain some background information on solar cells and methods

of energy collection It was equally important to research the various

tracking systems available To obtain this information a study of relevant

literature was conducted This study involved a review of solar cell theory

an investigation into the sources of loss in solar systems and an examination

of current tracking methods

22 SOLAR CELL THEORY

Nuclear fusion reactions on the suns surface supply earth with solar

energy This energy is primarily released in the form of electromagnetic

radiation in the ultraviolet infrared and radio spectral regions (wavelengths

from 02 to3microm)Presently the most efficient means of harnessing this

power source is the solar cell which converts solar radiation directly into

electricity Solar cells are fabricated from various semiconductor materials

using numerous device configurations and selecting single-crystal

polycrystal and amorphous thin-film structures To following theory

considers the silicon p-n junction cell because it acts as

1Reference device for all solar cells

2The solar cell has a single energy bandgap

4

When the cell is exposed to the solar spectrum a photon with

energy less than Eg makes no contribution to the cell output A photon with

energy greater than Eg contributes an energy Eg to the cell output and the

remaining energy is wasted as heat The idealized equivalent circuit of the

cell is shown in Figure 1(b) where a constant-current source is in parallel

with the junction The source IL results from the excitation of excess carriers

by solar radiation Rs is the diode saturation current and RL is the load

resistance

(b) Figure 1 (a) Energy-band diagram of a silicon p-n junction solar

cell under solar irradiation (b) Idealised equivalent circuit of a solar cell

5

A typical schematic representation of a solar cell is shown in Figure 2 It

consists of a shallow p-n junction formed on the surface (eg by diffusion)

a front ohmic contactstripe and fingers a back ohmic contact that covers the

entire back surface and an antireflection coating on the front surface

6

23 CONVERTING PHOTONS TO ELECTRONS

The solar cells that you see on calculators and satellites are

photovoltaic cells or modules (modules are simply a group of cells

electrically connected and packaged in one frame) Photovoltaics as the

word implies (photo = light voltaic = electricity) convert sunlight directly

into electricity Once used almost exclusively in space photovoltaics are

used more and more in less exotic ways

They could even power your house How do these devices work

Photovoltaic (PV) cells are made of special materials called semiconductors

such as silicon which is currently the most commonly used Basically when

light strikes the cell a certain portion of it is absorbed within the

semiconductor material This means that the energy of the absorbed light is

transferred to the semiconductor The energy knocks electrons loose

allowing them to flow freely

PV cells also all have one or more electric fields that act to force

electrons freed by light absorption to flow in a certain direction This flow of

electrons is a current and by placing metal contacts on the top and bottom of

the PV cell we can draw that current off to use externally For example the

current can power a calculator This current together with the cells voltage

(which is a result of its built-in electric field or fields) defines the power (or

wattage) that the solar cell can produce Thats the basic process but theres

really much more to it Lets take a deeper look into one example of a PV

cell the single crystal silicon cell

7

24 WHEN LIGHT HITS THE CELL

When light in the form of photons hits our solar cell its energy frees

electron-hole pairs Each photon with enough energy will normally free

exactly one electron and result in a free hole as The effect of the electric

field in a PV cell If this happens close enough to the electric field or if free

electron and free hole happen to wander into its range of influence the field

will send the electron to the N side and the hole to the P side

This causes further disruption of electrical neutrality and if we

provide an external current path electrons will flow through the path to their

original side (the P side) to unite with holes that the electric field sent there

doing work for us along the way The electron flow provides the current and

the cells electric field causes a voltage With both current and voltage we

have power which is the product of the two How much sunlight energy

does our PV cell absorb Unfortunately the most that our simple cell could

absorb is around 25 percent and more likely is 15 percent or less

25 ENERGY LOSS

Solar cell absorbs only about 15 percents of the sunlights energy

Visible light is only part of the electromagnetic spectrum Electromagnetic

radiation is not monochromatic -- it is made up of a range of different

wavelengths and therefore energy levels (See How Special Relativity

Works for a good discussion of the electromagnetic spectrum) Light can be

separated into different wavelengths and we can see them in the form of a

rainbow Since the light that hits our cell has photons of a wide range of

energies it turns out that some of them wont have enough energy to form an

electron-hole pair

8

Theyll simply pass through the cell as if it were transparent Still

other photons have too much energy Only a certain amount of energy

measured in electron volts (eV) and defined by our cell material (about 11

eV for crystalline silicon) is required to knock an electron loose We call

this the band gap energy of a material

If a photon has more energy than the required amount then the extra

energy is lost (unless a photon has twice the required energy and can create

more than one electron-hole pair but this effect is not significant) These

two effects alone account for the loss of around 70 percent of the radiation

energy incident on our cell Our band gap also determines the strength

(voltage) of our electric field and if its too low then what we make up in

extra current (by absorbing more photons) we lose by having a small

voltage Remember that power is voltage times current

The optimal band gap balancing these two effects is around 14 eV

for a cell made from a single material We have other losses as well Our

electrons have to flow from one side of the cell to the other through an

external circuit We can cover the bottom with a metal allowing for good

conduction but if we completely cover the top then photons cant get

through the opaque conductor and we lose all of our current (in some cells

transparent conductors are used on the top surface but not in all) If we put

our contacts only at the sides of our cell then the electrons have to travel an

extremely long distance

9

26 OPERATION OF A PV CELL

Silicon is a semiconductor -- its not nearly as good as a metal for

transporting current Its internal resistance (called series resistance) is fairly

high and high resistance means high losses To minimize these losses our

cell is covered by a metallic contact grid that shortens the distance that

electrons have to travel while covering only a small part of the cell surface

Even so some photons are blocked by the grid which cant be too small or

else its own resistance will be too high

27 MAXIMIZING POWER OBTAINED FROM SOLAR CELLS

Through experiments conducted during research it was concluded

that the current obtained from solar cells is influenced by the angle at which

incident rays strike the cell surface By using a stationary light source and

adjusting the angle at which the light rays strike the cell a plot of current

delivered vs angle of incidence can be created This property of solar cells is

confirmed by the data contained in Table 1 and illustrated by figure(3)

Table 1 current delivered for various incidence

10

After considering the experimental data obtained it can be stated that

to maintain maximum power output from a solar array the angle of

incidence must be held at zero degrees Hence the array must constantly face

the sun This requires a tracking system that can continuously align the array

into the desired position

11

28 SOLAR CELL TESTING PRINCIPLE

Measurement of solar cells and solar irradiance measurements are

closely linked Solar radiation on the ground is changing all the time this

change is not only reflected in the total irradiance but also its intrinsic

details of the spectral irradiance are also constantly changes this has brought

about the first solar cell measurements have been very great difficulties As

the solar cell is a spectrum selective components and its optical sensitivity

of the distribution of the solar spectrum changes with changes in the same

total irradiance and spectral irradiance of different light sources the solar

cells electrical properties of the output will be quite different

In order to achieve the unity of solar cell measurement value the

International Electro technical Commission first standard solar spectral

irradiation has been stipulated All the ground with solar standard conditions

of measurement is used AM15 standard solar spectral distribution the

spectral distribution of the data from specific meteorological conditions

atmospheric absorption of solar spectral distribution under the condition of

the measured values

The main technical parameters of solar cells is the spectral response of

solar cells short-circuit current and open circuit voltage and photoelectric

conversion efficiency of solar cells As a solar cell measuring the project

usually carried out the following two aspects of the test - the standard solar

cells under the conditions of the solar spectrum in the standard short-circuit

current in the solar simulator calibration and measurement of solar cells

under the V - A characteristics measurements

12

Calculate the standard solar spectrum under the condition of the

photoelectric conversion efficiency of solar cells Unable to get with the

standard AM15 solar spectral distribution consistent with artificial light so

can not directly measure the solar cells under the conditions of solar

radiation in the standard short-circuit current

The solar cell measurement laboratories usually a very complicated

method to achieve the standard AM15 solar spectrum solar cells under

short-circuit current measurements and traceability to the international

benchmark measure light irradiation this process is known as solar

calibration

IV characteristics of solar cell measurement method is to first use of

solar cells with the measured spectral response similar to the standard solar

cell to set the sun simulator under standard test conditions of irradiance and

then measured in the sun simulator under test solar cells IV characteristic

curve as measured with the standard solar cell solar cell spectral response

similar to so this alternative measurement method can overcome the out due

to the spectral distribution of solar simulator

281 CHINArsquoS SOLAR CELL TECHNOLOGY DEVELOPMENT

TEST

The seventies of last century Tianjin Institute in solar power research

and development applications at the same time invested considerable human

and material resources the establishment of a solar cell measuring

laboratory began solar cell calibration and testing of technology research

13

The main testing equipment including domestic and imported A-

grade solar simulator for the measurement of electrical properties and the

development of phase-locked amplification technology based on solar

spectral response measurement system

The initial goal was to establish an accurate solar as a standard

industry-wide baseline measurement of solar cells In the meantime a

variety of solar cell calibration technique has been fully developed mainly

including mountain calibration ground spectral calibration spectral

calibration laboratories aircraft calibration calibration of the space shuttle

and many other calibration techniques have been developed and tried and

eventually the formation of Tianjin Institute of the standard solar power

system and Tianjin Institute of the standard solar power in mainland China

has been widely promoted and applied

The early eighties Chinas solar cell testing technology has gradually

matured As an emerging industry the importance of products measurement

of the standardization work so organized industry-wide testing experts has

established a national solar photovoltaic energy systems Standardization

Committee specializing in solar cell measuring testing and product quality

standards of the drafting of and development work The initial goal is to

achieve the solar value products industry-wide unity has formulated the

solar cell calibration method general norms mono crystalline silicon

solar cells space-solar temperature coefficient measurement method

single crystal general norms of silicon solar cells on the ground with the

solar components of the environment experimental methods on the

ground with standard solar cells space with standard solar cells

14

282 CHINArsquoS SOLAR CELL TECHNOLOGY INTERNATIONAL

ADVANCED LEVEL TEST

The early nineties the state investment fund special transformation

transformation of Tianjin Institute of solar power testing laboratory to

establish a set of a standard solar cell measuring device Include the

laboratory a standard solar cell calibration system and two standard solar

value transfer systems greatly improves the level of the labs solar cell

testing and capacity On this basis the establishment of a Ministry of

Information Industry E-205 metering stations specializing in solar testing

Dell LATITUDE D410 Battery for the Chinese solar industry to provide

accurate

Value of solar cells is also a unity in the world to be a difficult

problem To this end the international advanced solar testing laboratory

trying to achieve through international comparison of the solar value unity

throughout the world The most famous and most successful of an

international alignment is PEP `93 solar cells compared to international

standards it is the US Department of Energy project By the United States

Renewable Energy Laboratory led 10 countries around the world have 13

well-known solar testing laboratories to participate

Each laboratory provides two standard solar cell calibration data is not

standard sample all 23 standard solar cell through a variety of laboratory

calibration back to back to form after the international solar cell base WPVS

(world photovoltaic scale) Tianjin Power Research Institute (MII 205

metering stations) participated in this sub-standard solar activities in the

international comparison

15

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 5: Sun Tracking System Using Micro Controller

When the cell is exposed to the solar spectrum a photon with

energy less than Eg makes no contribution to the cell output A photon with

energy greater than Eg contributes an energy Eg to the cell output and the

remaining energy is wasted as heat The idealized equivalent circuit of the

cell is shown in Figure 1(b) where a constant-current source is in parallel

with the junction The source IL results from the excitation of excess carriers

by solar radiation Rs is the diode saturation current and RL is the load

resistance

(b) Figure 1 (a) Energy-band diagram of a silicon p-n junction solar

cell under solar irradiation (b) Idealised equivalent circuit of a solar cell

5

A typical schematic representation of a solar cell is shown in Figure 2 It

consists of a shallow p-n junction formed on the surface (eg by diffusion)

a front ohmic contactstripe and fingers a back ohmic contact that covers the

entire back surface and an antireflection coating on the front surface

6

23 CONVERTING PHOTONS TO ELECTRONS

The solar cells that you see on calculators and satellites are

photovoltaic cells or modules (modules are simply a group of cells

electrically connected and packaged in one frame) Photovoltaics as the

word implies (photo = light voltaic = electricity) convert sunlight directly

into electricity Once used almost exclusively in space photovoltaics are

used more and more in less exotic ways

They could even power your house How do these devices work

Photovoltaic (PV) cells are made of special materials called semiconductors

such as silicon which is currently the most commonly used Basically when

light strikes the cell a certain portion of it is absorbed within the

semiconductor material This means that the energy of the absorbed light is

transferred to the semiconductor The energy knocks electrons loose

allowing them to flow freely

PV cells also all have one or more electric fields that act to force

electrons freed by light absorption to flow in a certain direction This flow of

electrons is a current and by placing metal contacts on the top and bottom of

the PV cell we can draw that current off to use externally For example the

current can power a calculator This current together with the cells voltage

(which is a result of its built-in electric field or fields) defines the power (or

wattage) that the solar cell can produce Thats the basic process but theres

really much more to it Lets take a deeper look into one example of a PV

cell the single crystal silicon cell

7

24 WHEN LIGHT HITS THE CELL

When light in the form of photons hits our solar cell its energy frees

electron-hole pairs Each photon with enough energy will normally free

exactly one electron and result in a free hole as The effect of the electric

field in a PV cell If this happens close enough to the electric field or if free

electron and free hole happen to wander into its range of influence the field

will send the electron to the N side and the hole to the P side

This causes further disruption of electrical neutrality and if we

provide an external current path electrons will flow through the path to their

original side (the P side) to unite with holes that the electric field sent there

doing work for us along the way The electron flow provides the current and

the cells electric field causes a voltage With both current and voltage we

have power which is the product of the two How much sunlight energy

does our PV cell absorb Unfortunately the most that our simple cell could

absorb is around 25 percent and more likely is 15 percent or less

25 ENERGY LOSS

Solar cell absorbs only about 15 percents of the sunlights energy

Visible light is only part of the electromagnetic spectrum Electromagnetic

radiation is not monochromatic -- it is made up of a range of different

wavelengths and therefore energy levels (See How Special Relativity

Works for a good discussion of the electromagnetic spectrum) Light can be

separated into different wavelengths and we can see them in the form of a

rainbow Since the light that hits our cell has photons of a wide range of

energies it turns out that some of them wont have enough energy to form an

electron-hole pair

8

Theyll simply pass through the cell as if it were transparent Still

other photons have too much energy Only a certain amount of energy

measured in electron volts (eV) and defined by our cell material (about 11

eV for crystalline silicon) is required to knock an electron loose We call

this the band gap energy of a material

If a photon has more energy than the required amount then the extra

energy is lost (unless a photon has twice the required energy and can create

more than one electron-hole pair but this effect is not significant) These

two effects alone account for the loss of around 70 percent of the radiation

energy incident on our cell Our band gap also determines the strength

(voltage) of our electric field and if its too low then what we make up in

extra current (by absorbing more photons) we lose by having a small

voltage Remember that power is voltage times current

The optimal band gap balancing these two effects is around 14 eV

for a cell made from a single material We have other losses as well Our

electrons have to flow from one side of the cell to the other through an

external circuit We can cover the bottom with a metal allowing for good

conduction but if we completely cover the top then photons cant get

through the opaque conductor and we lose all of our current (in some cells

transparent conductors are used on the top surface but not in all) If we put

our contacts only at the sides of our cell then the electrons have to travel an

extremely long distance

9

26 OPERATION OF A PV CELL

Silicon is a semiconductor -- its not nearly as good as a metal for

transporting current Its internal resistance (called series resistance) is fairly

high and high resistance means high losses To minimize these losses our

cell is covered by a metallic contact grid that shortens the distance that

electrons have to travel while covering only a small part of the cell surface

Even so some photons are blocked by the grid which cant be too small or

else its own resistance will be too high

27 MAXIMIZING POWER OBTAINED FROM SOLAR CELLS

Through experiments conducted during research it was concluded

that the current obtained from solar cells is influenced by the angle at which

incident rays strike the cell surface By using a stationary light source and

adjusting the angle at which the light rays strike the cell a plot of current

delivered vs angle of incidence can be created This property of solar cells is

confirmed by the data contained in Table 1 and illustrated by figure(3)

Table 1 current delivered for various incidence

10

After considering the experimental data obtained it can be stated that

to maintain maximum power output from a solar array the angle of

incidence must be held at zero degrees Hence the array must constantly face

the sun This requires a tracking system that can continuously align the array

into the desired position

11

28 SOLAR CELL TESTING PRINCIPLE

Measurement of solar cells and solar irradiance measurements are

closely linked Solar radiation on the ground is changing all the time this

change is not only reflected in the total irradiance but also its intrinsic

details of the spectral irradiance are also constantly changes this has brought

about the first solar cell measurements have been very great difficulties As

the solar cell is a spectrum selective components and its optical sensitivity

of the distribution of the solar spectrum changes with changes in the same

total irradiance and spectral irradiance of different light sources the solar

cells electrical properties of the output will be quite different

In order to achieve the unity of solar cell measurement value the

International Electro technical Commission first standard solar spectral

irradiation has been stipulated All the ground with solar standard conditions

of measurement is used AM15 standard solar spectral distribution the

spectral distribution of the data from specific meteorological conditions

atmospheric absorption of solar spectral distribution under the condition of

the measured values

The main technical parameters of solar cells is the spectral response of

solar cells short-circuit current and open circuit voltage and photoelectric

conversion efficiency of solar cells As a solar cell measuring the project

usually carried out the following two aspects of the test - the standard solar

cells under the conditions of the solar spectrum in the standard short-circuit

current in the solar simulator calibration and measurement of solar cells

under the V - A characteristics measurements

12

Calculate the standard solar spectrum under the condition of the

photoelectric conversion efficiency of solar cells Unable to get with the

standard AM15 solar spectral distribution consistent with artificial light so

can not directly measure the solar cells under the conditions of solar

radiation in the standard short-circuit current

The solar cell measurement laboratories usually a very complicated

method to achieve the standard AM15 solar spectrum solar cells under

short-circuit current measurements and traceability to the international

benchmark measure light irradiation this process is known as solar

calibration

IV characteristics of solar cell measurement method is to first use of

solar cells with the measured spectral response similar to the standard solar

cell to set the sun simulator under standard test conditions of irradiance and

then measured in the sun simulator under test solar cells IV characteristic

curve as measured with the standard solar cell solar cell spectral response

similar to so this alternative measurement method can overcome the out due

to the spectral distribution of solar simulator

281 CHINArsquoS SOLAR CELL TECHNOLOGY DEVELOPMENT

TEST

The seventies of last century Tianjin Institute in solar power research

and development applications at the same time invested considerable human

and material resources the establishment of a solar cell measuring

laboratory began solar cell calibration and testing of technology research

13

The main testing equipment including domestic and imported A-

grade solar simulator for the measurement of electrical properties and the

development of phase-locked amplification technology based on solar

spectral response measurement system

The initial goal was to establish an accurate solar as a standard

industry-wide baseline measurement of solar cells In the meantime a

variety of solar cell calibration technique has been fully developed mainly

including mountain calibration ground spectral calibration spectral

calibration laboratories aircraft calibration calibration of the space shuttle

and many other calibration techniques have been developed and tried and

eventually the formation of Tianjin Institute of the standard solar power

system and Tianjin Institute of the standard solar power in mainland China

has been widely promoted and applied

The early eighties Chinas solar cell testing technology has gradually

matured As an emerging industry the importance of products measurement

of the standardization work so organized industry-wide testing experts has

established a national solar photovoltaic energy systems Standardization

Committee specializing in solar cell measuring testing and product quality

standards of the drafting of and development work The initial goal is to

achieve the solar value products industry-wide unity has formulated the

solar cell calibration method general norms mono crystalline silicon

solar cells space-solar temperature coefficient measurement method

single crystal general norms of silicon solar cells on the ground with the

solar components of the environment experimental methods on the

ground with standard solar cells space with standard solar cells

14

282 CHINArsquoS SOLAR CELL TECHNOLOGY INTERNATIONAL

ADVANCED LEVEL TEST

The early nineties the state investment fund special transformation

transformation of Tianjin Institute of solar power testing laboratory to

establish a set of a standard solar cell measuring device Include the

laboratory a standard solar cell calibration system and two standard solar

value transfer systems greatly improves the level of the labs solar cell

testing and capacity On this basis the establishment of a Ministry of

Information Industry E-205 metering stations specializing in solar testing

Dell LATITUDE D410 Battery for the Chinese solar industry to provide

accurate

Value of solar cells is also a unity in the world to be a difficult

problem To this end the international advanced solar testing laboratory

trying to achieve through international comparison of the solar value unity

throughout the world The most famous and most successful of an

international alignment is PEP `93 solar cells compared to international

standards it is the US Department of Energy project By the United States

Renewable Energy Laboratory led 10 countries around the world have 13

well-known solar testing laboratories to participate

Each laboratory provides two standard solar cell calibration data is not

standard sample all 23 standard solar cell through a variety of laboratory

calibration back to back to form after the international solar cell base WPVS

(world photovoltaic scale) Tianjin Power Research Institute (MII 205

metering stations) participated in this sub-standard solar activities in the

international comparison

15

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 6: Sun Tracking System Using Micro Controller

A typical schematic representation of a solar cell is shown in Figure 2 It

consists of a shallow p-n junction formed on the surface (eg by diffusion)

a front ohmic contactstripe and fingers a back ohmic contact that covers the

entire back surface and an antireflection coating on the front surface

6

23 CONVERTING PHOTONS TO ELECTRONS

The solar cells that you see on calculators and satellites are

photovoltaic cells or modules (modules are simply a group of cells

electrically connected and packaged in one frame) Photovoltaics as the

word implies (photo = light voltaic = electricity) convert sunlight directly

into electricity Once used almost exclusively in space photovoltaics are

used more and more in less exotic ways

They could even power your house How do these devices work

Photovoltaic (PV) cells are made of special materials called semiconductors

such as silicon which is currently the most commonly used Basically when

light strikes the cell a certain portion of it is absorbed within the

semiconductor material This means that the energy of the absorbed light is

transferred to the semiconductor The energy knocks electrons loose

allowing them to flow freely

PV cells also all have one or more electric fields that act to force

electrons freed by light absorption to flow in a certain direction This flow of

electrons is a current and by placing metal contacts on the top and bottom of

the PV cell we can draw that current off to use externally For example the

current can power a calculator This current together with the cells voltage

(which is a result of its built-in electric field or fields) defines the power (or

wattage) that the solar cell can produce Thats the basic process but theres

really much more to it Lets take a deeper look into one example of a PV

cell the single crystal silicon cell

7

24 WHEN LIGHT HITS THE CELL

When light in the form of photons hits our solar cell its energy frees

electron-hole pairs Each photon with enough energy will normally free

exactly one electron and result in a free hole as The effect of the electric

field in a PV cell If this happens close enough to the electric field or if free

electron and free hole happen to wander into its range of influence the field

will send the electron to the N side and the hole to the P side

This causes further disruption of electrical neutrality and if we

provide an external current path electrons will flow through the path to their

original side (the P side) to unite with holes that the electric field sent there

doing work for us along the way The electron flow provides the current and

the cells electric field causes a voltage With both current and voltage we

have power which is the product of the two How much sunlight energy

does our PV cell absorb Unfortunately the most that our simple cell could

absorb is around 25 percent and more likely is 15 percent or less

25 ENERGY LOSS

Solar cell absorbs only about 15 percents of the sunlights energy

Visible light is only part of the electromagnetic spectrum Electromagnetic

radiation is not monochromatic -- it is made up of a range of different

wavelengths and therefore energy levels (See How Special Relativity

Works for a good discussion of the electromagnetic spectrum) Light can be

separated into different wavelengths and we can see them in the form of a

rainbow Since the light that hits our cell has photons of a wide range of

energies it turns out that some of them wont have enough energy to form an

electron-hole pair

8

Theyll simply pass through the cell as if it were transparent Still

other photons have too much energy Only a certain amount of energy

measured in electron volts (eV) and defined by our cell material (about 11

eV for crystalline silicon) is required to knock an electron loose We call

this the band gap energy of a material

If a photon has more energy than the required amount then the extra

energy is lost (unless a photon has twice the required energy and can create

more than one electron-hole pair but this effect is not significant) These

two effects alone account for the loss of around 70 percent of the radiation

energy incident on our cell Our band gap also determines the strength

(voltage) of our electric field and if its too low then what we make up in

extra current (by absorbing more photons) we lose by having a small

voltage Remember that power is voltage times current

The optimal band gap balancing these two effects is around 14 eV

for a cell made from a single material We have other losses as well Our

electrons have to flow from one side of the cell to the other through an

external circuit We can cover the bottom with a metal allowing for good

conduction but if we completely cover the top then photons cant get

through the opaque conductor and we lose all of our current (in some cells

transparent conductors are used on the top surface but not in all) If we put

our contacts only at the sides of our cell then the electrons have to travel an

extremely long distance

9

26 OPERATION OF A PV CELL

Silicon is a semiconductor -- its not nearly as good as a metal for

transporting current Its internal resistance (called series resistance) is fairly

high and high resistance means high losses To minimize these losses our

cell is covered by a metallic contact grid that shortens the distance that

electrons have to travel while covering only a small part of the cell surface

Even so some photons are blocked by the grid which cant be too small or

else its own resistance will be too high

27 MAXIMIZING POWER OBTAINED FROM SOLAR CELLS

Through experiments conducted during research it was concluded

that the current obtained from solar cells is influenced by the angle at which

incident rays strike the cell surface By using a stationary light source and

adjusting the angle at which the light rays strike the cell a plot of current

delivered vs angle of incidence can be created This property of solar cells is

confirmed by the data contained in Table 1 and illustrated by figure(3)

Table 1 current delivered for various incidence

10

After considering the experimental data obtained it can be stated that

to maintain maximum power output from a solar array the angle of

incidence must be held at zero degrees Hence the array must constantly face

the sun This requires a tracking system that can continuously align the array

into the desired position

11

28 SOLAR CELL TESTING PRINCIPLE

Measurement of solar cells and solar irradiance measurements are

closely linked Solar radiation on the ground is changing all the time this

change is not only reflected in the total irradiance but also its intrinsic

details of the spectral irradiance are also constantly changes this has brought

about the first solar cell measurements have been very great difficulties As

the solar cell is a spectrum selective components and its optical sensitivity

of the distribution of the solar spectrum changes with changes in the same

total irradiance and spectral irradiance of different light sources the solar

cells electrical properties of the output will be quite different

In order to achieve the unity of solar cell measurement value the

International Electro technical Commission first standard solar spectral

irradiation has been stipulated All the ground with solar standard conditions

of measurement is used AM15 standard solar spectral distribution the

spectral distribution of the data from specific meteorological conditions

atmospheric absorption of solar spectral distribution under the condition of

the measured values

The main technical parameters of solar cells is the spectral response of

solar cells short-circuit current and open circuit voltage and photoelectric

conversion efficiency of solar cells As a solar cell measuring the project

usually carried out the following two aspects of the test - the standard solar

cells under the conditions of the solar spectrum in the standard short-circuit

current in the solar simulator calibration and measurement of solar cells

under the V - A characteristics measurements

12

Calculate the standard solar spectrum under the condition of the

photoelectric conversion efficiency of solar cells Unable to get with the

standard AM15 solar spectral distribution consistent with artificial light so

can not directly measure the solar cells under the conditions of solar

radiation in the standard short-circuit current

The solar cell measurement laboratories usually a very complicated

method to achieve the standard AM15 solar spectrum solar cells under

short-circuit current measurements and traceability to the international

benchmark measure light irradiation this process is known as solar

calibration

IV characteristics of solar cell measurement method is to first use of

solar cells with the measured spectral response similar to the standard solar

cell to set the sun simulator under standard test conditions of irradiance and

then measured in the sun simulator under test solar cells IV characteristic

curve as measured with the standard solar cell solar cell spectral response

similar to so this alternative measurement method can overcome the out due

to the spectral distribution of solar simulator

281 CHINArsquoS SOLAR CELL TECHNOLOGY DEVELOPMENT

TEST

The seventies of last century Tianjin Institute in solar power research

and development applications at the same time invested considerable human

and material resources the establishment of a solar cell measuring

laboratory began solar cell calibration and testing of technology research

13

The main testing equipment including domestic and imported A-

grade solar simulator for the measurement of electrical properties and the

development of phase-locked amplification technology based on solar

spectral response measurement system

The initial goal was to establish an accurate solar as a standard

industry-wide baseline measurement of solar cells In the meantime a

variety of solar cell calibration technique has been fully developed mainly

including mountain calibration ground spectral calibration spectral

calibration laboratories aircraft calibration calibration of the space shuttle

and many other calibration techniques have been developed and tried and

eventually the formation of Tianjin Institute of the standard solar power

system and Tianjin Institute of the standard solar power in mainland China

has been widely promoted and applied

The early eighties Chinas solar cell testing technology has gradually

matured As an emerging industry the importance of products measurement

of the standardization work so organized industry-wide testing experts has

established a national solar photovoltaic energy systems Standardization

Committee specializing in solar cell measuring testing and product quality

standards of the drafting of and development work The initial goal is to

achieve the solar value products industry-wide unity has formulated the

solar cell calibration method general norms mono crystalline silicon

solar cells space-solar temperature coefficient measurement method

single crystal general norms of silicon solar cells on the ground with the

solar components of the environment experimental methods on the

ground with standard solar cells space with standard solar cells

14

282 CHINArsquoS SOLAR CELL TECHNOLOGY INTERNATIONAL

ADVANCED LEVEL TEST

The early nineties the state investment fund special transformation

transformation of Tianjin Institute of solar power testing laboratory to

establish a set of a standard solar cell measuring device Include the

laboratory a standard solar cell calibration system and two standard solar

value transfer systems greatly improves the level of the labs solar cell

testing and capacity On this basis the establishment of a Ministry of

Information Industry E-205 metering stations specializing in solar testing

Dell LATITUDE D410 Battery for the Chinese solar industry to provide

accurate

Value of solar cells is also a unity in the world to be a difficult

problem To this end the international advanced solar testing laboratory

trying to achieve through international comparison of the solar value unity

throughout the world The most famous and most successful of an

international alignment is PEP `93 solar cells compared to international

standards it is the US Department of Energy project By the United States

Renewable Energy Laboratory led 10 countries around the world have 13

well-known solar testing laboratories to participate

Each laboratory provides two standard solar cell calibration data is not

standard sample all 23 standard solar cell through a variety of laboratory

calibration back to back to form after the international solar cell base WPVS

(world photovoltaic scale) Tianjin Power Research Institute (MII 205

metering stations) participated in this sub-standard solar activities in the

international comparison

15

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 7: Sun Tracking System Using Micro Controller

23 CONVERTING PHOTONS TO ELECTRONS

The solar cells that you see on calculators and satellites are

photovoltaic cells or modules (modules are simply a group of cells

electrically connected and packaged in one frame) Photovoltaics as the

word implies (photo = light voltaic = electricity) convert sunlight directly

into electricity Once used almost exclusively in space photovoltaics are

used more and more in less exotic ways

They could even power your house How do these devices work

Photovoltaic (PV) cells are made of special materials called semiconductors

such as silicon which is currently the most commonly used Basically when

light strikes the cell a certain portion of it is absorbed within the

semiconductor material This means that the energy of the absorbed light is

transferred to the semiconductor The energy knocks electrons loose

allowing them to flow freely

PV cells also all have one or more electric fields that act to force

electrons freed by light absorption to flow in a certain direction This flow of

electrons is a current and by placing metal contacts on the top and bottom of

the PV cell we can draw that current off to use externally For example the

current can power a calculator This current together with the cells voltage

(which is a result of its built-in electric field or fields) defines the power (or

wattage) that the solar cell can produce Thats the basic process but theres

really much more to it Lets take a deeper look into one example of a PV

cell the single crystal silicon cell

7

24 WHEN LIGHT HITS THE CELL

When light in the form of photons hits our solar cell its energy frees

electron-hole pairs Each photon with enough energy will normally free

exactly one electron and result in a free hole as The effect of the electric

field in a PV cell If this happens close enough to the electric field or if free

electron and free hole happen to wander into its range of influence the field

will send the electron to the N side and the hole to the P side

This causes further disruption of electrical neutrality and if we

provide an external current path electrons will flow through the path to their

original side (the P side) to unite with holes that the electric field sent there

doing work for us along the way The electron flow provides the current and

the cells electric field causes a voltage With both current and voltage we

have power which is the product of the two How much sunlight energy

does our PV cell absorb Unfortunately the most that our simple cell could

absorb is around 25 percent and more likely is 15 percent or less

25 ENERGY LOSS

Solar cell absorbs only about 15 percents of the sunlights energy

Visible light is only part of the electromagnetic spectrum Electromagnetic

radiation is not monochromatic -- it is made up of a range of different

wavelengths and therefore energy levels (See How Special Relativity

Works for a good discussion of the electromagnetic spectrum) Light can be

separated into different wavelengths and we can see them in the form of a

rainbow Since the light that hits our cell has photons of a wide range of

energies it turns out that some of them wont have enough energy to form an

electron-hole pair

8

Theyll simply pass through the cell as if it were transparent Still

other photons have too much energy Only a certain amount of energy

measured in electron volts (eV) and defined by our cell material (about 11

eV for crystalline silicon) is required to knock an electron loose We call

this the band gap energy of a material

If a photon has more energy than the required amount then the extra

energy is lost (unless a photon has twice the required energy and can create

more than one electron-hole pair but this effect is not significant) These

two effects alone account for the loss of around 70 percent of the radiation

energy incident on our cell Our band gap also determines the strength

(voltage) of our electric field and if its too low then what we make up in

extra current (by absorbing more photons) we lose by having a small

voltage Remember that power is voltage times current

The optimal band gap balancing these two effects is around 14 eV

for a cell made from a single material We have other losses as well Our

electrons have to flow from one side of the cell to the other through an

external circuit We can cover the bottom with a metal allowing for good

conduction but if we completely cover the top then photons cant get

through the opaque conductor and we lose all of our current (in some cells

transparent conductors are used on the top surface but not in all) If we put

our contacts only at the sides of our cell then the electrons have to travel an

extremely long distance

9

26 OPERATION OF A PV CELL

Silicon is a semiconductor -- its not nearly as good as a metal for

transporting current Its internal resistance (called series resistance) is fairly

high and high resistance means high losses To minimize these losses our

cell is covered by a metallic contact grid that shortens the distance that

electrons have to travel while covering only a small part of the cell surface

Even so some photons are blocked by the grid which cant be too small or

else its own resistance will be too high

27 MAXIMIZING POWER OBTAINED FROM SOLAR CELLS

Through experiments conducted during research it was concluded

that the current obtained from solar cells is influenced by the angle at which

incident rays strike the cell surface By using a stationary light source and

adjusting the angle at which the light rays strike the cell a plot of current

delivered vs angle of incidence can be created This property of solar cells is

confirmed by the data contained in Table 1 and illustrated by figure(3)

Table 1 current delivered for various incidence

10

After considering the experimental data obtained it can be stated that

to maintain maximum power output from a solar array the angle of

incidence must be held at zero degrees Hence the array must constantly face

the sun This requires a tracking system that can continuously align the array

into the desired position

11

28 SOLAR CELL TESTING PRINCIPLE

Measurement of solar cells and solar irradiance measurements are

closely linked Solar radiation on the ground is changing all the time this

change is not only reflected in the total irradiance but also its intrinsic

details of the spectral irradiance are also constantly changes this has brought

about the first solar cell measurements have been very great difficulties As

the solar cell is a spectrum selective components and its optical sensitivity

of the distribution of the solar spectrum changes with changes in the same

total irradiance and spectral irradiance of different light sources the solar

cells electrical properties of the output will be quite different

In order to achieve the unity of solar cell measurement value the

International Electro technical Commission first standard solar spectral

irradiation has been stipulated All the ground with solar standard conditions

of measurement is used AM15 standard solar spectral distribution the

spectral distribution of the data from specific meteorological conditions

atmospheric absorption of solar spectral distribution under the condition of

the measured values

The main technical parameters of solar cells is the spectral response of

solar cells short-circuit current and open circuit voltage and photoelectric

conversion efficiency of solar cells As a solar cell measuring the project

usually carried out the following two aspects of the test - the standard solar

cells under the conditions of the solar spectrum in the standard short-circuit

current in the solar simulator calibration and measurement of solar cells

under the V - A characteristics measurements

12

Calculate the standard solar spectrum under the condition of the

photoelectric conversion efficiency of solar cells Unable to get with the

standard AM15 solar spectral distribution consistent with artificial light so

can not directly measure the solar cells under the conditions of solar

radiation in the standard short-circuit current

The solar cell measurement laboratories usually a very complicated

method to achieve the standard AM15 solar spectrum solar cells under

short-circuit current measurements and traceability to the international

benchmark measure light irradiation this process is known as solar

calibration

IV characteristics of solar cell measurement method is to first use of

solar cells with the measured spectral response similar to the standard solar

cell to set the sun simulator under standard test conditions of irradiance and

then measured in the sun simulator under test solar cells IV characteristic

curve as measured with the standard solar cell solar cell spectral response

similar to so this alternative measurement method can overcome the out due

to the spectral distribution of solar simulator

281 CHINArsquoS SOLAR CELL TECHNOLOGY DEVELOPMENT

TEST

The seventies of last century Tianjin Institute in solar power research

and development applications at the same time invested considerable human

and material resources the establishment of a solar cell measuring

laboratory began solar cell calibration and testing of technology research

13

The main testing equipment including domestic and imported A-

grade solar simulator for the measurement of electrical properties and the

development of phase-locked amplification technology based on solar

spectral response measurement system

The initial goal was to establish an accurate solar as a standard

industry-wide baseline measurement of solar cells In the meantime a

variety of solar cell calibration technique has been fully developed mainly

including mountain calibration ground spectral calibration spectral

calibration laboratories aircraft calibration calibration of the space shuttle

and many other calibration techniques have been developed and tried and

eventually the formation of Tianjin Institute of the standard solar power

system and Tianjin Institute of the standard solar power in mainland China

has been widely promoted and applied

The early eighties Chinas solar cell testing technology has gradually

matured As an emerging industry the importance of products measurement

of the standardization work so organized industry-wide testing experts has

established a national solar photovoltaic energy systems Standardization

Committee specializing in solar cell measuring testing and product quality

standards of the drafting of and development work The initial goal is to

achieve the solar value products industry-wide unity has formulated the

solar cell calibration method general norms mono crystalline silicon

solar cells space-solar temperature coefficient measurement method

single crystal general norms of silicon solar cells on the ground with the

solar components of the environment experimental methods on the

ground with standard solar cells space with standard solar cells

14

282 CHINArsquoS SOLAR CELL TECHNOLOGY INTERNATIONAL

ADVANCED LEVEL TEST

The early nineties the state investment fund special transformation

transformation of Tianjin Institute of solar power testing laboratory to

establish a set of a standard solar cell measuring device Include the

laboratory a standard solar cell calibration system and two standard solar

value transfer systems greatly improves the level of the labs solar cell

testing and capacity On this basis the establishment of a Ministry of

Information Industry E-205 metering stations specializing in solar testing

Dell LATITUDE D410 Battery for the Chinese solar industry to provide

accurate

Value of solar cells is also a unity in the world to be a difficult

problem To this end the international advanced solar testing laboratory

trying to achieve through international comparison of the solar value unity

throughout the world The most famous and most successful of an

international alignment is PEP `93 solar cells compared to international

standards it is the US Department of Energy project By the United States

Renewable Energy Laboratory led 10 countries around the world have 13

well-known solar testing laboratories to participate

Each laboratory provides two standard solar cell calibration data is not

standard sample all 23 standard solar cell through a variety of laboratory

calibration back to back to form after the international solar cell base WPVS

(world photovoltaic scale) Tianjin Power Research Institute (MII 205

metering stations) participated in this sub-standard solar activities in the

international comparison

15

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 8: Sun Tracking System Using Micro Controller

24 WHEN LIGHT HITS THE CELL

When light in the form of photons hits our solar cell its energy frees

electron-hole pairs Each photon with enough energy will normally free

exactly one electron and result in a free hole as The effect of the electric

field in a PV cell If this happens close enough to the electric field or if free

electron and free hole happen to wander into its range of influence the field

will send the electron to the N side and the hole to the P side

This causes further disruption of electrical neutrality and if we

provide an external current path electrons will flow through the path to their

original side (the P side) to unite with holes that the electric field sent there

doing work for us along the way The electron flow provides the current and

the cells electric field causes a voltage With both current and voltage we

have power which is the product of the two How much sunlight energy

does our PV cell absorb Unfortunately the most that our simple cell could

absorb is around 25 percent and more likely is 15 percent or less

25 ENERGY LOSS

Solar cell absorbs only about 15 percents of the sunlights energy

Visible light is only part of the electromagnetic spectrum Electromagnetic

radiation is not monochromatic -- it is made up of a range of different

wavelengths and therefore energy levels (See How Special Relativity

Works for a good discussion of the electromagnetic spectrum) Light can be

separated into different wavelengths and we can see them in the form of a

rainbow Since the light that hits our cell has photons of a wide range of

energies it turns out that some of them wont have enough energy to form an

electron-hole pair

8

Theyll simply pass through the cell as if it were transparent Still

other photons have too much energy Only a certain amount of energy

measured in electron volts (eV) and defined by our cell material (about 11

eV for crystalline silicon) is required to knock an electron loose We call

this the band gap energy of a material

If a photon has more energy than the required amount then the extra

energy is lost (unless a photon has twice the required energy and can create

more than one electron-hole pair but this effect is not significant) These

two effects alone account for the loss of around 70 percent of the radiation

energy incident on our cell Our band gap also determines the strength

(voltage) of our electric field and if its too low then what we make up in

extra current (by absorbing more photons) we lose by having a small

voltage Remember that power is voltage times current

The optimal band gap balancing these two effects is around 14 eV

for a cell made from a single material We have other losses as well Our

electrons have to flow from one side of the cell to the other through an

external circuit We can cover the bottom with a metal allowing for good

conduction but if we completely cover the top then photons cant get

through the opaque conductor and we lose all of our current (in some cells

transparent conductors are used on the top surface but not in all) If we put

our contacts only at the sides of our cell then the electrons have to travel an

extremely long distance

9

26 OPERATION OF A PV CELL

Silicon is a semiconductor -- its not nearly as good as a metal for

transporting current Its internal resistance (called series resistance) is fairly

high and high resistance means high losses To minimize these losses our

cell is covered by a metallic contact grid that shortens the distance that

electrons have to travel while covering only a small part of the cell surface

Even so some photons are blocked by the grid which cant be too small or

else its own resistance will be too high

27 MAXIMIZING POWER OBTAINED FROM SOLAR CELLS

Through experiments conducted during research it was concluded

that the current obtained from solar cells is influenced by the angle at which

incident rays strike the cell surface By using a stationary light source and

adjusting the angle at which the light rays strike the cell a plot of current

delivered vs angle of incidence can be created This property of solar cells is

confirmed by the data contained in Table 1 and illustrated by figure(3)

Table 1 current delivered for various incidence

10

After considering the experimental data obtained it can be stated that

to maintain maximum power output from a solar array the angle of

incidence must be held at zero degrees Hence the array must constantly face

the sun This requires a tracking system that can continuously align the array

into the desired position

11

28 SOLAR CELL TESTING PRINCIPLE

Measurement of solar cells and solar irradiance measurements are

closely linked Solar radiation on the ground is changing all the time this

change is not only reflected in the total irradiance but also its intrinsic

details of the spectral irradiance are also constantly changes this has brought

about the first solar cell measurements have been very great difficulties As

the solar cell is a spectrum selective components and its optical sensitivity

of the distribution of the solar spectrum changes with changes in the same

total irradiance and spectral irradiance of different light sources the solar

cells electrical properties of the output will be quite different

In order to achieve the unity of solar cell measurement value the

International Electro technical Commission first standard solar spectral

irradiation has been stipulated All the ground with solar standard conditions

of measurement is used AM15 standard solar spectral distribution the

spectral distribution of the data from specific meteorological conditions

atmospheric absorption of solar spectral distribution under the condition of

the measured values

The main technical parameters of solar cells is the spectral response of

solar cells short-circuit current and open circuit voltage and photoelectric

conversion efficiency of solar cells As a solar cell measuring the project

usually carried out the following two aspects of the test - the standard solar

cells under the conditions of the solar spectrum in the standard short-circuit

current in the solar simulator calibration and measurement of solar cells

under the V - A characteristics measurements

12

Calculate the standard solar spectrum under the condition of the

photoelectric conversion efficiency of solar cells Unable to get with the

standard AM15 solar spectral distribution consistent with artificial light so

can not directly measure the solar cells under the conditions of solar

radiation in the standard short-circuit current

The solar cell measurement laboratories usually a very complicated

method to achieve the standard AM15 solar spectrum solar cells under

short-circuit current measurements and traceability to the international

benchmark measure light irradiation this process is known as solar

calibration

IV characteristics of solar cell measurement method is to first use of

solar cells with the measured spectral response similar to the standard solar

cell to set the sun simulator under standard test conditions of irradiance and

then measured in the sun simulator under test solar cells IV characteristic

curve as measured with the standard solar cell solar cell spectral response

similar to so this alternative measurement method can overcome the out due

to the spectral distribution of solar simulator

281 CHINArsquoS SOLAR CELL TECHNOLOGY DEVELOPMENT

TEST

The seventies of last century Tianjin Institute in solar power research

and development applications at the same time invested considerable human

and material resources the establishment of a solar cell measuring

laboratory began solar cell calibration and testing of technology research

13

The main testing equipment including domestic and imported A-

grade solar simulator for the measurement of electrical properties and the

development of phase-locked amplification technology based on solar

spectral response measurement system

The initial goal was to establish an accurate solar as a standard

industry-wide baseline measurement of solar cells In the meantime a

variety of solar cell calibration technique has been fully developed mainly

including mountain calibration ground spectral calibration spectral

calibration laboratories aircraft calibration calibration of the space shuttle

and many other calibration techniques have been developed and tried and

eventually the formation of Tianjin Institute of the standard solar power

system and Tianjin Institute of the standard solar power in mainland China

has been widely promoted and applied

The early eighties Chinas solar cell testing technology has gradually

matured As an emerging industry the importance of products measurement

of the standardization work so organized industry-wide testing experts has

established a national solar photovoltaic energy systems Standardization

Committee specializing in solar cell measuring testing and product quality

standards of the drafting of and development work The initial goal is to

achieve the solar value products industry-wide unity has formulated the

solar cell calibration method general norms mono crystalline silicon

solar cells space-solar temperature coefficient measurement method

single crystal general norms of silicon solar cells on the ground with the

solar components of the environment experimental methods on the

ground with standard solar cells space with standard solar cells

14

282 CHINArsquoS SOLAR CELL TECHNOLOGY INTERNATIONAL

ADVANCED LEVEL TEST

The early nineties the state investment fund special transformation

transformation of Tianjin Institute of solar power testing laboratory to

establish a set of a standard solar cell measuring device Include the

laboratory a standard solar cell calibration system and two standard solar

value transfer systems greatly improves the level of the labs solar cell

testing and capacity On this basis the establishment of a Ministry of

Information Industry E-205 metering stations specializing in solar testing

Dell LATITUDE D410 Battery for the Chinese solar industry to provide

accurate

Value of solar cells is also a unity in the world to be a difficult

problem To this end the international advanced solar testing laboratory

trying to achieve through international comparison of the solar value unity

throughout the world The most famous and most successful of an

international alignment is PEP `93 solar cells compared to international

standards it is the US Department of Energy project By the United States

Renewable Energy Laboratory led 10 countries around the world have 13

well-known solar testing laboratories to participate

Each laboratory provides two standard solar cell calibration data is not

standard sample all 23 standard solar cell through a variety of laboratory

calibration back to back to form after the international solar cell base WPVS

(world photovoltaic scale) Tianjin Power Research Institute (MII 205

metering stations) participated in this sub-standard solar activities in the

international comparison

15

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 9: Sun Tracking System Using Micro Controller

Theyll simply pass through the cell as if it were transparent Still

other photons have too much energy Only a certain amount of energy

measured in electron volts (eV) and defined by our cell material (about 11

eV for crystalline silicon) is required to knock an electron loose We call

this the band gap energy of a material

If a photon has more energy than the required amount then the extra

energy is lost (unless a photon has twice the required energy and can create

more than one electron-hole pair but this effect is not significant) These

two effects alone account for the loss of around 70 percent of the radiation

energy incident on our cell Our band gap also determines the strength

(voltage) of our electric field and if its too low then what we make up in

extra current (by absorbing more photons) we lose by having a small

voltage Remember that power is voltage times current

The optimal band gap balancing these two effects is around 14 eV

for a cell made from a single material We have other losses as well Our

electrons have to flow from one side of the cell to the other through an

external circuit We can cover the bottom with a metal allowing for good

conduction but if we completely cover the top then photons cant get

through the opaque conductor and we lose all of our current (in some cells

transparent conductors are used on the top surface but not in all) If we put

our contacts only at the sides of our cell then the electrons have to travel an

extremely long distance

9

26 OPERATION OF A PV CELL

Silicon is a semiconductor -- its not nearly as good as a metal for

transporting current Its internal resistance (called series resistance) is fairly

high and high resistance means high losses To minimize these losses our

cell is covered by a metallic contact grid that shortens the distance that

electrons have to travel while covering only a small part of the cell surface

Even so some photons are blocked by the grid which cant be too small or

else its own resistance will be too high

27 MAXIMIZING POWER OBTAINED FROM SOLAR CELLS

Through experiments conducted during research it was concluded

that the current obtained from solar cells is influenced by the angle at which

incident rays strike the cell surface By using a stationary light source and

adjusting the angle at which the light rays strike the cell a plot of current

delivered vs angle of incidence can be created This property of solar cells is

confirmed by the data contained in Table 1 and illustrated by figure(3)

Table 1 current delivered for various incidence

10

After considering the experimental data obtained it can be stated that

to maintain maximum power output from a solar array the angle of

incidence must be held at zero degrees Hence the array must constantly face

the sun This requires a tracking system that can continuously align the array

into the desired position

11

28 SOLAR CELL TESTING PRINCIPLE

Measurement of solar cells and solar irradiance measurements are

closely linked Solar radiation on the ground is changing all the time this

change is not only reflected in the total irradiance but also its intrinsic

details of the spectral irradiance are also constantly changes this has brought

about the first solar cell measurements have been very great difficulties As

the solar cell is a spectrum selective components and its optical sensitivity

of the distribution of the solar spectrum changes with changes in the same

total irradiance and spectral irradiance of different light sources the solar

cells electrical properties of the output will be quite different

In order to achieve the unity of solar cell measurement value the

International Electro technical Commission first standard solar spectral

irradiation has been stipulated All the ground with solar standard conditions

of measurement is used AM15 standard solar spectral distribution the

spectral distribution of the data from specific meteorological conditions

atmospheric absorption of solar spectral distribution under the condition of

the measured values

The main technical parameters of solar cells is the spectral response of

solar cells short-circuit current and open circuit voltage and photoelectric

conversion efficiency of solar cells As a solar cell measuring the project

usually carried out the following two aspects of the test - the standard solar

cells under the conditions of the solar spectrum in the standard short-circuit

current in the solar simulator calibration and measurement of solar cells

under the V - A characteristics measurements

12

Calculate the standard solar spectrum under the condition of the

photoelectric conversion efficiency of solar cells Unable to get with the

standard AM15 solar spectral distribution consistent with artificial light so

can not directly measure the solar cells under the conditions of solar

radiation in the standard short-circuit current

The solar cell measurement laboratories usually a very complicated

method to achieve the standard AM15 solar spectrum solar cells under

short-circuit current measurements and traceability to the international

benchmark measure light irradiation this process is known as solar

calibration

IV characteristics of solar cell measurement method is to first use of

solar cells with the measured spectral response similar to the standard solar

cell to set the sun simulator under standard test conditions of irradiance and

then measured in the sun simulator under test solar cells IV characteristic

curve as measured with the standard solar cell solar cell spectral response

similar to so this alternative measurement method can overcome the out due

to the spectral distribution of solar simulator

281 CHINArsquoS SOLAR CELL TECHNOLOGY DEVELOPMENT

TEST

The seventies of last century Tianjin Institute in solar power research

and development applications at the same time invested considerable human

and material resources the establishment of a solar cell measuring

laboratory began solar cell calibration and testing of technology research

13

The main testing equipment including domestic and imported A-

grade solar simulator for the measurement of electrical properties and the

development of phase-locked amplification technology based on solar

spectral response measurement system

The initial goal was to establish an accurate solar as a standard

industry-wide baseline measurement of solar cells In the meantime a

variety of solar cell calibration technique has been fully developed mainly

including mountain calibration ground spectral calibration spectral

calibration laboratories aircraft calibration calibration of the space shuttle

and many other calibration techniques have been developed and tried and

eventually the formation of Tianjin Institute of the standard solar power

system and Tianjin Institute of the standard solar power in mainland China

has been widely promoted and applied

The early eighties Chinas solar cell testing technology has gradually

matured As an emerging industry the importance of products measurement

of the standardization work so organized industry-wide testing experts has

established a national solar photovoltaic energy systems Standardization

Committee specializing in solar cell measuring testing and product quality

standards of the drafting of and development work The initial goal is to

achieve the solar value products industry-wide unity has formulated the

solar cell calibration method general norms mono crystalline silicon

solar cells space-solar temperature coefficient measurement method

single crystal general norms of silicon solar cells on the ground with the

solar components of the environment experimental methods on the

ground with standard solar cells space with standard solar cells

14

282 CHINArsquoS SOLAR CELL TECHNOLOGY INTERNATIONAL

ADVANCED LEVEL TEST

The early nineties the state investment fund special transformation

transformation of Tianjin Institute of solar power testing laboratory to

establish a set of a standard solar cell measuring device Include the

laboratory a standard solar cell calibration system and two standard solar

value transfer systems greatly improves the level of the labs solar cell

testing and capacity On this basis the establishment of a Ministry of

Information Industry E-205 metering stations specializing in solar testing

Dell LATITUDE D410 Battery for the Chinese solar industry to provide

accurate

Value of solar cells is also a unity in the world to be a difficult

problem To this end the international advanced solar testing laboratory

trying to achieve through international comparison of the solar value unity

throughout the world The most famous and most successful of an

international alignment is PEP `93 solar cells compared to international

standards it is the US Department of Energy project By the United States

Renewable Energy Laboratory led 10 countries around the world have 13

well-known solar testing laboratories to participate

Each laboratory provides two standard solar cell calibration data is not

standard sample all 23 standard solar cell through a variety of laboratory

calibration back to back to form after the international solar cell base WPVS

(world photovoltaic scale) Tianjin Power Research Institute (MII 205

metering stations) participated in this sub-standard solar activities in the

international comparison

15

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 10: Sun Tracking System Using Micro Controller

26 OPERATION OF A PV CELL

Silicon is a semiconductor -- its not nearly as good as a metal for

transporting current Its internal resistance (called series resistance) is fairly

high and high resistance means high losses To minimize these losses our

cell is covered by a metallic contact grid that shortens the distance that

electrons have to travel while covering only a small part of the cell surface

Even so some photons are blocked by the grid which cant be too small or

else its own resistance will be too high

27 MAXIMIZING POWER OBTAINED FROM SOLAR CELLS

Through experiments conducted during research it was concluded

that the current obtained from solar cells is influenced by the angle at which

incident rays strike the cell surface By using a stationary light source and

adjusting the angle at which the light rays strike the cell a plot of current

delivered vs angle of incidence can be created This property of solar cells is

confirmed by the data contained in Table 1 and illustrated by figure(3)

Table 1 current delivered for various incidence

10

After considering the experimental data obtained it can be stated that

to maintain maximum power output from a solar array the angle of

incidence must be held at zero degrees Hence the array must constantly face

the sun This requires a tracking system that can continuously align the array

into the desired position

11

28 SOLAR CELL TESTING PRINCIPLE

Measurement of solar cells and solar irradiance measurements are

closely linked Solar radiation on the ground is changing all the time this

change is not only reflected in the total irradiance but also its intrinsic

details of the spectral irradiance are also constantly changes this has brought

about the first solar cell measurements have been very great difficulties As

the solar cell is a spectrum selective components and its optical sensitivity

of the distribution of the solar spectrum changes with changes in the same

total irradiance and spectral irradiance of different light sources the solar

cells electrical properties of the output will be quite different

In order to achieve the unity of solar cell measurement value the

International Electro technical Commission first standard solar spectral

irradiation has been stipulated All the ground with solar standard conditions

of measurement is used AM15 standard solar spectral distribution the

spectral distribution of the data from specific meteorological conditions

atmospheric absorption of solar spectral distribution under the condition of

the measured values

The main technical parameters of solar cells is the spectral response of

solar cells short-circuit current and open circuit voltage and photoelectric

conversion efficiency of solar cells As a solar cell measuring the project

usually carried out the following two aspects of the test - the standard solar

cells under the conditions of the solar spectrum in the standard short-circuit

current in the solar simulator calibration and measurement of solar cells

under the V - A characteristics measurements

12

Calculate the standard solar spectrum under the condition of the

photoelectric conversion efficiency of solar cells Unable to get with the

standard AM15 solar spectral distribution consistent with artificial light so

can not directly measure the solar cells under the conditions of solar

radiation in the standard short-circuit current

The solar cell measurement laboratories usually a very complicated

method to achieve the standard AM15 solar spectrum solar cells under

short-circuit current measurements and traceability to the international

benchmark measure light irradiation this process is known as solar

calibration

IV characteristics of solar cell measurement method is to first use of

solar cells with the measured spectral response similar to the standard solar

cell to set the sun simulator under standard test conditions of irradiance and

then measured in the sun simulator under test solar cells IV characteristic

curve as measured with the standard solar cell solar cell spectral response

similar to so this alternative measurement method can overcome the out due

to the spectral distribution of solar simulator

281 CHINArsquoS SOLAR CELL TECHNOLOGY DEVELOPMENT

TEST

The seventies of last century Tianjin Institute in solar power research

and development applications at the same time invested considerable human

and material resources the establishment of a solar cell measuring

laboratory began solar cell calibration and testing of technology research

13

The main testing equipment including domestic and imported A-

grade solar simulator for the measurement of electrical properties and the

development of phase-locked amplification technology based on solar

spectral response measurement system

The initial goal was to establish an accurate solar as a standard

industry-wide baseline measurement of solar cells In the meantime a

variety of solar cell calibration technique has been fully developed mainly

including mountain calibration ground spectral calibration spectral

calibration laboratories aircraft calibration calibration of the space shuttle

and many other calibration techniques have been developed and tried and

eventually the formation of Tianjin Institute of the standard solar power

system and Tianjin Institute of the standard solar power in mainland China

has been widely promoted and applied

The early eighties Chinas solar cell testing technology has gradually

matured As an emerging industry the importance of products measurement

of the standardization work so organized industry-wide testing experts has

established a national solar photovoltaic energy systems Standardization

Committee specializing in solar cell measuring testing and product quality

standards of the drafting of and development work The initial goal is to

achieve the solar value products industry-wide unity has formulated the

solar cell calibration method general norms mono crystalline silicon

solar cells space-solar temperature coefficient measurement method

single crystal general norms of silicon solar cells on the ground with the

solar components of the environment experimental methods on the

ground with standard solar cells space with standard solar cells

14

282 CHINArsquoS SOLAR CELL TECHNOLOGY INTERNATIONAL

ADVANCED LEVEL TEST

The early nineties the state investment fund special transformation

transformation of Tianjin Institute of solar power testing laboratory to

establish a set of a standard solar cell measuring device Include the

laboratory a standard solar cell calibration system and two standard solar

value transfer systems greatly improves the level of the labs solar cell

testing and capacity On this basis the establishment of a Ministry of

Information Industry E-205 metering stations specializing in solar testing

Dell LATITUDE D410 Battery for the Chinese solar industry to provide

accurate

Value of solar cells is also a unity in the world to be a difficult

problem To this end the international advanced solar testing laboratory

trying to achieve through international comparison of the solar value unity

throughout the world The most famous and most successful of an

international alignment is PEP `93 solar cells compared to international

standards it is the US Department of Energy project By the United States

Renewable Energy Laboratory led 10 countries around the world have 13

well-known solar testing laboratories to participate

Each laboratory provides two standard solar cell calibration data is not

standard sample all 23 standard solar cell through a variety of laboratory

calibration back to back to form after the international solar cell base WPVS

(world photovoltaic scale) Tianjin Power Research Institute (MII 205

metering stations) participated in this sub-standard solar activities in the

international comparison

15

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 11: Sun Tracking System Using Micro Controller

After considering the experimental data obtained it can be stated that

to maintain maximum power output from a solar array the angle of

incidence must be held at zero degrees Hence the array must constantly face

the sun This requires a tracking system that can continuously align the array

into the desired position

11

28 SOLAR CELL TESTING PRINCIPLE

Measurement of solar cells and solar irradiance measurements are

closely linked Solar radiation on the ground is changing all the time this

change is not only reflected in the total irradiance but also its intrinsic

details of the spectral irradiance are also constantly changes this has brought

about the first solar cell measurements have been very great difficulties As

the solar cell is a spectrum selective components and its optical sensitivity

of the distribution of the solar spectrum changes with changes in the same

total irradiance and spectral irradiance of different light sources the solar

cells electrical properties of the output will be quite different

In order to achieve the unity of solar cell measurement value the

International Electro technical Commission first standard solar spectral

irradiation has been stipulated All the ground with solar standard conditions

of measurement is used AM15 standard solar spectral distribution the

spectral distribution of the data from specific meteorological conditions

atmospheric absorption of solar spectral distribution under the condition of

the measured values

The main technical parameters of solar cells is the spectral response of

solar cells short-circuit current and open circuit voltage and photoelectric

conversion efficiency of solar cells As a solar cell measuring the project

usually carried out the following two aspects of the test - the standard solar

cells under the conditions of the solar spectrum in the standard short-circuit

current in the solar simulator calibration and measurement of solar cells

under the V - A characteristics measurements

12

Calculate the standard solar spectrum under the condition of the

photoelectric conversion efficiency of solar cells Unable to get with the

standard AM15 solar spectral distribution consistent with artificial light so

can not directly measure the solar cells under the conditions of solar

radiation in the standard short-circuit current

The solar cell measurement laboratories usually a very complicated

method to achieve the standard AM15 solar spectrum solar cells under

short-circuit current measurements and traceability to the international

benchmark measure light irradiation this process is known as solar

calibration

IV characteristics of solar cell measurement method is to first use of

solar cells with the measured spectral response similar to the standard solar

cell to set the sun simulator under standard test conditions of irradiance and

then measured in the sun simulator under test solar cells IV characteristic

curve as measured with the standard solar cell solar cell spectral response

similar to so this alternative measurement method can overcome the out due

to the spectral distribution of solar simulator

281 CHINArsquoS SOLAR CELL TECHNOLOGY DEVELOPMENT

TEST

The seventies of last century Tianjin Institute in solar power research

and development applications at the same time invested considerable human

and material resources the establishment of a solar cell measuring

laboratory began solar cell calibration and testing of technology research

13

The main testing equipment including domestic and imported A-

grade solar simulator for the measurement of electrical properties and the

development of phase-locked amplification technology based on solar

spectral response measurement system

The initial goal was to establish an accurate solar as a standard

industry-wide baseline measurement of solar cells In the meantime a

variety of solar cell calibration technique has been fully developed mainly

including mountain calibration ground spectral calibration spectral

calibration laboratories aircraft calibration calibration of the space shuttle

and many other calibration techniques have been developed and tried and

eventually the formation of Tianjin Institute of the standard solar power

system and Tianjin Institute of the standard solar power in mainland China

has been widely promoted and applied

The early eighties Chinas solar cell testing technology has gradually

matured As an emerging industry the importance of products measurement

of the standardization work so organized industry-wide testing experts has

established a national solar photovoltaic energy systems Standardization

Committee specializing in solar cell measuring testing and product quality

standards of the drafting of and development work The initial goal is to

achieve the solar value products industry-wide unity has formulated the

solar cell calibration method general norms mono crystalline silicon

solar cells space-solar temperature coefficient measurement method

single crystal general norms of silicon solar cells on the ground with the

solar components of the environment experimental methods on the

ground with standard solar cells space with standard solar cells

14

282 CHINArsquoS SOLAR CELL TECHNOLOGY INTERNATIONAL

ADVANCED LEVEL TEST

The early nineties the state investment fund special transformation

transformation of Tianjin Institute of solar power testing laboratory to

establish a set of a standard solar cell measuring device Include the

laboratory a standard solar cell calibration system and two standard solar

value transfer systems greatly improves the level of the labs solar cell

testing and capacity On this basis the establishment of a Ministry of

Information Industry E-205 metering stations specializing in solar testing

Dell LATITUDE D410 Battery for the Chinese solar industry to provide

accurate

Value of solar cells is also a unity in the world to be a difficult

problem To this end the international advanced solar testing laboratory

trying to achieve through international comparison of the solar value unity

throughout the world The most famous and most successful of an

international alignment is PEP `93 solar cells compared to international

standards it is the US Department of Energy project By the United States

Renewable Energy Laboratory led 10 countries around the world have 13

well-known solar testing laboratories to participate

Each laboratory provides two standard solar cell calibration data is not

standard sample all 23 standard solar cell through a variety of laboratory

calibration back to back to form after the international solar cell base WPVS

(world photovoltaic scale) Tianjin Power Research Institute (MII 205

metering stations) participated in this sub-standard solar activities in the

international comparison

15

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 12: Sun Tracking System Using Micro Controller

28 SOLAR CELL TESTING PRINCIPLE

Measurement of solar cells and solar irradiance measurements are

closely linked Solar radiation on the ground is changing all the time this

change is not only reflected in the total irradiance but also its intrinsic

details of the spectral irradiance are also constantly changes this has brought

about the first solar cell measurements have been very great difficulties As

the solar cell is a spectrum selective components and its optical sensitivity

of the distribution of the solar spectrum changes with changes in the same

total irradiance and spectral irradiance of different light sources the solar

cells electrical properties of the output will be quite different

In order to achieve the unity of solar cell measurement value the

International Electro technical Commission first standard solar spectral

irradiation has been stipulated All the ground with solar standard conditions

of measurement is used AM15 standard solar spectral distribution the

spectral distribution of the data from specific meteorological conditions

atmospheric absorption of solar spectral distribution under the condition of

the measured values

The main technical parameters of solar cells is the spectral response of

solar cells short-circuit current and open circuit voltage and photoelectric

conversion efficiency of solar cells As a solar cell measuring the project

usually carried out the following two aspects of the test - the standard solar

cells under the conditions of the solar spectrum in the standard short-circuit

current in the solar simulator calibration and measurement of solar cells

under the V - A characteristics measurements

12

Calculate the standard solar spectrum under the condition of the

photoelectric conversion efficiency of solar cells Unable to get with the

standard AM15 solar spectral distribution consistent with artificial light so

can not directly measure the solar cells under the conditions of solar

radiation in the standard short-circuit current

The solar cell measurement laboratories usually a very complicated

method to achieve the standard AM15 solar spectrum solar cells under

short-circuit current measurements and traceability to the international

benchmark measure light irradiation this process is known as solar

calibration

IV characteristics of solar cell measurement method is to first use of

solar cells with the measured spectral response similar to the standard solar

cell to set the sun simulator under standard test conditions of irradiance and

then measured in the sun simulator under test solar cells IV characteristic

curve as measured with the standard solar cell solar cell spectral response

similar to so this alternative measurement method can overcome the out due

to the spectral distribution of solar simulator

281 CHINArsquoS SOLAR CELL TECHNOLOGY DEVELOPMENT

TEST

The seventies of last century Tianjin Institute in solar power research

and development applications at the same time invested considerable human

and material resources the establishment of a solar cell measuring

laboratory began solar cell calibration and testing of technology research

13

The main testing equipment including domestic and imported A-

grade solar simulator for the measurement of electrical properties and the

development of phase-locked amplification technology based on solar

spectral response measurement system

The initial goal was to establish an accurate solar as a standard

industry-wide baseline measurement of solar cells In the meantime a

variety of solar cell calibration technique has been fully developed mainly

including mountain calibration ground spectral calibration spectral

calibration laboratories aircraft calibration calibration of the space shuttle

and many other calibration techniques have been developed and tried and

eventually the formation of Tianjin Institute of the standard solar power

system and Tianjin Institute of the standard solar power in mainland China

has been widely promoted and applied

The early eighties Chinas solar cell testing technology has gradually

matured As an emerging industry the importance of products measurement

of the standardization work so organized industry-wide testing experts has

established a national solar photovoltaic energy systems Standardization

Committee specializing in solar cell measuring testing and product quality

standards of the drafting of and development work The initial goal is to

achieve the solar value products industry-wide unity has formulated the

solar cell calibration method general norms mono crystalline silicon

solar cells space-solar temperature coefficient measurement method

single crystal general norms of silicon solar cells on the ground with the

solar components of the environment experimental methods on the

ground with standard solar cells space with standard solar cells

14

282 CHINArsquoS SOLAR CELL TECHNOLOGY INTERNATIONAL

ADVANCED LEVEL TEST

The early nineties the state investment fund special transformation

transformation of Tianjin Institute of solar power testing laboratory to

establish a set of a standard solar cell measuring device Include the

laboratory a standard solar cell calibration system and two standard solar

value transfer systems greatly improves the level of the labs solar cell

testing and capacity On this basis the establishment of a Ministry of

Information Industry E-205 metering stations specializing in solar testing

Dell LATITUDE D410 Battery for the Chinese solar industry to provide

accurate

Value of solar cells is also a unity in the world to be a difficult

problem To this end the international advanced solar testing laboratory

trying to achieve through international comparison of the solar value unity

throughout the world The most famous and most successful of an

international alignment is PEP `93 solar cells compared to international

standards it is the US Department of Energy project By the United States

Renewable Energy Laboratory led 10 countries around the world have 13

well-known solar testing laboratories to participate

Each laboratory provides two standard solar cell calibration data is not

standard sample all 23 standard solar cell through a variety of laboratory

calibration back to back to form after the international solar cell base WPVS

(world photovoltaic scale) Tianjin Power Research Institute (MII 205

metering stations) participated in this sub-standard solar activities in the

international comparison

15

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 13: Sun Tracking System Using Micro Controller

Calculate the standard solar spectrum under the condition of the

photoelectric conversion efficiency of solar cells Unable to get with the

standard AM15 solar spectral distribution consistent with artificial light so

can not directly measure the solar cells under the conditions of solar

radiation in the standard short-circuit current

The solar cell measurement laboratories usually a very complicated

method to achieve the standard AM15 solar spectrum solar cells under

short-circuit current measurements and traceability to the international

benchmark measure light irradiation this process is known as solar

calibration

IV characteristics of solar cell measurement method is to first use of

solar cells with the measured spectral response similar to the standard solar

cell to set the sun simulator under standard test conditions of irradiance and

then measured in the sun simulator under test solar cells IV characteristic

curve as measured with the standard solar cell solar cell spectral response

similar to so this alternative measurement method can overcome the out due

to the spectral distribution of solar simulator

281 CHINArsquoS SOLAR CELL TECHNOLOGY DEVELOPMENT

TEST

The seventies of last century Tianjin Institute in solar power research

and development applications at the same time invested considerable human

and material resources the establishment of a solar cell measuring

laboratory began solar cell calibration and testing of technology research

13

The main testing equipment including domestic and imported A-

grade solar simulator for the measurement of electrical properties and the

development of phase-locked amplification technology based on solar

spectral response measurement system

The initial goal was to establish an accurate solar as a standard

industry-wide baseline measurement of solar cells In the meantime a

variety of solar cell calibration technique has been fully developed mainly

including mountain calibration ground spectral calibration spectral

calibration laboratories aircraft calibration calibration of the space shuttle

and many other calibration techniques have been developed and tried and

eventually the formation of Tianjin Institute of the standard solar power

system and Tianjin Institute of the standard solar power in mainland China

has been widely promoted and applied

The early eighties Chinas solar cell testing technology has gradually

matured As an emerging industry the importance of products measurement

of the standardization work so organized industry-wide testing experts has

established a national solar photovoltaic energy systems Standardization

Committee specializing in solar cell measuring testing and product quality

standards of the drafting of and development work The initial goal is to

achieve the solar value products industry-wide unity has formulated the

solar cell calibration method general norms mono crystalline silicon

solar cells space-solar temperature coefficient measurement method

single crystal general norms of silicon solar cells on the ground with the

solar components of the environment experimental methods on the

ground with standard solar cells space with standard solar cells

14

282 CHINArsquoS SOLAR CELL TECHNOLOGY INTERNATIONAL

ADVANCED LEVEL TEST

The early nineties the state investment fund special transformation

transformation of Tianjin Institute of solar power testing laboratory to

establish a set of a standard solar cell measuring device Include the

laboratory a standard solar cell calibration system and two standard solar

value transfer systems greatly improves the level of the labs solar cell

testing and capacity On this basis the establishment of a Ministry of

Information Industry E-205 metering stations specializing in solar testing

Dell LATITUDE D410 Battery for the Chinese solar industry to provide

accurate

Value of solar cells is also a unity in the world to be a difficult

problem To this end the international advanced solar testing laboratory

trying to achieve through international comparison of the solar value unity

throughout the world The most famous and most successful of an

international alignment is PEP `93 solar cells compared to international

standards it is the US Department of Energy project By the United States

Renewable Energy Laboratory led 10 countries around the world have 13

well-known solar testing laboratories to participate

Each laboratory provides two standard solar cell calibration data is not

standard sample all 23 standard solar cell through a variety of laboratory

calibration back to back to form after the international solar cell base WPVS

(world photovoltaic scale) Tianjin Power Research Institute (MII 205

metering stations) participated in this sub-standard solar activities in the

international comparison

15

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 14: Sun Tracking System Using Micro Controller

The main testing equipment including domestic and imported A-

grade solar simulator for the measurement of electrical properties and the

development of phase-locked amplification technology based on solar

spectral response measurement system

The initial goal was to establish an accurate solar as a standard

industry-wide baseline measurement of solar cells In the meantime a

variety of solar cell calibration technique has been fully developed mainly

including mountain calibration ground spectral calibration spectral

calibration laboratories aircraft calibration calibration of the space shuttle

and many other calibration techniques have been developed and tried and

eventually the formation of Tianjin Institute of the standard solar power

system and Tianjin Institute of the standard solar power in mainland China

has been widely promoted and applied

The early eighties Chinas solar cell testing technology has gradually

matured As an emerging industry the importance of products measurement

of the standardization work so organized industry-wide testing experts has

established a national solar photovoltaic energy systems Standardization

Committee specializing in solar cell measuring testing and product quality

standards of the drafting of and development work The initial goal is to

achieve the solar value products industry-wide unity has formulated the

solar cell calibration method general norms mono crystalline silicon

solar cells space-solar temperature coefficient measurement method

single crystal general norms of silicon solar cells on the ground with the

solar components of the environment experimental methods on the

ground with standard solar cells space with standard solar cells

14

282 CHINArsquoS SOLAR CELL TECHNOLOGY INTERNATIONAL

ADVANCED LEVEL TEST

The early nineties the state investment fund special transformation

transformation of Tianjin Institute of solar power testing laboratory to

establish a set of a standard solar cell measuring device Include the

laboratory a standard solar cell calibration system and two standard solar

value transfer systems greatly improves the level of the labs solar cell

testing and capacity On this basis the establishment of a Ministry of

Information Industry E-205 metering stations specializing in solar testing

Dell LATITUDE D410 Battery for the Chinese solar industry to provide

accurate

Value of solar cells is also a unity in the world to be a difficult

problem To this end the international advanced solar testing laboratory

trying to achieve through international comparison of the solar value unity

throughout the world The most famous and most successful of an

international alignment is PEP `93 solar cells compared to international

standards it is the US Department of Energy project By the United States

Renewable Energy Laboratory led 10 countries around the world have 13

well-known solar testing laboratories to participate

Each laboratory provides two standard solar cell calibration data is not

standard sample all 23 standard solar cell through a variety of laboratory

calibration back to back to form after the international solar cell base WPVS

(world photovoltaic scale) Tianjin Power Research Institute (MII 205

metering stations) participated in this sub-standard solar activities in the

international comparison

15

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 15: Sun Tracking System Using Micro Controller

282 CHINArsquoS SOLAR CELL TECHNOLOGY INTERNATIONAL

ADVANCED LEVEL TEST

The early nineties the state investment fund special transformation

transformation of Tianjin Institute of solar power testing laboratory to

establish a set of a standard solar cell measuring device Include the

laboratory a standard solar cell calibration system and two standard solar

value transfer systems greatly improves the level of the labs solar cell

testing and capacity On this basis the establishment of a Ministry of

Information Industry E-205 metering stations specializing in solar testing

Dell LATITUDE D410 Battery for the Chinese solar industry to provide

accurate

Value of solar cells is also a unity in the world to be a difficult

problem To this end the international advanced solar testing laboratory

trying to achieve through international comparison of the solar value unity

throughout the world The most famous and most successful of an

international alignment is PEP `93 solar cells compared to international

standards it is the US Department of Energy project By the United States

Renewable Energy Laboratory led 10 countries around the world have 13

well-known solar testing laboratories to participate

Each laboratory provides two standard solar cell calibration data is not

standard sample all 23 standard solar cell through a variety of laboratory

calibration back to back to form after the international solar cell base WPVS

(world photovoltaic scale) Tianjin Power Research Institute (MII 205

metering stations) participated in this sub-standard solar activities in the

international comparison

15

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 16: Sun Tracking System Using Micro Controller

Through the screen near the end only four laboratories with the

average data is used as WPVS the value the four laboratories are NREL

(USA) JQA (Japan) PTB (Germany) and the Tianjin Institute of Power It

also has four laboratories in the world photovoltaic measurement for future

reference

Now this solar standard (WPVS) has become the worlds solar

industry widely used standards As the active promotion of Tianjin Institute

of Power Chinas solar industry is now widely used WPVS as a test The

value of a mention is that by this ratio of activities 205 solar cell testing

capacity metering station has been internationally peer recognition

Calibration of metering station already has 205 solar cells (production

standard) and transmission of solar standards 205 measuring stations are

also the Global Environment Facility China Renewable Energy

Development solar testing laboratory for the project is being carried out to

upgrade the capacity

283TIMES EQUIVALENT TO IEC STANDARD FOR USE

As an emerging industry solar product range and performance is

changing very fast corresponding solar cell testing technology has not been

able to keep up immediately For example the multi-junction solar cell

testing technology

In recent years China developed a new variety of multi-junction solar

cells for multi-junction solar cells solar cells if it is using the traditional test

equipment will produce incalculable test error

16

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 17: Sun Tracking System Using Micro Controller

Developing multi-junction solar cell is an urgent need testing

technology and development for multi-junction solar cell measurements

In addition with the expansion of industrial scale the entire industry

has with international standards and must therefore pay close attention to the

implementation of international standards as soon as tantamount to the

adoption of work Solar cells work is the standardization of the mainlands

solar industry to make greater sony vgp-bps9 laptop battery

29 TRACKING TECHNIQUES

There are several forms of tracking currently available these vary

mainly in the method of implementing the designs The two general forms of

tracking used are fixed control algorithms and dynamic tracking

The inherent difference between the two methods is the manner in

which the path of the sun is determined

In the fixed control algorithm systems the path of the sun is

determined by referencing an algorithm that calculates the position of the

sun for each time period That is the control system does not actively find

the suns position but works it out given the current time day month and

year The dynamic tracking system on the other hand actively searches for

the suns position at any time of day (or night)

Common to both forms of tracking is the control system This

system consists of some method of direction control such as DC motors

stepper motors and servo motors which are directed by a control circuit

either digital or Analog

17

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 18: Sun Tracking System Using Micro Controller

210 FUTURE HIRING PLANS

When asked to forecast future hiring nearly half of those responding

worldwide report that they anticipate adding few or no staff members or full-

time contractors to their work groups over the next year The outlook for

hiring in Asia however is considerably more optimistic than in the world as

a whole with 72 from that region anticipating their organizations will

increase work group headcount by 5 or more These hiring forecasts are in

line with the Asian respondentsrsquo statements about gearing up for RampD

within the next year

211 THE FUTURE POINTS TO GROWTH IN SOLAR CELL

PRODUCTION

Although the percentage of those reporting engagement in full-scale

production is relatively low today the number of manufacturers seems

destined to grow substantially over the next few years with 43 reporting

plans to move into full scale production in the next 12ndash36 months In

Europe EU mandates to increase the use of alternative energy sources and

high energy costs will likely continue to drive investments in research there

In North America the energy research and development portion of the US

economic stimulus bill (the American Recovery and Reinvestment Act of

2009) is likely to provide a boost to the nationrsquos solar industry

The situation in China is similar in that the Chinese government

included solar subsidies as part of its ldquogreenrdquo stimulus package These

subsidies have the potential to improve the profitability of producing and

selling solar cells for Chinese solar companies

18

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 19: Sun Tracking System Using Micro Controller

Given the staggering array of device technologies now being explored

or developed the industry seems poised to become larger and increasingly

competitive with manufacturers making significant investments in finding

new ways to extract the maximum energy at the lowest possible cost from

every photon that reaches their products Asian manufacturers appear firmly

committed to playing a major role in the worldwide solar cell industry

212 SHORT-CIRCUIT CURRENT (ISC)

The point at which the I-V curve crosses the x axis at zero volts

When a solar cell is operated at short circuit (that is when a low-resistance

connection is established by accident or intention between two points in an

electric circuit so the current tends to flow through the area of low

resistance bypassing the rest of the circuit) V = 0 and the current (I)

through the terminals is defined as the short-circuit current

2121 OPEN-CIRCUIT VOLTAGE (VOC)

The cell voltage at which there is zero current flow When a cell is

operated at open circuit (that is an incomplete electrical circuit in which no

current flows so I = 0) the voltage across the output terminals is defined as

the open-circuit voltage

Assuming the shunt resistance is high enough to neglect the final term

of the characteristic equation the open-circuit voltage (VOC) is

19

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 20: Sun Tracking System Using Micro Controller

2122 MAXIMUM POWER OUTPUT (PMAX)

The voltage and current point where the cell is generating its

maximum power The PMAX point on an I-V curve is often referred to as

the maximum power point (MPP)

2123 CURRENT AT MAXIMUM POWER (IMAX)

The cellrsquos current level at PMAX

2124 VOLTAGE AT MAXIMUM POWER (VMAX)

The cellrsquos voltage level at PMAX

2125 FILL FACTOR (FF)

PMAX divided by the VOC multiplied by ISC Fill factor is a popular

measurement because it indicates the cellrsquos efficiency under a specific

spectrum and intensity of light In essence it calculates the percentage of

performance of the real cell vs an ideal cell with no internal losses

2126 SHUNT RESISTANCE (RSHUNT)

RSHUNT can be thought of as leakage across the cell

20

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 21: Sun Tracking System Using Micro Controller

Any decrease in RSHUNT creates a more attractive leakage path

which allows more of the cell current and power to be lost This can be

caused by leakage in the interconnect but it is more often an effect of the

intrinsic cell design As the plot shows this percentage drop in current looks

like a change in slope on what should be the flat part of the I-V curve

2127 SERIES RESISTANCE (RSERIES)

An increase in series resistance will cause a cellrsquos efficiency to decrease

Intuitively one can think of RSERIES as taking voltage from the load as the

diode turns on Given that RSHUNT is much greater than RSERIES

RSERIES doesnrsquot normally affect the amount of current being delivered but

directly takes voltage from the load as it appears in series As RSERIES

increases cell efficiency decreases

2128 CONVERSION EFFICIENCY

The percentage of power converted (from absorbed light to electrical

energy) and collected when a solar cell is connected to an electrical circuit

This term is calculated by dividing Pmax by the input light irradiance (E in

Wm2 measured under standard test conditions) multiplied by the surface

area of the solar cell (AC in m2)

2129 DOPING DENSITY (N)

Doping density is an important property of any doped semiconductor

material Taken together information on doping density and resistivity

provide valuable information about the quality of a material By adding

assumptions about the consistency of the fabrication process itrsquos possible to

infer the electron mobility within the material Understanding the mobility

doping density and resistivity and eventually the changes over operating

temperatures can help you to refine your process

21

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 22: Sun Tracking System Using Micro Controller

21210 CELL RESISTIVITY (VAN DER PAUW RESISTIVITY OR

SURFACE RESISTIVITY)

There are two common methods for resistivity measurements on

semiconductor materials four-point collinear probe measurements and van

der Pauw resistivity measurements These techniques can be used to find the

surface resistivity and conductivity of the material itself which are

important in optimizing fabrication techniques

21211 DEFECT DENSITY

Defect density is a measure of defects (electrons or holes) in the

active region of the semiconductor material Drive Level Capacitance

Profiling (DLCP) is a new measurement technique used to characterize this

material property Understanding when defects appear in a semiconductor

material is important to refining a fabrication process

21212 CURRENT DENSITY

A measurement used in comparing the outputs of cells of different

sizes Current density refers to the amps of current produced per square

centimeter of cell area

21213 QUANTUM EFFICIENCY (QE)

The quantum efficiency of a solar cell is a measure of efficiency over

wavelength Changes in quantum efficiency might indicate different

processes occurring at the junction that would affect the cellrsquos efficiency

213 CONCLUDING REMARKS

After careful consideration of the forms of tracking available and

the methods of implementing each it was decided that the preferred tracking

system involved a microcontroller based dynamic tracking system using

stepper motors for alignment

22

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 23: Sun Tracking System Using Micro Controller

CHAPTER 3

P89V51RD2 MICROCONTROLLER

31 INTRODUCTION

It is a computer implemented on a single VLSI chip which contains

memory timer ADCDACDMA controllerparallel portserial portetc

Need for microcontroller is

Microprocessors require external memory

Microprocessors cannot interface directly with input or output devices

Glue logic such as address decoders and buffers is needed to interconnect

external memory and peripherals ICs with microprocessors

The differences between microcontroller and microprocessor is

Microprocessors have less bit handling instructions but microcontrollers

have many such instructions

Microprocessors are concerned with rapid movement of code and data

from external memory But microcontrollers is concerned with that of bits

within the chip

Of course Microprocessors needs additional chips for memory parallel

port timer etc and microcontrollers needs no such external ports

32 P89V51RD2 DESCRIPTION

The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and

1024 bytes of data RAM A key feature of the P89V51RD2 is its X2 mode

option The design engineer can choose to run the application with the

conventional 80C51 clock rate (12 clocks per machine cycle) or select the

X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the

same clock frequency

23

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 24: Sun Tracking System Using Micro Controller

Another way to benefit from this feature is to keep the same

performance by reducing the clock frequency by half thus dramatically

reducing the EMI The Flash program memory supports both parallel

programming and in serial

In-System Programming (ISP) Parallel programming mode offers

gang-programming at high speed reducing programming costs and time to

market ISP allows a device to be reprogrammed in the end product under

software control The capability to fieldupdate the application firmware

makes a wide range of applications possible The P89V51RD2 is also In-

Application Programmable (IAP) allowing the Flash program memory to be

reconfigured even while the application is running

This device has the option of storing a 31-byte serial number along

with the length of the serial number (for a total of 32 bytes) in a non-volatile

memory space When ISP mode is entered the serial number length is

evaluated to determine if the serial number is in use If the length of the

serial number is programmed to either 00H or FFH the serial number is

considered not in use

If the serial number is in use reading programming or erasing of the

user code memory or the serial number is blocked until the user transmits a

lsquoverify serial numberrsquo record containing a serial number and length that

matches the serial number and length previously stored in the device The

user can reset the serial number to all zeros and set the length to zero by

sending the lsquoreset serial number record In addition the lsquoreset serial

numberrsquo record will also erase all user code

24

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 25: Sun Tracking System Using Micro Controller

33 FEATURES

80C51 Central Processing Unit

5 V Operating voltage from 0 to 40 MHz

64 kB of on-chip Flash program memory with ISP (In-System

Programming) and IAP (In-Application Programming)

Supports 12-clock (default) or 6-clock mode selection via software

or ISP

SPI (Serial Peripheral Interface) and enhanced UART

PCA (Programmable Counter Array) with PWM and

CaptureCompare functions

Four 8-bit IO ports with three high-current Port 1 pins (16 mA

each)

Three 16-bit timerscounters

Programmable Watchdog timer (WDT)

Eight interrupt sources with four priority levels

Second DPTR register

Low EMI mode (ALE inhibit)

TTL- and CMOS-compatible logic levels

Brown-out detection

Low power modes

Power-down mode with external interrupt wake-up

25

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 26: Sun Tracking System Using Micro Controller

34 BLOCK DIAGRAM OF P89V51RD2

26

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 27: Sun Tracking System Using Micro Controller

35 PIN DIAGRAM

27

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 28: Sun Tracking System Using Micro Controller

36 SPECIAL FUNCTION REGISTERS

Special Function Registers (SFRs) accesses are restricted in the

following ways

User must not attempt to access any SFR locations not defined

Accesses to any defined SFR locations must be strictly for the

functions for the SFRs

SFR bits labeled lsquo-rsquo lsquo0rsquo or lsquo1rsquo can only be written and read as

follows

Unless otherwise specified must be written with lsquo0rsquo but can

return any value when read (even if it was written with lsquo0rsquo) It

is a reserved bit and may be used in future derivatives

lsquo0rsquo must be written with lsquo0rsquo and will return a lsquo0rsquo when read

lsquo1rsquo must be written with lsquo1rsquo and will return a lsquo1rsquo when read

37 IN-SYSTEM PROGRAMMING (ISP)

In-System Programming is performed without removing the

microcontroller from the system The In-System Programming facility

consists of a series of internal hardware resources coupled with internal

firmware to facilitate remote programming of the P89V51RD2 through the

serial port This firmware is provided by Philips and embedded within each

P89V51RD2 device The Philips In-System Programming facility has made

in-circuit programming in an embedded application possible with a

minimum of additional expense in components and circuit board area The

ISP function uses five pins (VDDVSS TxD RxD and RST)

28

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 29: Sun Tracking System Using Micro Controller

371 USING THE IN-SYSTEM PROGRAMMING

The ISP feature allows for a wide range of baud rates to be used in

your application independent of the oscillator frequency It is also

adaptable to a wide range of oscillator frequencies This is accomplished by

measuring the bit-time of a single bit in a received character This

information is then used to program the baud rate in terms of timer counts

based on the oscillator frequency The ISP feature requires that an initial

character (an uppercase U) be sent to the P89V51RD2 to establish the baud

rate The ISP firmware provides auto-echo of received characters Once

baud rate initialization has been performed the ISP firmware will only

accept Intel Hex-type records

In the Intel Hex record the lsquoNNrsquo represents the number of data bytes

in the record The P89V51RD2 will accept up to 32 data bytes The

lsquoAAAArsquo string represents the address of the first byte in the record If there

are zero bytes in the record this field is often set to 0000 The lsquoRRrsquo string

indicates the record type A record type of lsquo00rsquo is a data record A record

type of lsquo01rsquo indicates the end-of-file mark In this application additional

record types will be added to indicate either commands or data for the ISP

facility

The maximum number of data bytes in a record is limited to 32

(decimal) ISP commands are summarized As a record is received by the

P89V51RD2 the information in the record is stored internally and a

checksum calculation is performed

29

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 30: Sun Tracking System Using Micro Controller

The operation indicated by the record type is not performed until the

entire record has been received Should an error occur in the checksum the

P89V51RD2 will send an lsquoXrsquo out the serial port indicating a checksum

error

38 FLASH ORGANIZATION

The P89V51RD2 program memory consists of a 64kB block An

InSystem Programming (ISP) capability in a second 8kB block is provided

to allow the user code to be programmed in-circuit through the serial port

There are three methods of erasing or programming of the Flash memory

that may be used

First the Flash may be programmed or erased in the end-user

application by calling low-level routines through a common entry point

(IAP) Second the on-chip ISP boot loader may be invoked This ISP boot

loader will in turn call low-level routines through the same common entry

point that can be used by the end-user application Third the Flash may be

programmed or erased using the parallel method by using a commercially

available EPROM programmer which supports this device

381 BOOT BLOCK

When the microcontroller programs its own Flash memory all of the

low level details are handled by code that is contained in a Boot block that

is separate from the user Flash memory A user program calls the common

entry point in the Boot block with appropriate parameters to accomplish the

desired operation Boot block operations include erase user code program

user code program security bits etc A Chip-Erase operation can be

performed using a commercially available parallel programer

30

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 31: Sun Tracking System Using Micro Controller

382 POWER-ON RESET CODE EXECUTION

Following reset the P89V51RD2 will either enter the SoftICE mode

(if previously enabled via ISP command) or attempt to autobaud to the ISP

boot loader If this autobaud is not successful within about 400 ms the

device will begin execution of the user code

383 FLASH PROGRAM MEMORY

There are two internal ash memory blocks in the device Block 0 has

64kbytes and contains the userrsquos code Block 1 contains the Philips-

provided ISPIAP routines and may be enabled such that it overlays the first

8kbytes of the user code memory The 64kB Block 0 is organized as 512

sectors each sector consists of 128 bytes

384 DATA RAM MEMORY

The data RAM has 1024 bytes of internal memory The device can

also address up to 64kB for external data memory

385 EXPANDED DATA RAM ADDRESSING

The P89V51RD2 has 1kB of RAM ldquoInternal and external data

memory structurerdquo

The device has four sections of internal data memory

1 The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly

addressable

2 The higher 128 bytes of RAM (80H to FFH) are indirectly addressable

3 The special function registers (80H to FFH) are directly addressable only

4 The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable

by the move external instruction (MOVX) and clearing the EXTRAM bit

31

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 32: Sun Tracking System Using Micro Controller

CHAPTER 4

METHODOLOGY AND DESIGN

41 INTRODUCTION

When beginning the design for the tracking system a TOPDOWN

approach was used to break the project into separate tasks Taking the

project as a whole it involves reading voltages from a sensor array then

comparing these voltages digitally to determine the direction the array must

move to align itself with the sun To perform this movement a motor circuit

is needed to receive output from the controller and step the motors

accordingly The following sections of this chapter outline the methods and

designs used to implement this system

42 METHOD OF ALIGNMENT

Before the design of the sensing circuit can be considered it is

necessary to choose an appropriate method of alignment There are two

feasible methods for aligning the array The first method involves tilting the

array in two axes to maintain the required position illustrated in Figure 4(a)

The second method involves rotating and tilting the array toachieve the same

result illustrated in Figure 4(b)

32

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 33: Sun Tracking System Using Micro Controller

43 DRIVER CIRCUIT

In applications where absolute positioning is important the drive

electronics must calibrate the motor position

This is may be done by

Driving the motor all the way in one direction until it encounter a

mechanical stop

Driving the motor all the way in one direction until it triggers a

ldquolimit switchrdquo

Using some form of feed back such as the current track number on

a disk

431 DESCRIPTION OF ULN2003

The ULN2003 is a monolithic high voltage and high current

Darlington transistor arrays It consists of seven NPN darlington pairs that

features high-voltage outputs with common-cathode clamp diode for

switching inductive loads The collector-current rating of a single darlington

pair is 500mA The darlington pairs may be parrlleled for higher current

capability Applications include relay drivershammer drivers

33

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 34: Sun Tracking System Using Micro Controller

lampdriversdisplay drivers(LED gas discharge)line drivers and logic

buffers The ULN2003 has a 27kW series base resistor for each darlington

pair for operation directly with TTL or 5V CMOS devices

432 FEATURES

500mA rated collector current(Single output)

High-voltage outputs 50V

Inputs compatibale with various types of logic

433LOGIC DIAGRAM OF ULN2003

34

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 35: Sun Tracking System Using Micro Controller

44 STEPPER MOTOR

A stepper motor (or step motor) is a brushless synchronous electric

motor that can divide a full rotation into a large number of steps The

motors position can be controlled precisely without any feedback

mechanism Stepper motors are similar to switched reluctance motors

(which are very large stepping motors with a reduced pole count

441 FUNDAMENTALS OF OPERATION

Stepper motors operate differently from DC brush motors which

rotate when voltage is applied to their terminals Stepper motors on the

other hand effectively have multiple toothed electromagnets arranged

around a central gear-shaped piece of iron An external control circuit such

as a microcontroller energizes the electromagnets To make the motor shaft

turn first one electromagnet is given power which makes the gears teeth

magnetically attracted to the electromagnets teeth When the gears teeth are

thus aligned to the first electromagnet they are slightly offset from the next

electromagnet So when the next electromagnet is turned on and the first is

turned off the gear rotates slightly to align with the next one and from there

the process is repeated Each of those slight rotations is called a step with

35

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 36: Sun Tracking System Using Micro Controller

an integer number of steps making a full rotation In that way the motor can

be turned by a precise angle

442 STEPPER MOTOR CHARACTERISTICS

1 Stepper motors are constant power devices

2 As motor speed increases torque decreases

3 The torque curve may be extended by using current limiting drivers and

increasing the driving voltage

4 Steppers exhibit more vibration than other motor types as the discrete

step tends to snap the rotor from one position to another

5 This vibration can become very bad at some speeds and can cause the

motor to lose torque

6 The effect can be mitigated by accelerating quickly through the problem

speeds range physically damping the system or using a micro-stepping

driver

7 Motors with a greater number of phases also exhibit smoother operation

than those with fewer phases

443 OPEN-LOOP VERSUS CLOSED-LOOP COMMUTATION

Steppers are generally commutated open loop ie the driver has no

feedback on where the rotor actually is Stepper motor systems must thus

generally be over engineered especially if the load inertia is high or there is

widely varying load so that there is no possibility that the motor will lose

steps This has often caused the system designer to consider the trade-offs

between a closely sized but expensive servomechanism system and an

oversized but relatively cheap stepper

36

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 37: Sun Tracking System Using Micro Controller

A new development in stepper control is to incorporate a rotor

position feedback (eg an encoder or resolver) so that the commutation can

be made optimal for torque generation according to actual rotor position

This turns the stepper motor into a high pole count brushless servo motor

with exceptional low speed torque and position resolution An advance on

this technique is to normally run the motor in open loop mode and only

enter closed loop mode if the rotor position error becomes too large -- this

will allow the system to avoid hunting or oscillating a common servo

problem

444 THERE ARE THREE MAIN TYPES OF STEPPER MOTORS

Permanent Magnet Stepper

Hybrid Synchronous Stepper

Variable Reluctance Stepper

Permanent magnet motors use a permanent magnet (PM) in the rotor

and operate on the attraction or repulsion between the rotor PM and the

stator electromagnets Variable reluctance (VR) motors have a plain iron

rotor and operate based on the principle of that minimum reluctance occurs

with minimum gap hence the rotor points are attracted toward the stator

magnet poles Hybrid stepper motors are named because they use use a

combination of PM and VR techniques to achieve maximum power in a

small package size

445 TWO-PHASE STEPPER MOTORS

There are two basic winding arrangements for the electromagnetic

coils in a two phase stepper motor bipolar and unipolar

4451 UNIPOLAR MOTORS

37

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 38: Sun Tracking System Using Micro Controller

A unipolar stepper motor has two windings per phase one for each

direction of magnetic field Since in this arrangement a magnetic pole can be

reversed without switching the direction of current the commutation circuit

can be made very simple (eg a single transistor) for each winding

Typically given a phase one end of each winding is made common giving

three leads per phase and six leads for a typical two phase motor Often

these two phase commons are internally joined so the motor has only five

leads

A microcontroller or stepper motor controller can be used to activate the

drive transistors in the right order and this ease of operation makes unipolar

motors popular with hobbyists they are probably the cheapest way to get

precise angular movements

Unipolar stepper motor coils

A quick way to determine if the stepper motor is working is to short

circuit every two pairs and try turning the shaft whenever a higher than

normal resistance is felt it indicates that the circuit to the particular winding

is closed and that the phase is working

4452 BIPOLAR MOTOR

38

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 39: Sun Tracking System Using Micro Controller

Bipolar motors have a single winding per phase The current in a

winding needs to be reversed in order to reverse a magnetic pole so the

driving circuit must be more complicated typically with an H-bridge

arrangement There are two leads per phase none are common

Static friction effects using an H-bridge have been observed with

certain drive topologies Because windings are better utilised they are more

powerful than a unipolar motor of the same weight

An 8 lead stepper is wound like a unipolar stepper but the leads are

not joined to common internally to the motor

Bipolar with series windings This gives higher inductance but lower

current per winding

Bipolar with parallel windings This requires higher current but can

perform better as the winding inductance is reduced

Bipolar with a single winding per phase This method will run the

motor on only half the available windings which will reduce the available

low speed torque but require less current

Multi-phase stepper motors with many phases tend to have much

lower levels of vibration although the cost of manufacture is higher

45 STEPPER MOTOR DRIVE CIRCUITS

Stepper motor performance is strongly dependent on the drive circuit

Torque curves may be extended to greater speeds if the stator poles can be

reversed more quickly the limiting factor being the winding inductance To

overcome the inductance and switch the windings quickly one must increase

the drive voltage This leads further to the necessity of limiting the current

that these high voltages may otherwise induce

39

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 40: Sun Tracking System Using Micro Controller

451 LR DRIVE CIRCUITS

LR drive circuits are also referred to as constant voltage drives

because a constant positive or negative voltage is applied to each winding to

set the step positions However it is winding current not voltage that applies

torque to the stepper motor shaft The current I in each winding is related to

the applied voltage V by the winding inductance L and the winding

resistance R

The resistance R determines the maximum current according to

Ohms law I=VR The inductance L determines the maximum rate of

change of the current in the winding according to the formula for an Inductor

dIdt = VL Thus when controlled by an LR drive the maximum speed of a

stepper motor is limited by its inductance since at some speed the voltage V

will be changing faster than the current I can keep up

With an LR drive it is possible to control a low voltage resistive

motor with a higher voltage drive simply by adding an external resistor in

series with each winding This will waste power in the resistors and

generate heat It is therefore considered a low performing option albeit

simple and cheap

452 CHOPPER DRIVE CIRCUITS

Chopper drive circuits are also referred to as constant current drives

because they generate a somewhat constant current in each winding rather

than applying a constant voltage On each new step a very high voltage is

40

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 41: Sun Tracking System Using Micro Controller

applied to the winding initially This causes the current in the winding to rise

quickly since dIdt = VL where V is very large The current in each winding

is monitored by the controller usually by measuring the voltage across a

small sense resistor in series with each winding

When the current exceeds a specified current limit the voltage is

turned off or chopped typically using power transistors When the

winding current drops below the specified limit the voltage is turned on

again In this way the current is held relatively constant for a particular step

position This requires additional electronics to sense winding currents and

control the switching but it allows stepper motors to be driven with higher

torque at higher speeds than LR drives Integrated electronics for this

purpose are widely available

A stepper motor is a polyphase AC synchronous motor and it is

ideally driven by sinusoidal current A full step waveform is a gross

approximation of a sinusoid and is the reason why the motor exhibits so

much vibration Various drive techniques have been developed to better

approximate a sinusoidal drive waveform these are half stepping and

microstepping

Full step drive is the usual method for full step driving the motor

Both phases are always on The motor will have full rated torque

453 WAVE DRIVE

In this drive method only a single phase is activated at a time It has

the same number of steps as the full step drive but the motor will have

significantly less than rated torque It is rarely used

41

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 42: Sun Tracking System Using Micro Controller

454 HALF STEPPING

When half stepping the drive alternates between two phases on and a

single phase on This increases the angular resolution but the motor also has

less torque at the half step position (where only a single phase is on) This

may be mitigated by increasing the current in the active winding to

compensate The advantage of half stepping is that the drive electronics need

not change to support it

455 MICROSTEPPING

What is commonly referred to as microstepping is actual sine cosine

microstepping in which the winding current approximates a sinusoidal AC

waveform Sine cosine microstepping is the most common form but other

waveforms are used Regardless of the waveform used as the microsteps

become smaller motor operation becomes more smooth thereby greatly

reducing resonance in any parts the motor may be connected to as well as

the motor itself It should be noted that while microstepping appears to make

running at very high resolution possible this resolution is rarely achievable

in practice regardless of the controller due to mechanical stiction and other

sources of error between the specified and actual positions In professional

equipment gearheads are the preferred way to increase angular resolution

Step size repeatability is an important step motor feature and a

fundamental reason for their use in positioning Example many modern

hybrid step motors are rated such that the travel of every Full step (example

18 Degrees per Full step or 200 Full steps per revolution) will be within 3

42

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 43: Sun Tracking System Using Micro Controller

or 5 of the travel of every other Full step as long as the motor is operated

with in its specified operating ranges Several manufacturers show that their

motors can easily maintain the 3 or 5 equality of step travel size as step

size is reduced from Full stepping down to 110th stepping Then as the

microstepping divisor number grows step size repeatability degrades At

large step size reductions it is possible to issue many microstep commands

before any motion occurs at all and then the motion can be a jump to a

new position

46 THEORY

A step motor can be viewed as a synchronous AC motor with the

number of poles (on both rotor and stator) increased taking care that they

have no common denominator Additionally soft magnetic material with

many teeth on the rotor and stator cheaply multiplies the number of poles

(reluctance motor) Modern steppers are of hybrid design having both

permanent magnets and soft iron cores

To achieve full rated torque the coils in a stepper motor must reach

their full rated current during each step Winding inductance and reverse

EMF generated by a moving rotor tend to resist changes in drive current so

that as the motor speeds up less and less time is spent at full current -- thus

reducing motor torque As speeds further increase the current will not reach

the rated value and eventually the motor will cease to produce torque

47 APPLICATIONS

Computer-controlled stepper motors are one of the most versatile

forms of positioning systems They are typically digitally controlled as part

43

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 44: Sun Tracking System Using Micro Controller

of an open loop system and are simpler and more rugged than closed loop

servo systems

Industrial applications are in high speed pick and place equipment and

multi-axis machine CNC machines often directly driving lead screws or

ballscrews In the field of lasers and optics they are frequently used in

precision positioning equipment such as linear actuators linear stages

rotation stages goniometers and mirror mounts Other uses are in packaging

machinery and positioning of valve pilot stages for fluid control systems

Commercially stepper motors are used in floppy disk drives flatbed

scanners computer printers plotters slot machines and many more devices

48 SENSOR CIRCUIT

LIGHT DEPENDENT RESISTOR

A photoresistor or light dependent resistor or cadmium sulfide (CdS)

cell is a resistor whose resistance decreases with increasing incident light

intensity It can also be referenced as a photoconductor

A photoresistor very is made of a high resistance semiconductor If

light falling on the device is of high enough frequency photons absorbed by

the semiconductor give bound electrons enough energy to jump into the

conduction band The resulting free electron (and its hole partner) conduct

electricity thereby lowering resistance

44

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 45: Sun Tracking System Using Micro Controller

A photoelectric device can be either intrinsic or extrinsic An intrinsic

semiconductor has its own charge carriers and is not an efficient

semiconductor eg silicon

In intrinsic devices the only available electrons are in the valence

band and hence the photon must have enough energy to excite the electron

across the entire bandgap Extrinsic devices have impurities also called

dopants added whose ground state energy is closer to the conduction band

since the electrons do not have as far to jump lower energy photons (ie

longer wavelengths and lower frequencies) are sufficient to trigger the

device If a sample of silicon has some of its atoms replaced by phosphorus

atoms (impurities) there will be extra electrons available for conduction

This is an example of an extrinsic semiconductor

A photoresistor is a sensor whose resistance varies with light

intensity Most decrease in resistance as the light intensity increases In a

typical microcontroller application this resistance must be converted to a

voltage so that an A2D converter can measure it The easiest way to do this

is with a voltage divider circuit

A voltage divider is just two resistors in series connected between a

voltage supply and ground

45

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 46: Sun Tracking System Using Micro Controller

If R1 is connected to the voltage supply and R2 is connected to

ground then the voltage at the junction between the two resistors is

If R1 is the photoresistor the voltage will increase with increasing

light intensity If R2 is the photoresistor the voltage will decrease with

increasing light intensity

481 SENSOR DESIGN

To design the sensor circuit a suitable method for determining the

position of the sun was needed This involved a process of design and testing

to establish the most efficient and accurate method After testing several

designs the most effective design was found to be a simple opposites of

sensor

The sensors are arranged so that the voltage across each sensor is the

same when the LDR points at the sun This is possible because the sensors

are set at 45o to the base of the pyramid Hence when the LDR is not

pointing at the sun the voltage will increase on the side that is most exposed

to the sun This allows for a simple comparison to determine the direction in

which the array must move

To simplify the comparison even more two opposing sensors are

dedicated to rotating and two are dedicated to tilting Due to the fact that the

controller reads the voltage output from the sensors it is necessary to set the

operating range of the sensors to an appropriate voltage range To

accomplish this the output of the sensors must be sent to an amplifier circuit

that will deliver the required voltage range to the controller

46

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 47: Sun Tracking System Using Micro Controller

482 APPLICATIONS

Photoresistors come in many different types Inexpensive cadmium

sulfide cells can be found in many consumer items such as camera light

meters street lights clock radios alarms and outdoor clocks

They are also used in some dynamic compressors together with a

small incandescent lamp or light emitting diode to control gain reduction

Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light

dependent resistor) are used for the mid infrared spectral region GeCu

photoconductors are among the best far-infrared detectors available and are

used for infrared astronomy and infrared spectroscopy

49 TRACKING CONTROLLER

491 CHOICE OF CONTROL CHIP

When choosing a controller chip for the tracking system it was

important to consider the functions it would need to perform The controller

also needs the capacity to handle inputs from the user interface and the

outputs to the stepper motor control circuit These inputs and outputs need to

be clarified before the controller is chosen

After researching an appropriate control chip the P89V51RD2 micro-

controller was found to be the preferred choice as it can perform all required

functions using only a single chip The chip contains an adequate

programmable memory space ample input and output pins and a supply

voltage of five volts

492 READING SENSORS

The P89V51RD2 has an adjustable voltage reference range for the

LDR The amplifier circuit for the sensor voltage inputs was chosen to

supply between zero and five volts

47

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 48: Sun Tracking System Using Micro Controller

After setting the required gain on the amplifiers the circuit outputs

five volts when the sensors are normal to the incident rays and outputs zero

volts when the sensors receive no light Refer to Appendix B for the

schematic diagram of the amplifier circuit

493 FLOWCHART

48

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 49: Sun Tracking System Using Micro Controller

410 CONCLUDING REMARKS

For a detailed description of the controller program refer to Appendix

A The control circuit including the sensor voltage amplifier circuit the

P89V51RD2 and attachments circuit and the stepper motor driver circuit

has been implemented on a Printed Circuit Board (PCB) which is shown in

Appendix C The schematic diagram of this circuit is shown in Appendix B

CHAPTER 5

49

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 50: Sun Tracking System Using Micro Controller

ANALYSIS OF DESIGN

51 INTRODUCTION

Testing the design of the Tracking system involved breaking the

project up into the same tasks as used when designing the system The

various sections of the design were first tested separately by writing two test

programs for the 68HC11A1 processor The first test was for the user

interface and stepper motors to test that the manual controls stepped the

motors correctly The second test checked that the AD converter was

correctly functioning After both test programs worked the final program

was then loaded and tested

52 CURRENT RECEIVED TRACKED VS STATIONARY ARRAY

To test the accuracy of the tracking system the amount of current

delivered by a single solar cell was measured during the course of a day A

50

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 51: Sun Tracking System Using Micro Controller

set of measurements was taken for a stationary array set in the stowed

position (array surface horizontal) as well as for Sun Tracking System

Stationary

Here above table considered as differences of fixed solar panal and

variable solar amptook the reading between them Rotating solar panel of total

ampaverage value is greater than the fixed solar panel

53 CONCLUDING REMARKS

From Figure 8 it is apparent that the sun tracking system supplies

a greater average current supply that is almost constant throughout the day

The drop in intensity of the incident light can account for the slight drop in

readings at the beginning and end of the day

CHAPTER 6

LITERATURE REVIEW

51

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 52: Sun Tracking System Using Micro Controller

In remote areas the sun is a cheap source of electricity because instead

of hydraulic generators it uses solar cells to produce electricity While the

output of solar cells depends on the intensity of sunlight and the angle of

incidence It means to get maximum efficiency the solar panels1 must

remain in front of sun during the whole day But due to rotation of earth

those panels canrsquot maintain their position always in front of sun This

problem results in decrease of their efficiency Thus to get a constant output

an automated system is required which should be capable to constantly

rotate the solar panel

The Automatic Sun Tracking System (ASTS) was made as a

prototype to solve the problem mentioned above It is completely automatic

and keeps the panel in front of sun until that is visible The unique feature of

this system is that instead of taking the earth as its reference it takes the sun

as a guiding source Its active sensors constantly monitor the sunlight and

rotate the panel towards the direction where the intensity of sunlight is

maximum In case the sun gets invisible eg in cloudy weather then without

tracking the sun the ASTS keeps rotating the solar panel in opposite

direction to the rotation of earth

Renewable energy is rapidly gaining importance as an energy

resource as fossil fuel prices fluctuate At the educational level it is

therefore critical for engineering and technology students to have an

understanding and appreciation of the technologies associated with

renewable energy

One of the most popular renewable energy sources is solar energy

Many researches were conducted to develop some methods to increase the

efficiency of Photo Voltaic systems (solar panels) One such method is to

employ a solar panel tracking system This project deals with a micro

52

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 53: Sun Tracking System Using Micro Controller

controller based solar panel tracking system Solar tracking enables more

energy to be generated because the solar panel is always able to maintain a

perpendicular profile to the sunrsquos rays

Development of solar panel tracking systems has been ongoing for

several years now As the sun moves across the sky during the day it is

advantageous to have the solar panels track the location of the sun such that

the panels are always perpendicular to the solar energy radiated by the sun

This will tend to maximize the amount of power absorbed by PV systems

It has been estimated that the use of a tracking system over a fixed

system can increase the power output by 30 - 60 The increase is

significant enough to make tracking a viable preposition despite of the

enhancement in system cost It is possible to align the tracking heliostat

normal to sun using electronic control by a micro controller

Design requirements are

1 During the time that the sun is up the system must follow the sunrsquos

position in the sky

2 This must be done with an active control timed movements are

wasteful It should be totally automatic and simple to operate The

operator interference should be minimal and restricted to only when it

is actually required

EXISTING SYSTEM

In the existing system we used the solar panel as keep as stable

53

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 54: Sun Tracking System Using Micro Controller

Such solar panel is fixed on the roof tops and it did not rotate

If the light intensity is decreased in the environment solar battery went to

low energy state

At this state we lost the power

PROPOSED SYSTEM

In the proposed system we have to use the microcontroller based

stepper motor with multiple sensors

Sensors are fixed at the different angles such like that ldquo -180 to +180rdquo

degrees

The unique feature of this system is that instead of taking the earth as

its reference it takes the sun as a guiding source

Sensors(LDR) are connected with the stepper motor using

microcontroller

So if the intensity is decreased then sensor sense the maximum light

intensity in environment

Automatically it rotates at small angles as per the sensing

So at this state we cannot lose the power because of it is sensing

towards the sunrsquos position

CHAPTER 7

CONCLUSIONS AND SUGGESTIONS

54

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 55: Sun Tracking System Using Micro Controller

71 CONCLUDING REMARKS ON THE TRACKING SYSTEM

After examining the information obtained in the data analysis

section it can be said that the proposed sun tracking solar array system is a

feasible method of maximizing the energy received from solar radiation The

controller circuit used to implement this system has been designed with a

minimal number of components and has been integrated onto a single PCB

for simple assembly The pyramid sensor design enables the device to be

attached to solar panels The use of stepper motors enables accurate tracking

of the sun while keeping track of the arrays current position in relation to its

initial position Manual control allows the user to set the arrays initial (or

reset) position as well as make it possible to easily service the array surface

for cleaning or replacing damaged cells

72 APPLICATIONS

The sun tracking solar array system can be used for any application

that currently uses solar energy It is ideal for hot water systems and other

domestic applications where long-term efficiency is preferred

73 FUTURE DESIGN PROPOSALS

Future design proposals include but are not limited to an auto-

battery supply that runs off the solar array and a heat management system to

cool solar cells for improved efficiency

731 SUGGESTED AREAS OF FURTHER RESEARCH

The research are that would prove most beneficial would be heat

management as it was found during the design stage and testing that the

efficiency of the cells varies considerably with varying heat conditions

8 BIBLIOGRAPHY

55

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 56: Sun Tracking System Using Micro Controller

[1] Sze SM Physics of semiconductor devices 2nd Ed New York Wiley

1981 pp 791-835

[2] Chapin DM Fuller CS and Pearson GL A New Silicon p-n

Junction Photocel for Converting Solar Radiation into Electrical Power J

Appl Phys 1954 25 676

[3] Koyuncu b and Balasubramanian K A microprocessor controlled

automatic sun tracker

[5]Piao Z GPark J MA study on the tracking photovoltaic system by

programme type

[6]Yousef H ADesign and implementation of a Fuzzy Logic Computer-

Controlled Sun tracking system

[7]SaxenaA K DuttaA Versatile microcontroller based solar tracking

system

[8]Beckman William A and Duffie John A Solar Engineering of Thermal

Processes 2nd Ed John Wiley and Sons Inc 1991 pp768-793

[9]1048698 Zweibel Ken Harnessing Solar Power The Photovoltaics Challenge

Plenum Press New York and London 1990

56

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 57: Sun Tracking System Using Micro Controller

Appendix I

includereg52h

sbit sen1=P1^0

sbit sen2=P1^1

sfr stepmtr=0x80

sbit sen=P3^0

void stepfwd(void)

void Delay(unsigned int i)

void steprew(void)

void main()

P1=0xFF

P0=0xFF

P3=0xFF

while(1)

if(sen1==1ampampsen2==0)

stepfwd()

else if(sen1==0ampampsen2==1)

steprew()

72

57

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 58: Sun Tracking System Using Micro Controller

else

P0=0x00

void stepfwd(void)

stepmtr=0x80

while(sen==1)

Delay(6500)

stepmtr=0x40

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x10

Delay(6500)

void steprew(void)

stepmtr=0x10

while(sen==1)

Delay(6500)

stepmtr=0x20

Delay(6500)

stepmtr=0x40

Delay(6500)

58

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 59: Sun Tracking System Using Micro Controller

stepmtr=0x80

Delay(6500)

void Delay(unsigned int i)

while(i--)

59

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 60: Sun Tracking System Using Micro Controller

Appendix II

SCHEMATIC DIAGRAM

60

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61

Page 61: Sun Tracking System Using Micro Controller

LIST OF ABBREVIATIONSPVC Photo Voltaic CellsWPVS World Photo Voltaic ScaleISC Short Circuit CurrentVOC Open Circuit VoltageQE Quantum EfficiencyDPTR Data PointerALE Address Latch EnablePCA Programmable Counter ArrayVRM Variable Reluctance MotorPMM Permanent Magnet MotorMPP Maximum Power PointFF Fill FactorDLCP Drive Level Capacity ProfileISP In System ProgrammingIAP In Application ProgrammingSPI Serial Peripheral InterfacePCA Programmable Counter ArrayWDT Watch Dog TimerSFR Special Function RegistersLDR Light Dependent RegistersASTS Automatic Sun Tracking System

61