Sie sind auf Seite 1von 37

SUN TRACKING SOLAR PANEL USING STEPPER MOTOR AND

MICROCONTROLLER

Objective

The objective of our project is Sun Tracking Solar Panel Using Stepper Motor and
Microcontroller

Brief Methodology

This project is designed with,

Hardware Requirements

 Microcontroller
 LDR Sensor
 Oscillator Circuit
 Stepper Motor driver
 Stepper Motor
 Solar Panel
 Power Supply

Software requirements

 MPLAB Software
 Embedded C- Language
 PicKit-2(Programming Kit)

Sun Tracking Solar Panel Principle:

The Sun tracking solar panel consists of two LDRs, solar panel and stepper motor and Micro
controller.
Two light dependent resistors are arranged on the edges of the solar panel. Light
dependent resistors produce low resistance when light falls on them. The stepper motor
connected to the panel rotates the panel in the direction of Sun. Panel is arranged in such a way
that light on two LDRs is compared and panel is rotated towards LDR which have high intensity
i.e. low resistance compared to other. Stepper motor rotates the panel at certain angle.

When the intensity of the light falling on right LDR is more, panel slowly moves towards
right and if intensity on the left LDR is more, panel slowly moves towards left.

In the noon time, Sun is ahead and intensity of light on both the panels is same. In such
cases, panel is constant and there is no rotation.

BLOCK DIAGRAM
PIC Microcontroller

 PIC is a family of modified Harvard architecture microcontrollers made by Microchip


Technology
 The PIC initially referred to “peripheral interface controller”.
 High –performance RISC CPU.
 Only 35 Signal word instructions to learn.

Operating Speed:

 0– 20 MHz Clock input.


 0 – 200ns instruction cycle
 Timer: 8-bit timer/counter with 8-bit pre scalar.
 Timer1: 16-bit timer /counter with pre scalar can be incremented during sleep via external
crystal /clock.
 Timer2: 8-bit timer/counter with 8 bit period register, pre-scaler and postscaler.
 10-bit multi-channel analog-to-digital converter.

INTERFACING LCD TO THE MICROCONTROLLER

This is the first interfacing example for the parallel port. We will star with something
simple. This example does not use the Bi-directional feature found on newer ports, thus it should
work with most, if not all Parallel Ports.

It however does not show the use of the status port as an input. So what are we
interfacing? A 16 Character, 2 Line LCD Modules to the Parallel Port. These LCD Modules are
very common these days, and are quite simple to work with, as all the logic required running
them is on board.

FEATURES

 Interface with either 4-bit or 8-bit microprocessor.


 8 different users programmed 5 X 7 dot-matrix patterns.
 Display data RAM and character generator RAM may be
 Accessed by the microprocessor.
 Clear Display, Cursor Home, Display ON/OFF, Cursor
 ON/OFF, Blink Character, Cursor Shift, Display Shift.
 Built-in reset circuit is triggered at power ON.

LIGHT DEPENDENT RESISTOR

There are hundreds of different relay types. Let's find out first how a relay operates. This
relay is basically called as +12v electro-magnetic relay. A photo resistor (or light-dependent
resistor, LDR, or photocell) is a light-controlled variable resistor.

The resistance of a photo resistor decreases with increasing incident light intensity; in
other words, it exhibits photoconductivity. A photo resistor can be applied in light-sensitive
detector circuits, and light- and dark-activated switching circuits.
POWER SUPPLY

Block Diagram

The ac voltage, typically 220V rms, is connected to a transformer, which steps that ac voltage
down to the level of the desired dc output. A diode rectifier then provides a full-wave rectified
voltage that is initially filtered by a simple capacitor filter to produce a dc voltage. This resulting
dc voltage usually has some ripple or ac voltage variation.

A regulator circuit removes the ripples and also remains the same dc value even if the input
dc voltage varies, or the load connected to the output dc voltage changes. This voltage regulation
is usually obtained using one of the popular voltage regulator IC units.

TRANSFORMER RECTIFIER FILTER IC REGULATOR LOAD

Fig 2.1 Block Diagram of Power supply

Working principle

Transformer

The potential transformer will step down the power supply voltage (0-230V) to (0-6V) level.
Then the secondary of the potential transformer will be connected to the precision rectifier,
which is constructed with the help of op–amp. The advantages of using precision rectifier are it
will give peak voltage output as DC, rest of the circuits will give only RMS output.
Bridge rectifier
When four diodes are connected as shown in figure, the circuit is called as bridge rectifier.
The input to the circuit is applied to the diagonally opposite corners of the network, and the
output is taken from the remaining two corners.
Let us assume that the transformer is working properly and there is a positive potential, at point
A and a negative potential at point B. the positive potential at point A will forward bias D3 and
reverse bias D4.
The negative potential at point B will forward bias D1 and reverse D2. At this time D3 and D1
are forward biased and will allow current flow to pass through them; D4 and D2 are reverse
biased and will block current flow.

The maximum voltage that appears across the load resistor is nearly-but never exceeds-500 v0lts,
as result of the small voltage drop across the diode. In the bridge rectifier shown in view B, the
maximum voltage that can be rectified is the full secondary voltage, which is 1000 volts.
Therefore, the peak output voltage across the load resistor is nearly 1000 volts. With both circuits
using the same transformer, the bridge rectifier circuit produces a higher output voltage than the
conventional full-wave rectifier circuit.
IC voltage regulators

Voltage regulators comprise a class of widely used ICs. Regulator IC units contain the
circuitry for reference source, comparator amplifier, control device, and overload protection all
in a single IC. IC units provide regulation of either a fixed positive voltage, a fixed negative
voltage, or an adjustably set voltage. The regulators can be selected for operation with load
currents from hundreds of milli amperes to tens of amperes, corresponding to power ratings from
milli watts to tens of watts.
Fig 2.2 Circuit Diagram of Power Supply

A fixed three-terminal voltage regulator has an unregulated dc input voltage, Vi, applied to one
input terminal, a regulated dc output voltage, Vo, from a second terminal, with the third terminal
connected to ground.

The series 78 regulators provide fixed positive regulated voltages from 5 to 24 volts. Similarly,
the series 79 regulators provide fixed negative regulated voltages from 5 to 24 volts.
 For ICs, microcontroller, LCD --------- 5 volts
 For alarm circuit, op-amp, relay circuits ---------- 12 volts

EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLE


Understand User
Requirements

Choose Optimum
Electronic Chip

S/W Side
H/W Side

HLL/ALL
PCB Layout Design

Algorithm

Coding/Editing Assembling
Compiling/Assembling Components

Debugging

Testing Testing

Simulator

S/W H/W

Download

ICE (In-Circuit
Emulator)

Embedded Product

Figure – 13 Embedded Product Development Life Cycle

INTEL’S 8051 ARCHITECTURE


The generic 8031 architecture sports a Harvard architecture, which contains two separate
buses for both program and data. So, it has two distinctive memory spaces of 64K X 8 size for
both program and data. It is based on an 8 bit central processing unit with an 8 bit Accumulator
and another 8 bit B register as main processing blocks. Other portions of the architecture include
few 8 bit and 16 bit registers and 8 bit memory locations.

Each 8031 device has some amount of data RAM built in the device for internal
processing. This area is used for stack operations and temporary storage of data.

This base architecture is supported with onchip peripheral functions like I/O ports,
timers/counters, versatile serial communication port. So it is clear that this 8031 architecture was
designed to cater many real time embedded needs.

The following list gives the features of the 8051 architecture:

 Optimized 8 bit CPU for control applications.


 Extensive Boolean processing capabilities.
 64K Program Memory address space.
 64K Data Memory address space.
 128 bytes of onchip Data Memory.
 32 Bi-directional and individually addressable I/O lines.
 Two 16 bit timer/counters.
 Full Duplex UART, On-chip clock oscillator.
 6-source / 5-vector interrupt structure with priority levels.

Now you may be wondering about the non mentioning of memory space meant for the
program storage, the most important part of any embedded controller. Originally this 8031
architecture was introduced with onchip, ‘one time programmable’ version of Program Memory
of size 4K X 8. Intel delivered all these microcontrollers (8051) with user’s program fused inside
the device. The memory portion was mapped at the lower end of the Program Memory area. But,
after getting devices, customers couldn’t change any thing in their program code, which was
already made available inside during device fabrication.

Figure 1 - Block Diagram of the 8031 Core

So, very soon Intel introduced the 8031 devices (8751) with re-programmable type of Program
Memory using built-in EPROM of size 4K X 8. Like a regular EPROM, this memory can be re-
programmed many times. Later on Intel started manufacturing these 8031 devices without any
onchip Program Memory.

Now I go ahead giving more information on the important functional blocks of the 8031.

DIFFERENCES BETWEEN MICROCONTROLLER AND MICROPROCESSOR:

 Microprocessors have many instructions for moving data from external memory to internal
memory. But microcontrollers have a few such instructions.
 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 Microcontroller is concerned with that of bits within the chip.

PIC Microcontroller

PIC Microcontroller:

PIC microcontroller was developed in the year 1993 by microchip technology. The term PIC
stands for Peripheral Interface Controller. Initially this was developed for supporting PDP
computers to control its peripheral devices, and therefore, named as a peripheral interface device.
These microcontrollers are very fast and easy to execute a program compared with other
microcontrollers.

What is a PIC Microcontroller?

PIC (Programmable Interface Controllers) microcontrollers are the worlds smallest


microcontrollers that can be programmed to carry out a huge range of tasks. These
microcontrollers are found in many electronic devices such as phones, computer control systems,
alarm systems, embedded systems, etc. Various types of microcontrollers exist, even though the
best are found in the GENIE range of programmable microcontrollers. These microcontrollers
are programmed and simulated by a circuit-wizard software.

Every PIC microcontroller architecture consists of some registers and stack where registers
function as Random Access Memory( RAM) and stack saves the return addresses. The main
features of PIC microcontrollers are RAM, flash memory, Timers/Counters, EEPROM, I/O Ports,
USART, CCP (Capture/Compare/PWM module), SSP, Comparator, ADC (analog to digital
converter), PSP(parallel slave port), LCD and ICSP (in circuit serial programming) The 8-bit PIC
microcontroller is classified into four types on the basis of internal architecture such as Base
Line PIC, Mid Range PIC, Enhanced Mid Range PIC and PIC18.

Other PIC MCU’s


PIC12F508, PIC12F629, PIC12F683, PIC16F505, PIC16F628A, PIC16F676, PIC16F72,
PIC16F873A, PIC16F876A, PIC16F886, PIC18F252, PIC18F25520, PIC18F452, PIC18F4520

PIC16F877A

This powerful (200 nanosecond instruction execution) yet easy-to-program (only 35 single word
instructions) CMOS FLASH-based 8-bit microcontroller packs Microchip's powerful PIC®
architecture into an 40 package and is upwards compatible with the PIC16C5X, PIC12CXXX
and PIC16C7X devices. The PIC16F877A features 256 bytes of EEPROM data memory, self
programming, an ICD, 2 Comparators, 8 channels of 10-bit Analog-to-Digital (A/D) converter, 2
capture/compare/PWM functions, the synchronous serial port can be configured as either 3-wire
Serial Peripheral Interface (SPI™) or the 2-wire Inter-Integrated Circuit (I²C™) bus and a
Universal Asynchronous Receiver Transmitter (USART).

We know that the microcontroller is an integrated chip which consists of CPU, RAM,
ROM, timers, and counters, etc. In the same way, PIC microcontroller architecture consists of
RAM, ROM, CPU, timers, counters and supports the protocols such as SPI, CAN, and UART for
interfacing with other peripherals. At present PIC microcontrollers are extensively used for
industrial purpose due to low power consumption, high performance ability and easy of
availability of its supporting hardware and software tools like compilers, debuggers and
simulators.

PIN DIAGRAM
PIC16F877A Pin Configuration

Pin Pin Name Description


Number

1 MCLR/Vpp MCLR is used during programming, mostly connected


to programmer like PicKit

2 RA0/AN0 Analog pin 0 or 0th pin of PORTA

3 RA1/AN1 Analog pin 1 or 1st pin of PORTA

4 RA2/AN2/Vref- Analog pin 2 or 2nd pin of PORTA

5 RA3/AN3/Vref+ Analog pin 3 or 3rd pin of PORTA

6 RA4/T0CKI/C1out 4th pin of PORTA

7 RA5/AN4/SS/C2out Analog pin 4 or 5th pin of PORTA


8 RE0/RD/AN5 Analog pin 5 or 0th pin of PORTE

9 RE1/WR/AN6 Analog pin 6 or 1st pin of PORTE

10 RE2/CS/AN7 7th pin of PORTE

11 Vdd Ground pin of MCU

12 Vss Positive pin of MCU (+5V)

13 OSC1/CLKI External Oscillator/clock input pin

14 OSC2/CLKO External Oscillator/clock output pin

15 RC0/T1OSO/T1CKI 0th pin of PORT C

16 RC1/T1OSI/CCP2 1st pin of POCTC or Timer/PWM pin

17 RC2/CCP1 2nd pin of POCTC or Timer/PWM pin

18 RC3/SCK/SCL 3rd pin of POCTC

19 RD0/PSP0 0th pin of POCTD

20 RD1/PSPI 1st pin of POCTD

21 RD2/PSP2 2nd pin of POCTD

22 RD3/PSP3 3rd pin of POCTD

23 RC4/SDI/SDA 4th pin of POCTC or Serial Data in pin

24 RC5/SDO 5th pin of POCTC or Serial Data Out pin

25 RC6/Tx/CK 6th pin of POCTC or Transmitter pin of Microcontroller


26 RC7/Rx/DT 7th pin of POCTC or Receiver pin of Microcontroller

27 RD4/PSP4 4th pin of POCTD

28 RD5/PSP5 5th pin of POCTD

29 RD6/PSP6 6th pin of POCTD

30 RD7/PSP7 7th pin of POCTD

31 Vss Positive pin of MCU (+5V)

32 Vdd Ground pin of MCU

33 RB0/INT 0th pin of POCTB or External Interrupt pin

34 RB1 1st pin of POCTB

35 RB2 2nd pin of POCTB

36 RB3/PGM 3rd pin of POCTB or connected to programmer

37 RB4 4th pin of POCTB

38 RB5 5th pin of POCTB

39 RB6/PGC 6th pin of POCTB or connected to programmer

40 RB7/PGD 7th pin of POCTB or connected to programmer

Architecture of PIC Microcontroller


The PIC microcontroller architecture comprises of CPU, I/O ports, memory organization,
A/D converter, timers/counters, interrupts, serial communication, oscillator and CCP module
which are discussed in detailed below.

Architecture of PIC Microcontroller

CPU (Central Processing Unit)

It is not different from other microcontrollers CPU and the PIC microcontroller CPU consists
of the ALU, CU, MU and accumulator, etc. Arithmetic logic unit is mainly used for arithmetic
operations and to take logical decisions. Memory is used for storing the instructions after
processing. To control the internal and external peripherals, control unit is used which are
connected to the CPU and the accumulator is used for storing the results and further process.

Memory Organization

The memory module in the PIC microcontroller architecture consists of RAM (Random
Access Memory), ROM (Read Only Memory) and STACK.
Random Access Memory (RAM)

RAM is an unstable memory which is used to store the data temporarily in its registers. The
RAM memory is classified into two banks, and each bank consists of so many registers. The
RAM registers are classified into two types: Special Function Registers (SFR) and General
Purpose Registers (GPR).

General Purpose Registers (GPR)

These registers are used for general purpose only as the name implies. For example, if we
want to multiply two numbers by using the PIC microcontroller. Generally, we use registers for
multiplying and storing the numbers in other registers. So these registers don’t have any special
function,- CPU can easily access the data in the registers.

Special Function Registers

These registers are used for special purposes only as the name SFR implies. These registers
will perform according to the functions assigned to them , and they cannot be used as normal
registers. For example, if you cannot use the STATUS register for storing the data, these registers
are used for showing the operation or status of the program. So, user cannot change the function
of the SFR; the function is given by the retailer at the time of manufacturing.

Special Function Registers

Memory Organization
Read Only Memory (ROM)

Read only memory is a stable memory which is used to store the data permanently. In PIC
microcontroller architecture, the architecture ROM stores the instructions or program, according
to the program the microcontroller acts. The ROM is also called as program memory, wherein
the user will write the program for microcontroller and saves it permanently, and finally the
program is executed by the CPU. The microcontrollers performance depends on the instruction,
which is executed by the CPU.

Electrically Erasable Programmable Read Only Memory (EEPROM)

In the normal ROM, we can write the program for only once we cannot use again the
microcontroller for multiple times. But, in the EEPROM, we can program the ROM multiple
times.

Flash Memory

Flash memory is also programmable read only memory (PROM) in which we can read, write
and erase the program thousands of times. Generally, the PIC microcontroller uses this type of
ROM.

Stack

When an interrupt occurs, first the PIC microcontroller has to execute the interrupt and the
existing process address. Then that is being executed is stored in the stack. After completing the
execution of the interrupt, the microcontroller calls the process with the help of address, which is
stored in the stack and get executes the process.

I/O Ports

The series of PIC16 consists of five ports such as Port A, Port B, Port C, Port D & Port E.
Port A is an 16-bit port that can be used as input or output port based on the status of the TRISA
(Tradoc Intelligence Support Activity) register. Port B is an 8- bit port that can be used as both
input and output port. Port C is an 8-bit and the input of output operation is decided by the status
of the TRISC register. Port D is an 8-bit port acts as a slave port for connection to the
microprocessor BUS. Port E is a 3-bit port which serves the additional function of the control
signals to the analog to digital converter.

BUS

BUS is used to transfer and receive the data from one peripheral to another. It is classified
into two types such as data bus and address.

Data Bus: It is used for only transfer or receive the data.

Address Bus: Address bus is used to transmit the memory address from the peripherals to the
CPU. I/O pins are used to interface the external peripherals; UART and USART both are serial
communication protocols which are used for interfacing serial devices like GSM, GPS,
Bluetooth, IR , etc.

BUS

A/D converters
The main intention of this analog to digital converter is to convert analog voltage values to
digital voltage values. A/D module of PIC microcontroller consists of 5 inputs for 28 pin devices
and 8 inputs for 40 pin devices. The operation of the analog to digital converter is controlled by
ADCON0 and ADCON1 special registers. The upper bits of the converter are stored in register
ADRESH and lower bits of the converter are stored in register ADRESL. For this operation, it
requires 5V of an analog reference voltage.

A/D CONVERTER

Timers/ Counters

PIC microcontroller has four timer/counters wherein the one 8-bit timer and the remaining
timers have the choice to select 8 or 16-bit mode. Timers are used for generating accuracy
actions, for example, creating specific time delays between two operations.

Interrupts
PIC microcontroller consists of 20 internal interrupts and three external interrupt sources
which are associated with different peripherals like ADC, USART, Timers, and so on.

Serial Communication

Serial communication is the method of transferring data one bit at a time sequentially over a
communication channel.

USART: The name USART stands for Universal synchronous and Asynchronous Receiver and
Transmitter which is a serial communication for two protocols. It is used for transmitting and
receiving the data bit by bit over a single wire with respect to clock pulses. The PIC
microcontroller has two pins TXD and RXD. These pins are used for transmitting and receiving
the data serially.

SPI Protocol: The term SPI stands for Serial Peripheral Interface. This protocol is used to send
data between PIC microcontroller and other peripherals such as SD cards, sensors and shift
registers. PIC microcontroller support three wire SPI communications between two devices on a
common clock source. The data rate of SPI protocol is more than that of the USART.

I2C Protocol: The term I2C stands for Inter Integrated Circuit , and it is a serial protocol which
is used to connect low speed devices such as EEPROMS, microcontrollers, A/D converters, etc.
PIC microcontroller support two wire Interface or I2C communication between two devices
which can work as both Master and Slave device.

Serial Communication
Serial Communication

Oscillators

Oscillators are used for timing generation. PIC microcontroller consist of external oscillators like
RC oscillators or crystal oscillators. Where the crystal oscillator is connected between the two
oscillator pins. The value of the capacitor is connected to every pin that decides the mode of the
operation of the oscillator. The modes are crystal mode, high-speed mode and the low-power
mode. In case of RC oscillators, the value of the resistor & capacitor determine the clock
frequency and the range of clock frequency is 30KHz to 4MHz.

CCP module

The name CCP module stands for capture/compare/PWM where it works in three modes
such as capture mode, compare mode and PWM mode.
Capture Mode: Capture mode captures the time of arrival of a signal, or in other words, when
the CCP pin goes high, it captures the value of the Timer1.

Compare Mode: Compare mode acts as an analog comparator. When the timer1 value reaches a
certain reference value, then it generates an output.

PWM Mode: PWM mode provides pulse width modulated output with a 10-bit resolution and
programmable duty cycle.

PIC Microcontroller Applications

The PIC microcontroller projects can be used in different applications, such as peripherals,
audio accessories, video games, etc. For better understanding of this PIC microcontroller, the
following project demonstrates PIC microcontroller’s operations.

 Multiple DIY Projects


 Very good choice if you are learning PIC
 Projects requiring Multiple I/O interfaces and communications
 Replacement for Arduino Module
 Ideal for more advanced level A/D applications in automotive, industrial, appliances and
consumer applications.

Advantages of PIC Microcontroller:

 They are reliable and malfunctioning of PIC percentage is very less. And performance of
the PIC
 is very fast because of using RISC architecture.
 Power conception is also very less when compared to other micro controllers. When we
see in
 the programmer point of view interfacing is very easy, also we can connect analog
devices
 directly with out any extra circuitry and use them. Programming is also very easy when
compared to other microcontrollers.
Disadvantages of PIC Microcontroller:
 The length of the program will be big because of using RISC (35 instructions).
 Program memory is not accessible and only one single accumulator is present.

LCD Display

Liquid Crystal Display. A type of display used especially in small portable electronic
devices. A type of display, usually numerical, used in electronic equipment. Dark characters are
formed on a lighter background. Requires external back lighting to be visible under low-light
conditions.

Figure 7 – LCD Diagram

One of the most popular output devices for embedded electronics is LCD. The LCD interface has
become very simple. This is due to the availability modules for LCDs. The LCD along with
necessary controller (LCD Controller) and mounting facility is made available in the module
itself. The LCD controller takes care of everything necessary for the LCD. We communicate with
the LCD controller with the help of a command set provided by the manufacturer.
Pin Diagram

Figure 1.1 Pin Diagram

LCD Display Pin Description:

Vcc, Vss, and VEE:


While Vcc and Vss provide +5V and ground, respectively, VEE is used for controlling
LCD contrast.

RS – register select:

There are two very important registers inside the LCD. The RS pin is used for their selection as
follows. If RS = 0, the instruction command code register is selected, allowing the user to send a
command such as clear display, cursor at home, etc. If RS = 1 the data register is selected,
allowing the user to send data to be displayed on the LCD.

R/W – read/write:

R/W input allows the user to write information to the LCD or read information from it. R/W = 1
when reading; R/W =0 when writing.

E – Enable:

The enable pin is used by the LCD to latch information presented to its data pins. When data is
supplied to data pins, a high to low pulse must be applied to this pin in order for the LCD to latch
in the data present at the data pins. This pulse must be a minimum of 450 ns wide.

D0 – D7:

The 8 bit data pins, D0 – D7, are used to send information to the LCD or read the contents of the
LCD’s internal registers.

To display letters and numbers, we send ASCII codes for the letters A – Z, a – z, and numbers 0 –
9 to these pins while making RS = 1.

There are also instructions command codes that can be sent to the LCD to clear the display or
force the cursor to the home position or blink the cursor. Table below lists the instruction
command codes.

LCD Commands table:


We also use RS = 0 to check the busy flag bit to see if the LCD is ready to receive information.
The busy flag is D7 and can be read when R/W =1 and RS = 0, as follows: if R/W =1, RS =0.
When D7 = 1(busy flag = 1), the LCD busy taking care of internal operations and will not accept
any new information. When D7 = 0, the LCD is ready to receive new information. Note: It is
recommended to check the busy flag before writing any data to the LCD.
Interfacing 8051 with LCD:

From the above figure microcontroller is used for 8 bit data display on the LCD. Data lines of the
LCD Pin no.7 to pin no 14 are connected to the port 1 of the microcontroller. The control pin
no.4 register select is connected to P3.5, pin no.5 of LCD for Read/write is connected to P3.6 and
the enable pin (6) is connected to microcontroller.

LIGHT DEPENDENT RESISTOR: -

LDRs or Light Dependent Resistors are very useful especially in light/dark sensor circuits.
Normally the resistance of an LDR is very high, sometimes as high as 1000 000 ohms, but when
they are illuminated with light resistance drops dramatically.

Electronic opto sensors are the devices that alter their electrical characteristics, in the
presences of visible or invisible light. The best-known devices of this type are the light
dependent resistor (LDR), the photo diode and the phototransistors.

Light dependent resistor as the name suggests depends on light for the variation of resistance.

 LDR are made by depositing a film of cadmium sulphide or cadmium selenide on a


substrate of ceramic containing no or very few free electrons when not illuminated. The film is
deposited in a zig zag fashion in the form of a strip. The longer the strip the more the value of
resistance.
 When light falls on the strip, the resistance decreases. In the absence of light the
resistance can be in the order of 10K ohm to 15K ohm and is called the dark resistance.

Depending on the exposure of light the resistance can fall down to value of 500 ohms. The
power ratings are usually smaller and are in the range 50mw to .5w. Though very sensitive to
light, the switching time is very high and hence cannot be used for high frequency
applications. They are used in chopper amplifiers.
Light dependent resistors are available as discs 0.5cm to 2.5cm. The resistance rises to
several Mega ohms under dark conditions.

The below figure shoes that when the torch is turned on, the resistance of the LDR falls,
allowing current to pass through it is shown in figure.

The basic construction and symbol for LDR are shown in above figures respectively. The
device consists of a pair of metal film contacts. Separated by a snakelike track of cadmium
sulphide film, designed to provide the maximum possible contact area with the two metal
films. The structure is housed in a clear plastic or resin case, to provide free access to
external light. Practical LDRs are available in variety of sizes and packages styles, the most
popular size having a face diameter of roughly 10mm. practical LDR is shown in below
figure.
Spectral response:

The resistors are only light dependent over a limited range of wavelengths. LDRs have
their maximum response at about 680nm.

Temperature dependency:

Electrons can be excited not only by photons but also by thermal agitation. The dark
resistance is therefore not infinite at normal temperatures. It increases with the ambient
temperature coefficient is, however, very small and can be neglected.

Recovery rate:

When an LDR is brought from a certain illuminating level into total darkness, the resistance
does not increase immediately to the dark value. The recovery rate is specified in k
ohm/second and for current LDR types it is more than 200k ohm/second. The recovery rate is
much greater in the reverse direction, e.g. going from darkness to illumination level of 300
lux, it takes less than 10ms to reach a resistance which corresponds with a light level of 400
lux.
LDRs are sensitive, inexpensive, and readily available devices. They have good power
and voltage handling capabilities, similar to those of a conventional resistor. Their only
siginificant defect is that they are fairly low acting, taking tens or hundreds of LDR include light
and dark-activated switches and alarms, light beam alarms and reflective smoke alarms etc. A
LDR may be connected either way round and no special precautions are required when
soldering.

 Darkness: Maximum resistance, about 1Mohm.


 Very bright light: Minimum resistance, about 100 ohm.

The LDR is a variable resistor whose resistance decreases with the increase in light intensity.
Two cadmium sulphide (cds) photoconductive cells with spectral response similar to that of
the human eye. The cell resistance falls with increasing light intensity.

STEPPER MOTOR

A stepper motor is an electromechanical device which converts electrical pulses into


discrete mechanical movements. The shaft or spindle of a stepper motor rotates in discrete step
increments when electrical command pulses are applied to it in the proper sequence. The motors
rotation has several direct relationships to these applied input pulses. The sequence of the applied
pulses is directly related to the direction of motor shafts rotation. The speed of the motor shafts
rotation is directly related to the frequency of the input pulses and the length of rotation is
directly related to the number of input pulses applied.

When to Use a Stepper Motor:

A stepper motor can be a good choice whenever controlled movement is required. They
can be used to advantage in applications where you need to control rotation angle, speed,
position and synchronism. Because of the inherent advantages listed previously, stepper motors
have found their place in many different applications. Some of these include printers, plotters,
high end office equipment, hard disk drives, medical equipment, fax machines, automotive and
many more.

TWO PHASE STEPPER MOTOR WIRING:

The above motor is a two phase motor. This is sometimes called Unipolar. The two
phase coils are center tapped and this case the center taps are connected to ground. These coils
are wound so that it is reversed when the drive signal is applied to either coil at a time. The N
and S of the stator phase are reversed depending upon whether the drive signal is applied to coil
1 as opposed to coil 2.
Fig: Two phase stepper motor wiring

Step Angle Accuracy:

One reason why the stepper motor has achieved such popularity as a positioning device is
its accuracy and repeatability. Typically stepper motors will have a step angle accuracy of 3 – 5%
of one step. This error is also noncumulative from step to step. The accuracy of the stepper motor
is mainly a function of the mechanical

precision of its parts and assembly. Figure 9 shows a typical plot of the positional accuracy of a
stepper motor.

Stepper Motor Advantages and Disadvantages:

Advantages:

1. The rotation angle of the motor is proportional to the input pulse.

2. The motor has full torque at standstill (if the windings are energized)

3. Precise positioning and repeatability of movement since good stepper motors have an accuracy
of 3 – 5% of a step and this error is non cumulative from one step to the next.

4. Excellent response to starting/ stopping/reversing.


5. Very reliable since there are no contact brushes in the motor. Therefore the life of the motor is
simply dependant on the life of the bearing.

6. The motors response to digital input pulses provides open-loop control, making the motor
simpler and less costly to control.

7. It is possible to achieve very low speed synchronous rotation with a load that is directly
coupled to the shaft.

8. A wide range of rotational speeds can be realized as the speed is proportional to the frequency
of the input pulses.

Disadvantages:

1. Resonances can occur if not properly controlled.

2. Not easy to operate at extremely high speeds.

Open Loop Operation:

One of the most significant advantages of a stepper motor is its ability to be accurately controlled
in an open loop system. Open loop control means no feedback information about position is
needed. This type of control eliminates the need for expensive sensing and feedback devices such
as optical encoders. Your position is known simply by keeping track of the input step pulses.
CONCLUSION:

In this SUN TRACKING SOLAR PANEL USING STEPPER MOTER AND


MICROCONTROLLER system has been designed to improve the domestic and industrial
safety. The system was a positive learning experience for the student, which allows maximizing
his creative potential as well as utilizing many technologies in Electrical Engineering
Technology discipline.

REFERENCES

 A. Bruce Carlson, Communication Systems , Tata McGraw Hill, 1986


 Edward.C.Jordan and Keith.G.Balmain, "Electromagnetic waves and radiating systems",
Prentice Hall, 2nd Edition, 1995.

 FLOYD: Digital Fundamentals, Universal Book Stall, New Delhi.1993


 George Kennedy: Electronic communication systems, Tata McGraw Hill publications, 1992
 Gaonkar R.S., Microprocessor architecture Programming and application, Wiley Eastern
Ltd., New Delhi, 1995.
 Irving I.Kosow, “Electric Machinery and Transformers”, PHI, Second Edition, 2001.
 I.J. Nagrath & D.P. Kothari, “Electrical Machines”, Tata McGraw Hill Publications, Second
Edition 1997.
 John B.Peatman, Design with Microcontrollers, McGraw Hill International, USA, 1988.
 John D.Kraus, “Antennas “Tata McGraw Hill 2nd Edition, 2000.
 K. Feher, Wireless Digital Communication, Prentice Hall of India, New Delhi, 1995.
 Kennedy, Electronic Communication systems Mc Graw Hill.1987
 Kenneth Hint, and Daniel Tabak, Microcontrollers, Architecture, Implementation and
Programming, McGraw Hill International, USA, 1992.
 Moris Mano, ‘ Digital Electronics and Design’, Prentice Hall of India, 2000
 Mathur A.P., Introduction of Microprocessors, Tata McGraw-Hill Publishing Co.Ltd, New
Delhi, 1989.

 Prasad .K.D., "Antennas and wave propagation", Satya prakasan, 3rd Edition, 1996
 Roddy and Coolen, Electronic Communication, PHI 1999
 Simon Haykins, ‘principles of Communications, Prentice Hall of India. 2001
 Simon Haykins, Communication Systems Wiley 1995
 S.K Bhattacharya, “Electrical Machines”, Tata McGraw Hill Publications. 1997.
 T.S. Rappaport, Wireless Communication, Principle and Practice, Prentice Hall, NJ, 1996
 W.C.Y. Lee, Mobile Communication Engineering; Theory and Application, Second Edition,
McGraw Hill International, 1998.

Das könnte Ihnen auch gefallen