You are on page 1of 34

NATIONAL UNIVERSITY OF COMPUTER & EMERGING SCIENCES, FAST

DEPARTMENT OF ELECTRICAL ENGINEERING



Solar Thermal Power System

PROJECT REPORT
SUBMITTED BY
Faiq Ahmed (10-6313)
Shoaib Ahmed Khan (10-6317)
Ammar Masood (10-6304)

Bachelors in Electrical Engineering
Year 2013
PROJECT SUPERVISOR
Sir, Mr. Rehmatullah Kundi
DEPARTMENT OF ELECTRICAL ENGINEERING
160-Industrial Estate Jamrud Road, Peshawar






ACKNOWLEDGEMENTS

We are humbly grateful to ALMIGHTY ALLAH that with His will and help we were able to
successfully achieve our project and then to our parents that with their prayers and support in
thin and thick time of life we were able to achieve our goal.

We will like to give special credit to our supervisor Mr. Rehmatullah Kundi that with his advice,
intellectual abilities and full time support at each building step we never got wrong footed and
pursued the right direction for successfully achieving our goal.

DECLARATION

We hereby declare that no portion of the work referred to in this Project Thesis has been
submitted in support of an application for another degree or qualification of this of any other
university or other institute of learning. If any act of plagiarism found, we are fully responsible
for every disciplinary action taken against us depending upon the seriousness of the proven
offence.












COPYRIGHT STATEMENT

Copyright in text of this thesis rests with the student author. Copies (by any process) either in
full, or of extracts, may be made only in accordance with instructions given by the author and
lodged in the Library of NUCES-FAST (Peshawar) department of EE. Details may be obtained
by the Librarian. This page must form part of any such copies made. Further copies (by any
process) of copies made in accordance with such instructions may not be made without the
permission (in writing) of the author.
The ownership of any intellectual property rights which may be described in this thesis is vested
in NUCES-FAST (Peshawar) department of EE, subject to any prior agreement to the contrary,
and may not be made available for use by third parties without the written permission of the
department of EE, which will prescribe the terms and conditions of any such agreement.
Further information on the conditions under which disclosures and exploitation may take place is
available from the Library of NUCES-FAST (Peshawar) department of EE.
Group Members:
Shoaib Ahmed Ammar Masood Faiq Ahmed


Project Supervisor
Prof. Mr. Rehmatullah Kundi


Signature ___________


FYP Coordinator
Prof. Mr. Ahmad Saeed Qazi


Signature__________

Verified By:
Prof. Mr. Ahmed Saeed Qazi
Head of Department Of Electrical Engineering

Signature_________________________
ABSTRACT
The motivation behind the designing of solar thermal power system was to get familiar to each
aspect of the voltage generation though a parabolic trough design because of the extraordinary
increasing demand of fuel energy in our country. In our project we tried our level best design the
complete project of solar thermal power system based on the layouts of leading Solar energy
Institutes such as NREL(National Renewable Energy Laboratory) ,SANDIA National
laboratory, SUN labs. We successfully simulated our solar tracking device in FYP-1 and when
simulation results were worth to be implemented on hardware , we generated the layout on
Proteaus for those components that were to be fabricated on PCB. After the fabrication on PCB,
the hardware results were analyzed, and implemented on mini level project which provided
successful results. In FYP-2 we implemented all of the theory which was presented in FYP-1 on
a complete hardware project which though could not generate electricity due to less parabolic
troughs and its applicability on a small level, yet provided the concept of complete solar thermal
power system through a parabolic trough design.
































Table of contents
Acknowledgements
.2
Declaration
.3
Copyright
statement
4
Abstract
.5
Table of
contents
6
List of
figures
.7
Chapter
1
.8
Introduction


























LIST OF FIGURES

figure 1.1 principle of photovoltaic cells based on photoelectric principle 9

Figure 1.2 Principle of CSP based on heating fluid and generating electricity through its steam by
a turbine10
Figure 1.3 The back structure of an LS-2 parabolic trough solar collector assembly at Kramer
Junction, California. 13
Figure 1.4 The back structure of an LS-3 parabolic trough solar collector assembly at Kramer
Junction, California. 13
figure 1.5 The back structure of Euro parabolic trough solar collector assembly at Kramer
Junction, California.14


Chapter 1
Introduction
In recent decades, the search for alternative energies has become increasingly important to the
average citizen. Whether its due to concerns for the environment or worries about shortages in
fuel or rising prices, most people agree that other options need to be found. Considering the
amazing amount of energy that is showered down upon us every day from the sun, its no
wonder that a lot of research and development is focused on improving our capabilities of
capturing this source for electricity generation. As a major bonus solar power is also a renewable
energy source that produces no polluting emissions or safety concerns
At present there are two main methods used to capture solar energy and convert it to electricity.
One way is by using photovoltaic power and the other is with solar thermal power. When most
people think of solar power, they are usually thinking of photovoltaic power, also known as PV
for short. PV panels are able to directly convert sunlight into energy . These are the sort of solar
panels that you often see on peoples homes and can buy at hardware stores. Unlike photovoltaic
power cells, solar thermal power (also known as concentrated solar power) does not directly
produce electric power. Instead, it produces heat. However, this heat can be captured and
changed into electricity. In most solar thermal power plants, sunlight is concentrated to heat a
fluid, such as oil or liquid salt, which is then used to heat water to create steam. The steam is
then used to turn a turbine which generates electricity.
Photovoltaic power has many advantages, such as the ability to operate on a very small scale or
unattended, which has likely led to its vast popularity. However, when it comes to large scale
productions of electricity, PV is much more expensive than solar thermal power. Thus, this
Report will review the ways in which solar thermal energy is used for power generation.
1.1 Basic Principle of operation
There are basically two types of producing power out of solar energy photovoltaic normaly
known as solar panels and solar thermal energy (upon which our project is based).

1.2 Photovoltaic cells or solar panels:
Solar cells, also called photovoltaic (PV) cells by scientists, convert sunlight directly into
electricity. PV gets its name from the process of converting light (photons) to electricity
(voltage), which is called the PV effect. The PV effect was discovered in 1954, when scientists at
Bell Telephone discovered that silicon (an element found in sand) created an electric charge
when exposed to sunlight. Soon solar cells were being used to power space satellites and smaller
items like calculators and watches. Today, thousands of people power their homes and
businesses with individual solar PV systems. Utility companies are also using PV technology for
large power stations.
Solar panels used to power homes and businesses are typically made from solar cells combined
into modules that hold about 40 cells. A typical home will use about 10 to 20 solar panels to
power the home. The panels are mounted at a fixed angle facing south, or they can be mounted
on a tracking device that follows the sun, allowing them to capture the most sunlight. Many solar
panels combined together to create one system is called a solar array. For large electric utility or
industrial applications, hundreds of solar arrays are interconnected to form a large utility-scale
PV system.
Traditional solar cells are made from silicon, are usually flat-plate, and generally are the most
efficient. Second-generation solar cells are called thin-film solar cells because they are made
from amorphous silicon or nonsilicon materials such as cadmium telluride. Thin film solar cells
use layers of semiconductor materials only a few micrometers thick. Because of their flexibility,
thin film solar cells can double as rooftop shingles and tiles, building facades, or the glazing for
skylights.
Third-generation solar cells are being made from variety of new materials besides silicon,
including solar inks using conventional printing press technologies, solar dyes, and conductive
plastics. Some new solar cells use plastic lenses or mirrors to concentrate sunlight onto a very
small piece of high efficiency PV material. The PV material is more expensive, but because so
little is needed, these systems are becoming cost effective for use by utilities and industry.
However, because the lenses must be pointed at the sun, the use of concentrating collectors is
limited to the sunniest parts of the country.



figure 1.1 principle of photovoltaic cells based on photoelectric principle
1.3 Photothermic cells or solar thermal power systems:
In solar thermal power system we trap the sunrays to heat some fluid and convert its steam into
electricity through turbines
flat panel PV is not the way solar energy will be harnessed in the near term for large scale power
generation. While it is the most visible of all solar technologies and for that reason attracts the
attention and support of the public and policy makers, concentrating solar power(CSP) is
positioned to be the true leader in solar power generation technology today. In CSP, mirrors or
lenses first focus and amplify the suns energy. The concentrated sunlight is then converted to
electricity through the photovoltaic process or a thermodynamic heat cycle, which uses a motor
or turbine. In all CSP technologies, mirrors or lenses follow the trajectory of the sun through the
sky and thus optimize energy collection. The four prominent CSP technologies are concentrating,
parabolic trough, dish Stirling, and power tower; the latter
three use a heat cycle to produce energy.
Currently, CSP is the most efficient and cost-effective way to generate electricity from the sun.
In addition, hundreds of megawatts of CSP generating capacity could be brought on-line within a
few years and make a meaningful contribution to our energy needs. Exhibit 18 provides an
overview of solar power cost of flat panel PV and CSP technologies.


Figure 1.2 Principle of CSP based on heating fluid and generating electricity through its steam by
a turbine.
Advantages Of Solar thermal Power systems Over other Plants:
1.4 Storage System in Solar thermal power systems
A distinct advantage of power tower and parabolic trough solar thermal power plants is the
availability of a relatively inexpensive way of storing energy in the form of heat, especially
compared with other intermittent renewable energies, such as PV and wind. Solar power plants
with heat storage collect thermal energy during the day by increasing the temperature of a large
heat reservoir. At one of the parabolic trough plants near Kramer Junction, California, heat
storage utilized oil (see The 354-MW SEGS Power Plants). However, the power tower
demonstration project, Solar Two, used a more effective and safer molten-salt storage system. In
future applications, the heat reservoir will, therefore, likely be a large tank of molten salt rather
than oil. The heat capacity of these storage systems is very large. For example, six-hour full-load
heat storage of a 100-MW parabolic trough contains enough energy to power a home for nearly
70 years.
Molten-salt heat storage is technologically ready, safe, and the most economic of all thermal
energy storage technologies. It allows thermal energy to be collected during the day and to be
saved for use at night or it can be used to keep the plant at full output when clouds pass over the
plant location. The effectiveness of heat storage increases with the operating temperature of the
thermal solar power plant. The high temperatures of the power cycle in power towers make this
technology particular attractive for heat energy storage
In a competitive market, energy storage also allows the operator to maximize profits. For
example, during periods of low hourly power prices, the operator could forgo generation and
dump heat into storage. At times of high prices, the plant could run at full capacity even if the
solar field was not receiving full sun, or no sun at all. Many of the high load/high price periods in
the Desert Southwest occur in the three to four hours after darka time period the operator
could target for dispatch. Therefore, additional revenues from the energy market may justify the
cost of adding storage. Additional flexibility in the operation of a thermal solar plant with storage
comes from oversizing the solar field, that is, the collectors generate more heat than required by
the steam turbine of the plant. For example, a 100-MW thermal solar plant could have a solar
field that has a nominal

NREL and Solar thermal Power systems:
Flat panel PV is not the way solar energy will be harnessed in the near term for large scale power
generation.[1.1]
Sandia Laboratories and Solar thermal Power systems
Currently, CSP is the most efficient and cost-effective way to generate electricity from the
sun.[1.2]

1.5 Capital Cost Of CSP in comparison with other power Plants
one unit of electricity production cost is as less then as 13.4 cents/kwhr
capital cost of coal plant is 900-1200 $/kwhr
capital cost of combustion turbine 325-450 $/kwhr
capital cost of combine cycle is 525-625 $/kwhr
capital cost of wind turbine is 850 $/kwhr
capital cost of nuclear energy is 2100$/kwhr
[1.3]

1.6 Co2 Emission Of CSP in comparison with other Power Plants
Csp emits zero percent of C02.
coal plants emits 1930 lbs/MWhr c02
gas boiler emits 1230 lbs/MWhr c02
combustion turbine emits 1345 lbs/MWhr co2
no co2 emission in nuclear and wind plants takes place
[1.4]
1.7 Abundance of sun energy:
Sun emits 4.3 *10^20j in on hour while the energy consumed on planet in a whole year is
4.1*10^20j [1.5]

1.8 Green House Effects:
In a world pushing for green products, an obvious benefit of solar thermal power stations is the
fact that they could help reduce greenhouse gas emissions
1.9 Concentrating Mirrors or collectors:
Different type of collectors are used worldwide, each have their own pros and cons.
Concentrator Structure
The structural skeleton of the parabolic trough solar collector is the concentrator structure. The
concentrator structure:
Supports the mirrors and receivers, maintaining them in optical alignment
Withstands external forces, such as wind
Allows the collector to rotate, so the mirrors and receiver can track the sun.
Types of collectors include:
Luz system
Eurotrough
Solargenix





1.10 Luz System Collectors

Figure 1.3 The back structure of an LS-2 parabolic trough solar collector assembly at Kramer
Junction, California.

Figure 1.4 The back structure of an LS-3 parabolic trough solar collector assembly at Kramer
Junction, California.
Luz system collectors represent the standard by which all other collectors are compared. The
industrial nature of these collectorsmade from galvanized steelmakes them suitable for
commercial power plant applications. And they have proven to be highly reliable. For example,
most of the SEGS (solar electric generation system) power plants used Luz system collectors.
There are two types of Luz system collectors: LS-2 and LS-3.
The LS-2 collector features a very accurate design. Its torque-tube structure is simple to erect and
provides torsional stiffness. It has six torque-tube collector modules, three on either side of the
drive. And each torque tube has two 4-meter-long receivers. Unfortunately, the torque tube uses
a lot of steel and requires precise manufacturing to build.
For reducing manufacturing costs, Luz designed the larger LS-3 to lower manufacturing
tolerance and require less steel. It proved to be a very reliable design. The LS-3 uses a bridge
truss structure in place of the torque-tube. Luz's LS-3 collector has truss assemblies on either
side of the drive. Each LS-3 truss assembly has three, 4-meter-long receivers.
The LS-3 truss design didn't lower manufacturing costs as much as expected. It also suffered
from insufficient torsional stiffness, which led to lower than expected optical and thermal
performance.


1.11 EuroTrough Collector
Following the demise of Luz, a European consortiumEuroTroughinitiated the development
of a new collector design intended to build on the advantages of the LS-2 and the LS-3. The
EuroTrough collector utilized a torque-box design to integrate the torsional stiffness of a torque
tube and the lower steel content of a truss design.

figure 1.5 The back structure of Euro parabolic trough solar collector assembly at Kramer
Junction, California.
1.12 Solargenix Collector
The Solargenix collector is made from extruded aluminum. It uses a unique organic hubbing
structure, which Gossamer Spaceframes initially developed for buildings and bridges. The new
design:
Weighs less than steel designs
Requires very few fasteners
Requires no welding or specialized manufacturing
Assembles easily
Requires no field alignment.
The 64-MWe Nevada Solar One parabolic trough project features the Solargenix SGX-1
collector.










Thermal portion

Block Digram












Heat Exchanger:
A heat exchanger is a piece of equipment built for efficient heat transfer from one medium to
another. The media may be separated by a solid wall to prevent mixing or they may be in direct
contact. They are widely used in space heating, refrigeration, air conditioning, power
plants, chemical plants, petrochemical plants, petroleum refineries, natural gas processing,
and sewage treatment. The classic example of a heat exchanger is found in an internal
combustion engine in which a circulating fluid known as engine coolant flows
through radiator coils and air flows past the coils, which cools the coolant and heats the
incoming air.
Shell and tube heat exchanger:
Shell and tube heat exchangers consist of series of tubes. One set of these tubes contains the fluid
that must be either heated or cooled. The second fluid runs over the tubes that are being heated or
cooled so that it can either provide the heat or absorb the heat required. A set of tubes is called
the tube bundle and can be made up of several types of tubes: plain, longitudinally finned, etc.
Shell and tube heat exchangers are typically used for high-pressure applications (with pressures
greater than 30 bar and temperatures greater than 260 C).
.
This is because the shell and tube heat
exchangers are robust due to their shape.
Several thermal design features must be considered when designing the tubes in the shell and
tube heat exchangers: There can be many variations on the shell and tube design. Typically, the
ends of each tube are connected to plenums (sometimes called water boxes) through holes in
tubesheets. The tubes may be straight or bent in the shape of a U,called U-tubes.
Tube diameter: Using a small tube diameter makes the heat exchanger both economical and
compact. However, it is more likely for the heat exchanger to foul up faster and the small
size makes mechanical cleaning of the fouling difficult. To prevail over the fouling and
cleaning problems, larger tube diameters can be used. Thus to determine the tube diameter,
the available space, cost and the fouling nature of the fluids must be considered.
Tube thickness: The thickness of the wall of the tubes is usually determined to ensure:
There is enough room for corrosion
That flow-induced vibration has resistance
Axial strength
Availability of spare parts
Hoop strength (to withstand internal tube pressure)
Buckling strength (to withstand overpressure in the shell)

Steam Turbine:
A steam turbine is a device that extracts thermal energy from pressurized steam and uses it to
do mechanical work on a rotating output shaft.
Because the turbine generates rotary motion, it is particularly suited to be used to drive
an electrical generator about 90% of all electricity generation in the United States is by use of
steam turbines. The steam turbine is a form of heat engine that derives much of its improvement
in thermodynamic efficiency from the use of multiple stages in the expansion of the steam,
which results in a closer approach to the ideal reversible expansion process.
Process:
An ideal steam turbine is considered to be an isentropic process, or constant entropy process, in
which the entropy of the steam entering the turbine is equal to the entropy of the steam leaving
the turbine. No steam turbine is truly isentropic, however, with typical isentropic efficiencies
ranging from 2090% based on the application of the turbine. The interior of a turbine comprises
several sets of blades, orbuckets as they are more commonly referred to. One set of stationary
blades is connected to the casing and one set of rotating blades is connected to the shaft. The sets
intermesh with certain minimum clearances, with the size and configuration of sets varying to
efficiently exploit the expansion of steam at each stage.

Turbine efficiency:
To maximize turbine efficiency the steam is expanded, doing work, in a number of stages. These
stages are characterized by how the energy is extracted from them and are known as either
impulse or reaction turbines. Most steam turbines use a mixture of the reaction and impulse
designs: each stage behaves as either one or the other, but the overall turbine uses both.
Typically, higher pressure sections are reaction type and lower pressure stages are impulse type.
Impulse turbines:
An impulse turbine has fixed nozzles that orient the steam flow into high speed jets. These jets
contain significant kinetic energy, which is converted into shaft rotation by the bucket-like
shaped rotor blades, as the steam jet changes direction. A pressure drop occurs across only the
stationary blades, with a net increase in steam velocity across the stage. As the steam flows
through the nozzle its pressure falls from inlet pressure to the exit pressure (atmospheric
pressure, or more usually, the condenser vacuum). Due to this high ratio of expansion of steam,
the steam leaves the nozzle with a very high velocity. The steam leaving the moving blades has a
large portion of the maximum velocity of the steam when leaving the nozzle. The loss of energy
due to this higher exit velocity is commonly called the carry over velocity or leaving loss.






Dynamo(Generator):
A dynamo is an electrical generator that produces direct current with the use of a commutator.
Dynamos were the first electrical generators capable of delivering power for industry, and the
foundation upon which many other later electric-power conversion devices were based, including
the electric motor, the alternating-current alternator, and the rotary converter. Today, the simpler
alternator dominates large scale power generation, for efficiency, reliability and cost reasons. A
dynamo has the disadvantages of a mechanical commutator. Also, converting alternating to
direct current using power rectification devices (vacuum tube or more recently solid state) is
effective and usually economic.
The dynamo uses rotating coils of wire and magnetic fields to convert mechanical rotation into a
pulsing direct electric current through Faraday's law of induction. A dynamo machine consists of
a stationary structure, called the stator, which provides a constant magnetic field, and a set of
rotating windings called the armature which turn within that field. The motion of the wire within
the magnetic field causes the field to push on the electrons in the metal, creating an electric
current in the wire. On small machines the constant magnetic field may be provided by one or
more permanent magnets; larger machines have the constant magnetic field provided by one or
more electromagnets, which are usually called field coils.
Commutation:
The commutator is needed to produce direct current. When a loop of wire rotates in a magnetic
field, the potential induced in it reverses with each half turn, generating an alternating current.
However, in the early days of electric experimentation, alternating current generally had no
known use. The few uses for electricity, such as electroplating, used direct current provided by
messy liquid batteries. Dynamos were invented as a replacement for batteries. The commutator is
essentially a rotary switch. It consists of a set of contacts mounted on the machine's shaft,
combined with graphite-block stationary contacts, called "brushes", because the earliest such
fixed contacts were metal brushes. The commutator reverses the connection of the windings to
the external circuit when the potential reverses, so instead of alternating current, a pulsing direct
current is produced.
Excitation:
The earliest dynamos used permanent magnets to create the magnetic field. These were referred
to as "magneto-electric machines" or magnetos. However, researchers found that stronger
magnetic fields, and so more power, could be produced by using electromagnets (field coils) on
the stator. These were called "dynamo-electric machines" or dynamos. The field coils of the
stator were originally separately excited by a separate, smaller, dynamo or magneto. An
important development by Wilde and Siemens was the discovery that a dynamo could
also bootstrap itself to be self-excited, using current generated by the dynamo itself. This allowed
the growth of a much more powerful field, thus far greater output power.




Dynamo



Chapter 2
2.1 Solar tracker:
Figure 1.6 Block Diagram of Solar tracking system

A solar tracker is a device that orients a payload toward the sun. Payloads can be photovoltaic
panels, reflectors, lenses or other optical devices.
In flat-panel photovoltaic (PV) applications, trackers are used to minimize the angle of incidence
between the incoming sunlight and a photovoltaic panel. This increases the amount of energy
produced from a fixed amount of installed power generating capacity. In standard photovoltaic
applications, it was predicted in 2008-2009 that trackers could be used in at least 85% of
commercial installations greater than 1MW from 2009 to 2012.However, as of April 2014, there
is not any data support these predictions.
In concentrated photovoltaic (CPV) and concentrated solar thermal (CSP) applications, trackers
are used to enable the optical components in the CPV and CSP systems. The optics in
concentrated solar applications accept the direct component of sunlight light and therefore must
be oriented appropriately to collect energy. Tracking systems are found in all concentrator
applications because such systems do not produce energy unless pointed at the sun.

2.2 C code:


#include "main.h"
enum{on=0,off=1};
#definebase_1 RD2
#definebase_2 RD3

#define m_base_left {base_1=on;base_2=off;}
#define m_base_right {base_1=off;base_2=on;}
#define m_base_stop {base_1=on;base_2=on;}

#define up_ldr RC4
#define down_ldr RC5
//===================Variable's==========================================
==============
unsigned long soler_adc,soler_volt;

unsigned int temp1;

unsigned int adc0;
//====================================================================
==========

void main(void)
{
init_ic();
init_lcd();
init_adc(all_analog);
lcd_text("Concentrated ",_1st);
lcd_text("Soler Power(CSP)",_2nd);
__delay_ms(2000);
lcd_text("Supervisor Sir ",_1st);
lcd_text("Rehmatulah Kundi",_2nd);
__delay_ms(2000);
lcd_text("Group ",_1st);
lcd_text("Members ",_2nd);
__delay_ms(2000);
lcd_text("Faiq Ahmed ",_1st);
lcd_text("P10-6313 ",_2nd);
__delay_ms(2000);
lcd_text("Ammar Masood ",_1st);
lcd_text("P10-6304 ",_2nd);
__delay_ms(2000);
lcd_text("shoaib Ahmed Khan ",_1st);
lcd_text("P10-6317 ",_2nd);
__delay_ms(2000);
lcd_clear;
while(1)
{
///-Soler Volt-///////////////
soler_adc=adc_read(ch4);
soler_volt=((soler_adc)*500/1023);
digit_convert(soler_volt,4);
lcd_text("V=",_1st);
lcd_data(decimal[2]);
lcd_data(decimal[3]);
lcd_data('.');
lcd_data(decimal[4]);
lcd_data('V');
lcd_data(' ');

///////////-Temp-////////
///-Soler Volt-///////////////
adc0=adc_read(ch1);
temp1=(float)(adc0)*(4.882);
lcd_text("T=");
digit_convert(temp1,4);
lcd_data(decimal[2]);
lcd_data(decimal[3]);
lcd_data('.');
lcd_data(decimal[4]);
lcd_data('C');
lcd_data(' ');
///////////////////////////////
if(up_ldr==0 && down_ldr==0)
{
m_base_stop;
lcd_text("MOTOR No Action ",_2nd);
__delay_ms(100);
}
if(up_ldr==1 && down_ldr==1)
{
m_base_stop;
lcd_text("MOTOR No Action ",_2nd);
__delay_ms(100);
}
if(up_ldr==0 && down_ldr==1)
{
lcd_text("MOTOR_Move F ",_2nd);
m_base_right;
__delay_ms(50);
m_base_stop;
}
///////////////////////////////////////////
if(down_ldr==0 && up_ldr==1)
{
lcd_text("MOTOR_Move R ",_2nd);
m_base_left;
__delay_ms(50);
m_base_stop;
}

}

void init_ic(void)
{
// Set the I/O direction.
TRISA= 0x0f; // Configure PORTA I/O direction.
TRISB= 0x00; // Configure PORTB I/O direction.
TRISC= 0b00110000; // Configure PORTC I/O direction.
TRISD= 0x00;

// Initialize the ports.
PORTB = 0x00;
PORTC = 0x00;
PORTD = 0x00;
}

Components Used:

LDR:
A photoresistor or light-dependent resistor (LDR) or photocell is a light-controlled
variable resistor. The resistance of a photoresistor decreases with increasing incident light
intensity; in other words, it exhibits photoconductivity. A photoresistor can be applied in light-
sensitive detector circuits, and light- and dark-activated switching circuits.
A photoresistor is made of a high resistance semiconductor. In the dark, a photoresistor can have
a resistance as high as a few megaohms (M), while in the light, a photoresistor can have a
resistance as low as a few hundred ohms. If incident light on a photoresistor exceeds a
certain frequency, photons absorbed by the semiconductor give bound electrons enough energy
to jump into the conduction band. The resulting free electrons (and their hole partners) conduct
electricity, thereby lowering resistance. The resistance range and sensitivity of a photoresistor
can substantially differ among dissimilar devices. Moreover, unique photoresistors may react
substantially differently to photons within certain wavelength bands.



Symbol


Comparator:
A comparator is the simplest circuit that moves signals between the analog and digital worlds.
Simply put, a comparator compares two analog signals and produces a one bit digital
signal. The symbol for a comparator is shown below.

The comparator output satisfies the following rules:
o When V
+
is larger than V
-
the output bit is 1.
o When V
+
is smaller than V
-
the output bit is 0
Just to give you an idea of how a comparator works, here is a simulation of using a comparator.
Set the voltages on the control panel to adjust the voltage inputs to the comparator.

Simulation


Real comparators may work like the one in the simulation, but there are sometimes other
considerations. For example, a common comparator is the LM339, which come on a chip with
four comparators. The four comparators are all open collector outputs. We need to discuss that.
Here's a diagram of the output circuitry showing how the comparator is connected to the
output transistor, and how the collector of the transistor is connected to the output
terminal on the chip.

In this situation, you don't need to know a lot about transistors (although it's a good idea to learn
that if you don't know it!). What you need to know is that, in this situation, the transistor acts
like a switch. A transistor doesn't always act that way, but it does in this situation.
When the output of the comparator is a 1, current flows from the comparator through the
base of the transistor, out the emitter to ground, as shown.
When that current flows, the transistor acts like a switch that permits current to flow from
the collect to the emitter to ground.

The way you connect the comparator is to put your load between five volts and the collector
connection on the chip - like this









Microcontroller:

PIC16F877A


Features

Special Microcontroller Features
- 100,000 erase/write cycle Enhanced Flash Program Memory Typical
- Self-reprogrammable under software control
- Single-supply 5V In-Circuit Serial Programming
- Watchdog Timer (WDT) with its own on-chip RC oscillator
- Programmable Code Protection
- Power-Saving Sleeping Mode
Peripheral Features
- Two 8-bit (TMR0, TMR2)timer/counter with Pre scalar
- One 16-bit timer/counter
- Brown-out detection circuitry
- Parallel Slave Port (PSP): 40/44 pin-device only
High-Performance RISC CPU
- Only 35 single-word instructions to learn
- DC-20MHz clock input
- Up to 8K x 14 words of Flash Program Memory
- Pin out Compatible to other 28-pin or 40/44-pin
Analog Features
- 10-bit, up to 8-channel Analog-to-Digital Converter (A/D)
- Brown-out Reset(BOR)
- Two Analog Comparators
- Programmable on-chip voltage reference (VREF) module
CMOS Technology
- Low-power, high-speed Flash/EEPROM technology
- Fully Static Design
- Wide Operating Voltage Range (2.0V to 5.5V)
- Low-power Consumption

Pin Layout:


PIC16F877A



Pin Description
Pin Number Description
1 MCLR/VPP
2 RA0/AN0
3 RA1/AN1
4 RA2/AN2/VREF-/CVREF
5 RA3/AN3/VREF+
6 RA4/T0CKI/C1OUT
7 RA5/AN4/SS/C2OUT
8 RE0/RD/AN5
9 RE1/WR/AN6
10 RE2/CS/AN7
11 VDD
12 VSS
13 OSC1/CLKI
14 OSC2/CLKO
15 RC0/T1OSO/T1CKI
16 RC1/T1OSI/CCP2
17 RC2/CCP1
18 RC3/SCK/SCL
19 RD0/PSP0
20 RD1/PSP1
21 RD2/PSP2
22 RD3/PSP3
23 RC4/SDI/SDA
24 RC5/SDO
25 RC6/TX/CK
26 RC7/RX/DT
27 RD4/PSP4
28 RD5/PSP5
29 RD6/PSP6
30 RD7/PSP7
31 VSS
32 VDD
33 RB0/INT
34 RB1
35 RB2
36 RB3/PGM
37 RB4
38 RB5
39 RB6/PGC
40 RB7/PGD


H Bridge:
An H bridge is an electronic circuit that enables a voltage to be applied across a load in either
direction. These circuits are often used in robotics and other applications to allow DC motors to
run forwards and backwards.
Most DC-to-AC converters (power inverters), most AC/AC converters, the DC-to-DC pushpull
converter, most motor controllers, and many other kinds of power electronics use H bridges. In
particular, a bipolar stepper motor is almost invariably driven by a motor controller containing
two H bridges.


20 Ampare H Bridge IC

DC Gear Motor:
A DC motor is an internally commutated electric motor designed to be run from a direct
current power source. Brushed motors were the first commercially important application of
electric power to driving mechanical loads, and DC distribution systems were used for more than
100 years to operate motors in commercial and industrial buildings. Brushed DC motors can be
varied in speed by changing the operating voltage or the strength of the magnetic field.
Depending on the connections of the field to the power supply, the speed and torque
characteristics of a brushed motor can be altered to provide steady speed or speed inversely
proportional to the mechanical load. Brushed motors continue to be used for electrical
propulsion, cranes, paper machines and steel rolling mills. Since the brushes wear down and
require replacement, brushless DC motors using power electronic devices have displaced
brushed motors from many applications.






















References
[1.1] http://www.nrel.gov/learning/re_csp.html.
[1.2] http://energy.sandia.gov/?page_id=907 (SANDIA NATIONAL LABORATORIES)
[1.3] Fuel from the sky [july 2002, NREL/ SR 550-32160] by Dr, Arnold Leitner Senior
Consultant, RDI Consultant.
[1.4] Fuel from the sky [july 2002, NREL/ SR 550-32160] by Dr, Arnold Leitner Senior
Consultant, RDI Consultant.

You might also like