0% found this document useful (0 votes)
71 views

Maximam Power Point Tracking Tracking Control of Solar PV System Using Microcontroller

final report on solar power tracking system very helpful for those who final year electrical engg and doing there project work

Uploaded by

xirohoj
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

Maximam Power Point Tracking Tracking Control of Solar PV System Using Microcontroller

final report on solar power tracking system very helpful for those who final year electrical engg and doing there project work

Uploaded by

xirohoj
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 38

“MAXIMAM POWER POINT TRACKING

TRACKING CONTROL OF SOLAR PV SYSTEM


USING MICROCONTROLLER”
A Project Report Submitted In Partial Fulfilment Of

The Requirement For The Award Of Degree Of

BACHELOR OF TECHNOLOGY IN ELECTRICAL ENGINEERING

by

POOJA YADAV (2016032018)

RUBY SHUKLA (2016032025)

ANKIT KUMAR (2015031014)

SHATRUDHAN GUPTA (2016032026)

SIDDHARTH SINGH (2015032087)

Under The Supervision of

Dr. L.B.PRASAD

Department of Electrical Engineering

Madan Mohan Malaviya University of Technology,Gorakhpur(U.P.)

INDIA

May 2019
@M.M.M . University of Technology , Gorakhpur,(U.P.) -273010,
INDIA
ALL RIGHTS RESERVED

DEPARTMENT OF ELECTRICAL
ENGINEERING
MADAN MOHAN MALAVIYA UNIVERSITY
OF
TECHNOLOGY, GORAKHPUR- 273010 (U.P.)

CERTIFICATE

Certified that pooja yadav,ruby shukla, ankit kumar, shatrudhan gupta,sidharth


singh,have carried out the project work presented in this thesis entitled
“maximum power point tracking control of solar pv system using
microcontroller ” for the award of bachelor of technology from madan mohan
malaviya university of technology,Gorakhpur under my supervision. The thesis
embodies result of original work and studies carried out by student himself and
the contents of the thesis do not form the basis for the award of any other degree
to the candidate or to anybody else.

Signature of
supervisor

(Dr. L.B.
Prasad)

Date/month/year

CANDIDATE ’S DECLARATION

We declare that this written submission represents our work and ideas in our
own words and where others’ ideas or words have been included. We have
adequately cite and referenced the original sources .we also declare that we
have adheres to all the principles of academic honesty and integrity and have
not misrepresented or fabricated or falsified any idea /data/fact/sources in my
submission . we understand that any violation of the above will be cause for
disciplinary action by the university and can also evoke penal action from the
sources which have thus not been properly cited or from whome proper
permission has not been taken when needed.

Pooja yadav (2016032018)

Ruby shukla(2016032025)

Ankit kumar(201501

Shatrudhan gupta (2016032026)

Sidharth singh(2015031087)
APPROVAL SHEET

This project entitled “Maximum Power Point Tracking Control of Solar PV s


System using Microcontroller” by POOJA YADAV(2016032018) , RUBY
SHUKLA(2016032025), ANKIT KUMAR ( 2015031014 ), SHATRU DHNA
GUPTA (2016032026), SIDDHARTH SINGH (2015031087 ) is approved for
the degree of bachelor of technology.

Examiner

Supervisor

Dr.L.B.PRASAD

(Associate Professor)

HEAD OF DEPARTMENT

Dr. A. K .PANDEY

Dean undergraduate studies


Entrepreneurship

Prof. A. K PANDEY

Date

Place: MMMUT, GORAKHPUR


ACKNOWLEDGEMENT
It is our privilege to express our sincerest thanks to our project coordinator ,Dr.L.B.Prasad,for
his valuable inputs able guidance ,ncouragement whole hearted cooperation and constructive
criticism throughout the duration of the project .As head of electrical engineering
department, we deeply express our sincere thanks to Dr. A.K.PANDEY for encouraging and
allowing us to present the project on the topic “maximum power point traking control of
solar pv system using microcontroller” in the department premises.We take this opportunity
to thanks all the faculty members and non–teaching staff who have directly or indirectly
helped our project . wepay our respect and love to our parents and all other family members
for their love and encouragement our career . last but not the least we express our thanks to
our friends for their analytical comments and reviews.

Pooja Yadav

Ruby Shukla

Ankit Kumar

Shatru dhna Gupta

Siddharth Singh
CHAPTER 1

INTRODUCTION
1.1 Introduction

With the unavoidable shortage of fossil fuel sources in the future, renewable types of
energy have become a topic of interest for researchers, technicians, investors and decision
makers all around the world. New types of energy that are getting attention include
hydroelectricity, bioenergy, solar, wind and geothermal energy, tidal power and wave
power. Because of their renewability, they are considered as favourable replacements for
fossil fuel sources. Among those types of energy, solar photovoltaic (PV) energy is one of the
most available resources. This technology has been adopted more widely for residential use
nowadays, thanks to research and development activities to improve solar cells’
performance and lower the cost. According to International Energy Agency (IEA), worldwide
PV capacity has grown at 49% per year on average since early 2000s [1, 9]. Solar PV energy
is highly expected to become a major source of power in thefuture.

However, despite the advantages, solar PV energy is still far from replacing traditional
sources on the market. It is still a challenge to maximise power output of PV systems in
areas that don’t receive a large amount of solar radiation. We still need more advanced
techno-logy from manufacturers to improve the capability of PV materials, but
improvement of system design and module construction is a feasible approach to make
solar PV power more efficient, thus being a reliable choice for customers. Aiming for that
purpose, this project had been carried out to support the development of such promising
technology. One of the main methods of increasing efficiency is to maximise the duration of
exposure to the Sun. Tracking systems help achieve this by keeping PV solar panels aligned
at the appropriate angle with the sun rays at any time. The goal of this project is to build a
prototype of light tracking system at smaller scale, but the design can be applied for any
solar energy system in practice. It is also expected from this project a quantitative
measurement of how well tracking system performs compared to system with fixed
mounting method.

1.2 Problem Statement

Solar Panels are a form of active solar power, a term that describes how solar panels make
use of the sun’s energy; solar panels harvest sunlight and actively convert it to electricity.
Solar Cells, or photovoltaic cells, are arranged in a grid-like pattern on the surface of the
solar panel. Solar panels are typically constructed with crystalline silicon, which is used in
other industries ( such as the microprocessor industry ), and the more expensive gallium
arsenide, which is produced exclusively for use in photovoltaic ( solar ) cells. Solar panels
collect solar radiation from the sun and actively convert that energy to electricity. Solar
panels are comprised of several individual solar cells. These solar cells function similarly to
large semiconductors and utilize a large area p-n junction diode. When the solar cells are
exposed to sunlight, the p-n junction diodes convert the energy from sunlight into usable
electrical energy. The energy generated from photons striking the surface of the solar panel
allows electrons to be knocked out of their orbits and released, and electric fields in the
solar cells pull these free electrons in a directional current, from which metal contacts in the
solar cell can generate electricity. The more solar cells in a solar panel and the higher the
quality of the solar cells, the more total electrical output the solar panel can produce. The
conversion of sunlight to usable electrical energy has been dubbed the Photovoltaic Effect.
A solar tracker is a device that orients a payload toward the sun. The use of solar trackers
can increase electricity production by around a third, and some claim by as much as 40% in
some regions, compared with modules at a fixed angle. In any solar application, the
conversion efficiency is improved when the modules are continually adjusted to the
optimum angle as the sun traverses the sky. As improved efficiency means improved yield,
use of trackers can make quite a difference to the income from a large plant.

Commercial purpose of solar tracking system:

• Increase Solar Panel Output.

• Maximum efficiency of the panel.

• Maximize Power per unit area.

• Able to grab the energy throughout the day.

• The sun’s position in the sky varies both with the seasons ( elevation ) and time of day as
the sun moves across the sky. Hence there are also two types of solar tracker:

• Single Axis Solar Tracker

• Dual Axis Solar Tracker

Single Axis Solar Tracker: Single axis solar trackers can either have a horizontal or a
vertical axle. The horizontal type is used in tropical regions where the sun gets very high at
noon, but the days are short. The vertical type is used in high latitudes ( such as in UK )
where the sun does not get very high, but summer days can be very long.
Fig. Dual Axis Solar Tracker

Dual Axis Solar Tracker: Double axis solar trackers have both a horizontal and a vertical axle
and so can track the sun’s apparent motion exactly anywhere in the world. This type of
system is used to control astronomical telescopes, and so there is plenty of software
available to automatically predict and track the motion of the sun across the sky. Dual axis
trackers track the sun both east to west and north to south for added power output ( approx
40% gain ) and convenience.

1.3 Project Objective

Main objective of this project is to introduce a guided approach for microcontroller based
MPPT in improving the efficiency of solar PV system.

Its measurable objectives are as follows :

1.To minimise the computation time for whole process of MPPT .

2.To enhance the calculation accuracy by using microcontroller algorthms.


CHAPTER 2

LITERATURE REVIEW

2.1 Paper 1
" Solar Tracker Robot using Microcontroller" by A.B. Afarulrazi, W. M. Utomo, K.L. Liew and
M. Zarafi published in 2011 International Conference on Business, Engineering and Industrial
Applications.

2.1.1 Summary

In the paper entitled," Solar Tracker Robot using Microcontroller" by A.B. Afarulrazi, W.
M.Utomo, K.L.LiewandM.Zarafipublishedin2011InternationalConferenceonBusiness,
Engineering and Industrial Applications describes to design and develop an automatic Solar
Tracker Robot (STR) which is capable to track maximum light intensity. The efficiency of the
solar energy conversion can be optimized by receiving maximum light on the solar panel.
STR is microcontroller based and built to move the solar panel in one axis, which is from east
to west and vice versa. Servo motor is the actuator used to move the solar panel due to the
high torque and small in size. The STR will automatically adjust the position of the robot so
that it always faces the same direction. This will ensure the solar panel receiving optimum
sunlight if external force is applied to move the STR.

2.2 Paper 2
" Design and Construction of an Automatic Solar Tracking System by Md. Tanvir Arafat Khan,
S.M. Shahrear Tanzil, Rifat Rahman, S M Shafiul Alam published in 6th International
Conference on Electrical and Computer Engineering ICECE 2010, 18-20 December 2010,
Dhaka, Bangladesh.

2.2.1 Summary

In the paper entitled," Design and Construction of an Automatic Solar Tracking System by
Md. Tanvir Arafat Khan, S.M. Shahrear Tanzil, Rifat Rahman, S M Shafiul Alam published in
6th International Conference on Electrical and Computer Engineering ICECE 2010, 18-20
December 2010, Dhaka, Bangladesh describes a microcontroller based design methodology
of an automatic solar tracker. Light dependent resistors are used as the sensors of the solar
tracker. The designed tracker has precise control mechanism which will provide three ways
of controlling system. A small prototype of solar tracking system is also constructed to
implement the design methodology presented here. In this paper the design methodology
of a microcontroller based simple and easily programmed automatic solar tracker is
presented. A prototype of automatic solar tracker ensures feasibility of this design
methodology.

2.3 Paper 3
" IMPLEMENTATION OF A PROTOTYPE FOR A TRADITIONAL SOLAR TRACKING SYSTEM" by
Nader Barsoum published in the 2009 Third UK Sim European Symposium on Computer
Modeling and Simulation.

2.3.1 Summary

In the paper," IMPLEMENTATION OF A PROTOTYPE FOR A TRADITIONAL


SOLARTRACKINGSYSTEM" by Nader Barsoum published in the 2009 Third UK Sim European
Symposium on Computer Modeling and Simulation describes in detail the design and
construction of a prototype for solar tracking system with two degrees of freedom, which
detects the sunlight using photocells. The control circuit for the solar tracker is based on a
PIC16F84A microcontroller (MCU). This is programmed to detect the sunlight through the
photocells and then actuate the motor to position the solar panel where it can receive
maximum sunlight. This paper is about moving a solar panel along with the direction of
sunlight; it uses a gear motor to control the position of the solar panel, which obtains its
data from a PIC16F84A microcontroller. The objective is to design and implement an
automated, double-axis solar tracking mechanism using embedded system design in order
to optimize the efficiency of overall solar energy output.

2.4 Paper 4
"MicrocontrollerBasedSolarTrackingSystem"byAleksandarStjepanovic,SladjanaStjepanovic,
Ferid Softic, Zlatko Bundalo published in Serbia,Nis,October 7-9, 2009.

2.4.1 Summary

Inthepaperentiled,"MicrocontrollerBasedSolarTrackingSystem"byAleksandarStjepanovic,
Sladjana Stjepanovic, Ferid Softic, Zlatko Bundalo published in Serbia,Nis,October 7-9, 2009
describes the design and construction of a microcontroller based solar panel tracking
system. Solar tracking allows more energy to be produce because the solar array is able to
remain aligned to the sun. The paper begins with presenting background theory in light
sensors and stepper motors as they apply to the project.In the conclusions are given
discussions of design results. The paper begins with presenting background theory, light
sensors and stepper motors as they apply to the project. The paper continues with specific
design methodologies pertaining to photocells, stepper motors and drivers, microcontroller
selection, voltage regulation, physical construction, and a software/system operation
explanation. The paper concludes with a discussion of design results and future work.

2.5 Paper 5
" Microcontroller-Based Two-Axis Solar Tracking System" by Lwin Lwin Oo and Nang Kaythi
Hlaing published in Second International Conference on Computer Research and
Development.

2.5.1 Summary

In the paper entitled," Microcontroller-Based Two-Axis Solar Tracking System" by Lwin Lwin
Oo and Nang Kaythi Hlaing published in Second International Conference on Computer
Research and Development describes to develop and implement a prototype of twoaxis
solar tracking system based on a PIC microcontroller. The parabolic reflector or parabolic
dish is constructed around two feed diameter to capture the sun’s energy.The focus of the
parabolic reflector is theoretically calculated down to an infinitesimally small point to get
extremely high temperature. This two axis auto-tracking system has also been constructed
using PIC 16F84A microcontroller. The assembly programming language is used to interface
the PIC with two-axis solar tracking system. The temperature at the focus of the parabolic
reflector is measured with temperature probes. This auto-tracking system is controlled with
two 12V, 6W DC gear box motors. The five light sensors (LDR) are used to track the sun and
to start the operation (Day/Night operation). Time Delays are used for stepping the motor
and reaching the original position of the reflector. The two-axis solar tracking system is
constructed with both hardware and software implementations. The designs of the gear and
the parabolic reflector are carefully considered and precisely calculated.
CHAPTER 3

3.1 MAXIMUM POWER POINT TRACKING METHODOLOGY

3.1.1 SOLAR PV SYSTEM

PHOTOVOLTAIC SYSTEM:-Solar PV system is known as photovoltaic system that


is designed to transform energy from sun into electrical energy by using photovoltaic, that
is also called as solar panels. Since sun is the source of unlimited energy source so if we use
this energy then solar PV system is best way because this is safe, reliable and without on site
pollution.

There are two categories of solar photovoltaic systems first is grid connected and second is
off grid systems. The grid is local electric utility’s infrastructure that supplies power to home
and other. For off grid system they are installed in remote locations where no utility grid is
available.

HOW PV CELLS WORK:-Solar cells are work on junction effect principle. For
understands junction effect we should understand n-type and p-type material because p-
type and n-type materials are used in cells. For making p-type or n-type material we need
a material that having four electrons in outermost cell for example we take Silicon
material for making p type and n type material.

In silicon crystal each silicon crystal has four electrons in valency band and these electrons
makes bond other silicon atom. Here we consider the perfect crystal structure of silicon and
all of them perfectly aligned.

Fig-Silicon crystal

P type material- When doping material has three electrons in valency band then we get
p type material after doping. Let us take Boron atom having three electrons in valency
band .When we insert B atom in silicon crystal then we that a bond is missing because three
outermost electrons in B atom but FOUR outermost electrons in silicon atom. Missing bond
is treated as hole. This material is called p type material.
Fig- P type material

N-type material-If doping atom having five electrons in valency band then we get p type
material after doping. Let us take Phosphorous atom having five electrons in valency band
after inserting in Si lattice four electrons of Si makes bond from Phosphorous atom but fifth
electron of P atom remaining free since energy of this band is almost equal to conduction
bad so fifth electron take as free electron. So this new material after doping is known as n
type material.

Fig. N Type lattice

P-N JUNCTION
When we bring N-type and P-type lattice together, a diffusion process takes place on the
surface free ace between both electron starts to diffuse from n type to p-type and holes
diffuse from p type to n-type region. By diffusion there is a region create that is free from
charge that’s width is very small this region is known as charge free region or it is called as
deplation layer.
From figure it is clear that there is no free charge in deplation layer. In deplation layer the
electric field from n side to p side .Since electrons are negative charged so when electric
field applies then electron flow from n-type to p-type region.

Any electron generated by sunlight in the vicinity of deplation region may pass to n
side of junction very easily. If we connect any load between the plate of n type and p-type
with metal contacts then the electrons flow from n-side to p-side due to radiation of solar
energy.

TYPES OF PV CELLS - There are three generation of photovoltaic technology.


1 First generation solar cells
a. Single crystal solar cells

b. Multi crystal solar cells

2- Second generation solar cells

a. a-Si thin film solar cells

b. mc-Si solar cells

c. CdTe solar cells

d. CIS and CIGS solar cells

3- First generation solar cells

a. Nano crystal based solar cells

b. Polymer base crystal solar cells

c. Dye sensitized solar cells

d. Concentrated solar cells

PHOTOELECTRIC CELLS MODULES AND ARRAYS- PV module is packaged, connected


assembly that usually consist of 6*10 solar cells. To achieve the required voltage and
current, modules are then wired into PV array. Solar cells are placed between transparent
front and back sheet. The array contains modules, cells and other important components.

APPLICATION OF SOLAR PV CELLS-


There are number of application of solar p-v system.

1) Roof tops application

2) In Satellite for energy

3) Building integrated solar cell technology

4) Remote location applications

Fig- P-V system in Satellite


3.2 MPPT CONTROL SCHEMES

As is well known, the maximum power point (MPP) of photovoltaic power generation system
depends on array temperature and solar irradiation, so it is necessary to constantly track MPP
of solar array. For years, research has focused on various MPP control algorithms to draw the
maximum power of the solar array. In this section, the effectiveness of these four different
control algorithm are thoroughly investigated via numerical simulation..

3.2.1. Perturb and Observe method


Perturbation and Observation method has been widely used due to its ease of implementation
[6]. P&O algorithm will force the PV system to approach to the maximum power point by
increasing or decreasing the PV panel-output voltage. Figure4 presents the control flow chart
of the P&O algorithm

In order to find the direction change for maximizing power, the P&O method perturbs the
operating voltage of the PV panel; if power increases, then the operating voltage is further
perturbed in the same direction, whereas if it decreases, then the direction of perturbation is
reversed. This process is repeated periodically until the MPP is reached [6]. The system then
oscillated around the MPP. The duty cycle perturbation at time (t+1) can be decided on the
basis of the following relationship [7]:
P(t) and V(t) are, respectively, power and voltage drawn from the PV panel. The oscillation
around the MPP can be minimized by reducing the perturbation step-size D. however
dynamic performance is hampered by smaller perturbation step-size (Figure5). This trade off
requires careful tuning of the duty cycle perturbation step-size.

3.2.2 Incremental Conductance method


Incremental conductance (IncCond) method is based on the fact that the slope of PV panel
power versus voltage curve is zero at the MPP, positive on the left, and negative on the right
of the MPP [7]. The relationship between the instantaneous conductance (I/V) and the
incremental conductance( dI/dV)is given by;
3.2.3 Current measurement method
The methods discussed so far require both current and voltage measurement. Salas and al
[10] proposed a newalgorithm for seeking maximum power point of a PV generator needing
only the PV current value. In this paper, the studied system is formed by a PV panel and the
output section by a 12V battery. A DC/DC boost converter is inserted between the PV panel
and the battery. The energy's conversion principle, applied to the static converter, gives:

Pin = Vpv Ipv


Where Pin is the available power at the output of the PV panel and Vbat is the battery
voltage, which is assumed constant. For boost converter, output current is given by:

It appears that the maxima of both Pin and its corresponding objective function P* will
coincide. When P* is maximized using the P&O algorithm, for example, it tracks the
maximum power closely and also respond to changes in atmospheric conditions efficiently
(Figure8 and 9) [10] [11].

3.2.4 Fuzzy logic controller method


Advances in microelectronic technology permitted to the fuzzy logic control to become the
most significant and fruitful application for fuzzy logic theory. Fuzzy logic controllers, based
on fuzzy logic, provides a mathematical tool for converting linguistic control rules in the
form of (IF-THEN) statements into an automatic control strategy [12] [13] [14].
The tow inputs of the FLC are the error E and, also, the associated change of error CE, which
are shown in formula10.
Where P(k) and V(k) refers to the output power and voltage of PV panel at the sampling
instant k. gE and gCD are the inputs scaling factors, and gdD is the Defuzzification gain.
While dD denotes the output of the fuzzy process. The fuzzy logic controller consists of three
functional blocks: fuzzification, Fuzzy rules and inference engine, and finally
Defuzzification.

Fuzzification
The fuzzy process requires that each variable used in describing the control rules has to be
expressed in terms of fuzzy set notations with linguistic labels [13]. Figure10 show the
memberships functions of the input variables E(k) and CE(k) and the output variable dD(k).
In which each membership function is assigned with five fuzzy set, including
PB (Positive Big), PS (Positive Small), ZE (Zero Equivalent), NS (Negative Small) and NB
(Negative Big).
Fuzzy rules and inference engine
The kernel of fuzzy logic controller is the fuzzy inference system. Fuzzy inference is the
process of formulating the mapping from a given input to an output using fuzzy logic. The
mapping then provides a basis from which decisions can be made. The proposed Mamdani-
type inference system endeavours to force the error function (E in formula 11) to zero. Two
cases are to consider [14]:
First case: E is positive; working point is on the left of the MPP. If the change of error CE
is positive, then the working point converges toward the MPP. If CE is negative, the inverse
that occurs.
Second case: E is negative; working point is, therefore, on the right of the MPP. In this
case if CE is positive, working point moves away of the MPP and vice versa if CE is
negative. From that, we summarises, in table1, this process reasoning as a set of a fuzzy IF-
THEN rules [14].

Defuzzification
The process of Defuzzification calculates the crisp output of the FLC. It describes the
mapping from a space of fuzzy logic statement, corresponding to the inferred output, into a
non-fuzzy control action. In this paper the centre of gravity Defuzzifier, which is the most
common one, is adopted.
CHAPTER 4

4.1 COMPONENT USED

4.1.1 Capacitor
Capacitor is an electronic component that stores electric charge. The capacitor is made of 2
close conductors (usually plates) that are separated by a dielectric material. The plates
accumulate electric charge when connected to power source. One plate accumulates positive
charge and the other plate accumulates negative charge.
The capacitance is the amount of electric charge that is stored in the capacitor at voltage of 1
Volt. The capacitance is measured in units of Farad (F). The capacitor disconnects current in
direct current (DC) circuits and short circuit in alternating current (AC) circuits
Capacitor pictures:

4.1.2 Transistor
A transistor is a semiconductor device used to amplify or switch electronic signals and
electrical power. It is composed of semiconductor material usually with at least three
terminals for connection to an external circuit. A voltage or current applied to one pair of the
transistor's terminals controls the current through another pair of terminals. Because the
controlled (output) power can be higher than the controlling (input) power, a transistor can
amplify a signal.
fig: bipolar transistor

4.1.3 TRANSFORMER

The reason for transforming the voltage to a much higher level is that higher distribution voltages
implies lower currents for the same power and therefore lower I2R losses along the networked grid
of cables. These higher AC transmission voltages and currents can then be reduced to a much lower,
safer and usable voltage level where it can be used to supply electrical equipment in our homes and
workplaces, and all this is possible thanks to the basic Voltage Transformer.
The Voltage Transformer can be thought of as an electrical component rather than an electronic
component. A transformer basically is very simple static (or stationary) electro-magnetic passive
electrical device that works on the principle of Faraday’s law of induction by converting electrical
energy from one value to another.

4.1.4 DIGITAL MULTIMETER


A Digital multimeter or DMM is a test equipment used for resistance, voltage, current
measurement and other electrical parameters as per requirement and displaying the results in
the mathematical digits form on an LCD or LED readout. It is a type of multimeter which
functions digitally. Digital multimeters are widely accepted worldwide as they have better
accuracy levels and ranging from simple 3 ½ to 4 ½ digit handheld DMM to very special
system DMM.

4.1.5 16x2 LCD


We come across LCD displays everywhere around us. Computers, calculators, television sets,
mobile phones, digital watches use some kind of display to display the time. An LCD is an
electronic display module which uses liquid crystal to produce a visible image. The 16×2
LCD display is a very basic module commonly used in DIYs and circuits. The
16×2 translates o a display 16 characters per line in 2 such lines. In this LCD each character
is displayed in a 5×7 pixel matrix.

16X2 LCD pin out diagram

Pin
Function Name
No

1 Ground (0V) Ground

2 Supply voltage; 5V (4.7V – 5.3V) Vcc

Contrast adjustment; the best way is to use variable resistor such as a potentiometer.
3 The output of the potentiometer is connected to this pin. Rotate the potentiometer Vo / VEE
knob forward and backwards to adjust the LCD contrast.
RS (Register
4 Selects command register when low, and data register when high
Select )

5 Low to write to the register; High to read from the register Read/write

Sends data to data pins when a high to low pulse is given; Extra voltage push is
required to execute the instruction and EN(enable) signal is used for this purpose.
6 Enable
Usually, we make it en=0 and when we want to execute the instruction we make it
high en=1 for some milli seconds. After this we again make it ground that is, en=0.

7 DB0

8 DB1

9 DB2

10 DB3
8-bit data pins
11 DB4

12 DB5

13 DB6

14 DB7

15 Backlight VCC (5V) Led+

16 Backlight Ground (0V) Led-

4.1.6 LDR (Light Dependent Resistor)

An LDR is a component that has a (variable) resistance that changes with the light intensity
that falls upon it. This allows them to be used in light sensing circuits.

Fig LDR SYMBOL Fig - A TYPICAL LDR


4.1.7 Actuator
An actuator is a component of a machine that is responsible for moving and controlling a mechanism or
system, for example by opening a valve. In simple terms, it is a "mover".An actuator requires a control
signal and a source of energy. The control signal is relatively low energy and may be electric voltage or
current, pneumatic or hydraulic pressure, or even human power. Its main energy source may be an electric
current, hydraulic fluid pressure, or pneumatic pressure. When it receives a control signal, an actuator
responds by converting the signal's energy into mechanical motion.An actuator is the mechanism by which a
control system acts upon an environment. The control system can be simple (a fixed mechanical or
electronic system), software-based (e.g. a printer driver, robot control system), a human, or any other input.

4.1.8 Stepper Motor


Stepper Motor is a brushless electromechanical device which converts the train of electric pulses applied at
their excitation windings into precisely defined step-by-step mechanical shaft rotation. The shaft of the
motor rotates through a fixed angle for each discrete pulse. This rotation can be linear or angular.It gets one
step movement for a single pulse input.When a train of pulses is applied, it gets turned through a certain
angle. The angle through which the stepper motor shaft turns for each pulse is referred as the step angle,
which is generally expressed in degrees.

Fig-Stepper motor

The number of input pulses given to the motor decides the step angle and hence the position of motor shaft
is controlled by controlling the number of pulses. This unique feature makes the stepper motor to be well
suitable for open-loop control system wherein the precise position of the shaft is maintained with exact
number of pulses without using a feedback sensor.
If the step angle is smaller, the greater will be the number of steps per revolutions and higher will be the
accuracy of the position obtained. The step angles can be as large as 90 degrees and as small as 0.72
degrees, however, the commonly used step angles are 1.8 degrees, 2.5 degrees, 7.5 degrees and 15 degrees.
CHAPTER 5

RESULT AND DISCUSSION

5.1 Microcontroller (AT MEGA 328)


• ATmega328 is an 8-bit and 28 Pins AVR Microcontroller manufactured by

Microchip,follows RISC Architecure and has a flash type program memory of 32KB.

• It has an EEPROM memory of 1KB and its SRAM memory is of 2KB.

• It has 8 Pin for ADC operations, which all combines to form PortA ( PA0 – PA7 ).

• It also has 3 builtin Timers, two of them are 8 Bit timers while the third one is 16-Bit

Timer.

• You must have heard of Arduino UNO, UNO is based on atmega328 Microcontroller. It’s

UNO’s heart.

• It operates ranging from 3.3V to 5.5V but normally we use 5V as a standard.

• Its excellent features include the cost efficiency, low power dissipation, programming

lock for security purposes, real timer counter with separate oscillator.

• It’s normally used in enbaded system applications. You should have a look at these Real

Life Example Enbaded system, we can design all of them using this Microcontroller.

• The following table shows the complete features of ATmega328:


AT MEGA 328 Features

Aatatatdlcgklbv;sdfgldfmkl;Tmega328 Features
No. of Pins 28
CPU RISC 8-Bit AVR
Operating Voltage 1.8 to 5.5 V
Program Memory 32KB
Program Memory Type Flash
SRAM 2048 Bytes
EEPROM 1024 Bytes
ADC 10-Bit
Number of ADC Channels 8
PWM Pins 6
Comparator 1
8-pin PDIP
32-lead TQFP

Packages (4) 28-pad QFN/MLF

32-pad QFN/MLF

Oscillator up to 20 MHz
Timer (3) 8-Bit x 2 & 16-Bit x 1
Enhanced Power on Reset Yes
Power Up Timer Yes
I/O Pins 23
Manufacturer Microchip
SPI Yes
I2C Yes
Watchdog Timer Yes
Brown out detect (BOD) Yes
Reset Yes
USI (Universal Serial Interface) Yes
Minimum Operating Temperature -40 C to +85 C
5.1.1 ATMEGA 328 PIN
• ATmega-328 is an AVR microcontroller having twenty eight (28) pins in total.

• All of the pins in chronological order, are listed in the table shown in the figure given

below.

5.1.2 AT MEGA 328 Pins Discriptions


• Functions associated with the pins must be known in order to use the device appropriately.

• ATmega-328 pins are divided into different ports which are given in detail below.

VCC is a digital voltage supply.


AVCC is a supply voltage pin for analog to digital converter.
GND denotes Ground and it has a 0V.
Port A consists of the pins from PA0 to PA7. These pins serve as analog input to analog to
digital converters. If analog to digital converter is not used, port A acts as an eight (8) bit
bidirectional input/output port.
Port B consists of the pins from PB0 to PB7. This port is an 8 bit bidirectional port having an
internal pull-up resistor.
Port C consists of the pins from PC0 to PC7. The output buffers of port C has symmetrical
drive characteristics with source capability as well high sink.
Port D consists of the pins from PD0 to PD7. It is also an 8 bit input/output port having an
internal pull-up resistor.
• All of the AVR ports are shown in the figure given below.

AREF is an analog reference pin for analog to digital converter.


• So this was the brief of all the pins in ATmega 328 AVR micro-controller.

5.1.3 Coding

. #include <LiquidCrystal.h>
LiquidCrystal lcd(5, 6, 7, 8, 9, 10);
int mot11 = 3;
int mot12 = 11;

int pos1 = A0;


int pos2 = A1;s
byte pos1_value ;
byte pos2_value ;
byte pos3_value ;
byte pos4_value ;
void setup() {
// put your setup code here, to run once:
// Serial.begin(9600);
pinMode(mot11,OUTPUT);
pinMode(mot12,OUTPUT);

pinMode(pos1,INPUT);
pinMode(pos2,INPUT);

lcd.begin(16, 2);
lcd.print("Solar sun");
lcd.setCursor(0,1);
lcd.print(" Seeker");
analogWrite(mot11, 0);
analogWrite(mot12, 0);

delay(2000);
}

void loop() {
// put your main code here, to run repeatedly:
pos1_value = digitalRead(pos1);
pos2_value = digitalRead(pos2);

if(pos1_value== HIGH && pos2_value== LOW){


analogWrite(mot11, 150);
analogWrite(mot12, 0);
lcd.clear();
lcd.print("RIGHT");
//digitalWrite(mot11,1);
//digitalWrite(mot12,0);
// delay(10);
// analogWrite(mot11, 0);
// analogWrite(mot12, 0)
CHAPTER 6

6.1 CONCLUSION

6.2 FUTURE SCOPE


REFERNCES

You might also like