Você está na página 1de 21

Project report

Solar tracking system

Table of contents
1. Introduction 2. Block diagram 3. Block diagram description 3.1 light sensor 3.2 not gate 3.3 Microcontroller 3.4 Motor driver 3.5 Stepper motor 3.6 Power Supply 4. Circuit Diagram 5. Circuit Diagram Description 6. list of components 7. working 8. software description 9. Software tools 10.Results and conclusions 11.References

List of figures and tables


Figure1: Block diagram Figure2: circuit diagram Table1: list of components

INTRODUCTION

Light striking certain substances causes the surface of the material to emit electrons. It is as if light somehow kicks electrons right out of atoms. Light striking other substances causes the material to accept electrons. It is the combination of these two substances that can be made use of to cause electrons to flow through a conductor. This is the so-called photoelectric effect. Photovoltaic means sunlight converted into a flow of electrons (electricity). Photovoltaic devices, or solar cells, are like generators that work in sunlight. They make electricity without waste, noise or pollution. They produce electricity without combustion. A solar cell is a solid-state device in which there are no moving parts (except for photons and electrons) so nothing wears out.

SOLAR TRACKING SYSTEM

This particular project deals with a photo sensor circuit, which is used, in conjunction with stepper motor to control the movement of a solar panel. For this purpose an LDR (Light Dependent Resistor) is mounted on the solar panel. The stepper motor has been programmed using an 89C51 micro controller. Due to the rotation of the stepper motor, the solar panel mounted on it moves in a direction so as to search the maximum light intensity. When the LDR receives maximum light, the stepper motor circuit is switched off. Hence, with varying light intensity, the position of the solar panel also changes.

BLOCK DIAGRAM:-

BLOCK DESCRIPTION:-

1. LIGHT SENSOR:sun. 2. NOT GATE:controller.

It is used to sense the presence of light coming from the

It will invert the Incoming signal and will fed this signal to the

3. MICROCONTROLLER:- It will do the programming of the circuit.

4. MOTOR DRIVER:- The signal so received is of very small amplitude and is not able to drive the motor thus current amplifier as motor driver is used to increase the amplitude of the incoming signal. 5. STEPPER MOTOR:A stepper motor is an electromechanical device which

converts electrical pulses into discrete mechanical movements. 6. POWER SUPPLY:It comprises of battery and a charger. A 12V, 4 Amp

battery is used to operate the circuit. Charger is connected to restore the power of the battery.

CIRCUIT DIAGRAM

CIRCUIT DESCRIPTION

MICROCONTROLLER:-

It runs according to the program. We need not to build very large circuits. By using this we can control the work of large circuitry through the help of the program which can be easily burnt into it. The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of In-System Programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industrystandard 80C51 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with In-System Programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89S51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, two 16-bit timer/counters, a Five vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next external interrupt or hardware reset.

Pin Description

VCC Supply voltage (all packages except 42-PDIP). GND Ground (all packages except 42-PDIP; for 42-PDIP GND connects only the logic core and the embedded program memory). VDD Supply voltage for the 42-PDIP which connects only the logic core and the embedded program memory. PWRVDD Supply voltage for the 42-PDIP which connects only the I/O Pad Drivers. The application board must connect both VDD and PWRVDD to the board supply voltage. PWRGND Ground for the 42-PDIP which connects only the I/O Pad Drivers. PWRGND and GND are weakly connected through the common silicon substrate, but not through any metal link. The application board MUST connect both GND and PWRGND to the board ground. Port 0 Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as highimpedance inputs. Port 0 can also be configured to be the multiplexed low-order address/data bus during accesses to external program and data memory. In this mode, P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. External pull-ups are required during program verification. Port 1 Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives the low-order address bytes during Flash programming and verification. Port 2 Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). In this application, Port 2 uses strong internal pull-ups when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. Port 3 Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 receives some control signals for Flash programming and verification. Port 3 also serves the functions of various special features of the AT89S51, as shown in the following table.

RST Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. This pin drives High for 98 oscillator periods after the Watchdog times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled. ALE/PROG Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external data memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. PSEN Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89S51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. EA/VPP External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting oscillator amplifier

ULN2803 & RELAY:ULN2803 is the Darlington array which is a current amplifier which amplifies the current of the signal coming from the microcontroller. Relay is an electro mechanical switch which converts electrical signal into mechanical output and provides the isolation between the two connections. The signal so received is of very small amplitude in order to amplify it current amplifier is used. The current amplifier used in this project is ULN2803.

Featuring continuous load current ratings to 500 mA for each of the drivers, the Series ULN28xxA/LW and ULQ28xxA/LW high voltage, high-current Darlington arrays are ideally suited for interfacing between low-level logic circuitry and multiple peripheral power loads. Typical power loads totaling over 260 W (350 mA x 8, 95 V) can be controlled at an appropriate duty cycle depending on ambient temperature and number of drivers turned on simultaneously. Typical loads include relays, solenoids, stepping motors, magnetic print hammers, multiplexed LED and incandescent displays, and heaters. All devices feature open-collector outputs with integral clamp diodes. The ULx2803A, ULx2803LW, ULx2823A, and ULN2823LW have series input resistors selected for operation directly with 5 V TTL or CMOS. These devices will handle numerous interface needs particularly those beyond the capabilities of standard logic buffers. The ULx2804A, ULx2804LW, ULx2824A, and ULN2824LW have series input resistors for operation directly from 6 V to 15 V CMOS or PMOS logic outputs. The ULx2803A/LW and ULx2804A/LW are the standard Darlington arrays. The outputs are capable of sinking 500 mA and will withstand at least 50 V in the off state. Outputs may be paralleled for higher load current capability. The ULx2823A/LW and ULx2824A/LW will withstand 95 V in the off state. These Darlington arrays are furnished in 18-pin dual in-line plastic packages (suffix A) or 18-lead small-outline plastic packages (suffix LW). All devices are pinned with outputs opposite inputs to facilitate ease of circuit board layout. Prefix ULN devices are rated for operation over the temperature range of -20C to +85C; prefix ULQ devices are rated for operation to -40C.

Circuit symbol for a relay

A relay is an electrically operated switch. Current flowing through the coil of the relay creates a magnetic field which attracts a lever and changes the switch contacts. The coil current can be on or off so relays have two switch positions and most have double throw (changeover) switch contacts as shown in the diagram. Relays allow one circuit to switch a second circuit which can be completely separate from the Relays first. For example a low voltage battery circuit can use a relay to switch a 230V AC mains circuit. There is no electrical connection inside the relay between the two circuits, the link is magnetic and mechanical. The coil of a relay passes a relatively large current, typically 30mA for a 12V relay, but it can be as much as 100mA for relays designed to operate from lower voltages. Most ICs (chips) cannot provide this current and a transistor is usually used to amplify the small IC current to the larger value required for the relay coil. The maximum output current for the popular 555 timer IC is 200mA so these devices can supply relay coils directly without amplification. Relay showing coil and switch contacts Relays are usually SPDT or DPDT but they can have many more sets of switch contacts, for example relays with 4 sets of changeover contacts are readily available. For further information about switch contacts and the terms used to describe them please see the page on switches. Most relays are designed for PCB mounting but you can solder wires directly to the pins providing you take care to avoid melting the plastic case of the relay. The supplier's catalogue should show you the relay's connections. The coil will be obvious and it may be connected either way round. Relay coils produce brief high voltage 'spikes' when they are switched off and this can destroy transistors and ICs in the circuit. To prevent damage you must connect a protection diode across the relay coil.

The animated picture shows a working relay with its coil and switch contacts. You can see a lever on the left being attracted by magnetism when the coil is switched on. This lever moves the switch contacts. There is one set of contacts (SPDT) in the foreground and another behind them, making the relay DPDT. The relay's switch connections are usually labeled COM, NC and NO:

COM = Common, always connect to this; it is the moving part of the switch. NC = Normally Closed, COM is connected to this when the relay coil is off. NO = Normally Open, COM is connected to this when the relay coil is on. Connect to COM and NO if you want the switched circuit to be on when the relay coil is on. Connect to COM and NC if you want the switched circuit to be on when the relay coil is off.

POWER SUPPLY:-

Power supply is used to drive the circuit. Inappropriate voltage will damage the entire circuitry therefore it constitutes a very important part of the circuit. Every electronic circuit requires power for its operation. Every function simple or complex is controlled by the power supply. Even a little variation in voltage can damage all the circuitry. So power supply is of prime importance in all the circuits. The power supply which we get is a.c. operating at 220Volts.But as our electronic circuits work only on d.c. therefore; we cannot employ direct usage of supply which we get. In order to overcome this, we require various process namely transformation, rectification, smoothing or filtering and regulation. These entire process using bridge rectifier are illustrated below:

Power supply is used to drive the circuit. Inappropriate voltage will damage the entire circuitry therefore it constitutes a very important part of the circuit. Every electronic circuit requires power for its operation. Every function simple or complex is controlled by the power supply. Even a little variation in voltage can damage all the

circuitry. So power supply is of prime importance in all the circuits. The power supply which we get is a.c. operating at 220Volts.But as our electronic circuits work only on d.c. therefore; we cannot employ direct usage of supply which we get : . In order to overcome this, we require various process namely transformation, rectification, smoothing or filtering and regulation. All these process using bridge rectifier are illustrated below

Now lets study the detail of all the processes step by step. TRANSFORMATION:As already discussed the supply which we get is 220V A.C. supply. In order to decrease the magnitude of the voltage we make use of step down transformer. This transformer has more windings in the primary coil than in the secondary coil. So the voltage output at the secondary is an A.C. supply with magnitude less than 220V as shown below:

RECTIFICATION:As all the electronic circuits work on DC therefore this low voltage A.C. cannot be directly fed to our circuit. Thus a process of rectification is required. In this process, A.C. voltage is converted into D.C. voltage using two semiconductor rectifying diodes as shown below:

Now as the two diodes D1 and D2 are connected in the opposite manner. Therefore one of the diode gets forward biased during the positive half of the a.c input and other gets forward biased during the negative half of the a.c. input. Thus during the positive half cycle rectification takes place through diode D1(diode D2 being reverse biased, cannot rectify) and during the negative half cycle, the rectification takes place through the diode D2(diode D1 being reverse biased, cannot rectify). But as at least one of the diode always remain in the conducting mode therefore both the halves of the a.c. input gets rectified and hence the name full wave rectifier. SMOOTHING/FILTRATION The output of the rectification process is a varying D.C. As the D.C. waveform cannot be varying so it means that rectification is not 100% efficient due to which there is still some component of the input A.C. present in the D.C. voltage which is responsible for the variation. So in order to remove this A.C. component we require filtration or smoothing of the signal. This can be done using an electrolytic capacitor of 2200uf. As the capacitor offers infinite impedance to the D.C. signal and Zero impedance to the A.C. signal therefore, it allows the A.C. component to pass through and blocks the D.C. component. This means it will filter out the D.C. component from the input signal. Thus the output of the process will be a pure D.C. supply as shown below:

Now there is still some variation indicating that output D.C. voltage is not having constant magnitude. This is due to the capacitor used for filtration. Its time of charging and discharging are not equal due to which the filtration is not up to the mark. For making the output voltage assume a constant value we need a voltage regulator.

REGULATION:-

Voltage regulator is used for this purpose mainly from the series of 78- - of the transistor. For getting the constant output of 5 volts we make use of 7805 voltage regulator. This process takes place as shown below: This completes all the processes. Now we have a constant D.C. supply with us which can be fed to any electronic circuit without any problem

LIST OF COMPONENTS:-

connection, and vice versa if the contacts were open. When the current to the coil is switched off, the armature is returned by a force, approximately half as strong as the copper ring can be crimped to the end of the solenoid. This "shading ring" creates a small out-ofphase current, which increases the minimum pull on the armature duri

S.No. 1.

Code Resistors Capacitor

Value 10k 100k 10F 22pF

Price Quantity 25 paisa each 3 1 50 20 1 10 10 45 1 1 1 2 1 4 1 1 1 1

2.

3.

Semiconductor AT89S51 ULN2803 LED LM 7805 Miscellaneous 12MHz crystal SPDT relay Stepper motor

4.

WORKING:-

Pin no 40 of the 89C51 is connected to the positive supply. For this purpose we use 7805 IC to provide a 5-volt Dc power supply. Pin no 1 is the input pin and pin no 3 is the output pin. Pin no 2 is the ground pin. Output of the 7805 is connected to the pin no 40 of the IC 89C51. For the reset action we connect one resistor and capacitor to run an auto reset action Pin no 18 and 19 is connected to the crystal for external oscillator action. LDR is connected to the pin no 3 of the microcontroller. Pin no 3 is port p1.2.of the micro controller. Two limit switch is also connected to the pin no 1 and 2 of the 89c51. Pin no 1 is port p1.0 and pin no2 is a port p1.1

Pin no 21,22,23,24 are connected to the stepper motor driver circuit. Output from the micro controller is a negative voltage. So to convert this negative voltage into positive voltage we use one inverter circuit. IC 4049 is used as an inverter. Output from the inverter is now sufficient to drive the base of the NPN transistor. Emitter of the NPN transistor is connected to the negative voltage. Collector of the NPN transistor is now connected to the coil of the stepper motor. In the stepper motor there are total four coils. Common point of these coils is connected to the positive supply.

A Limit switch is connected to the pin no 1 and pin no 2 for changing the direction of the stepper motor platform.

SOFTWARE TOOLS:-

Orcad for circuit designing .We first make schematic in it.This in turn creates lay out of PCB. Keil for compiling. Microcontroller understands hex files. But as hex files are very complicated therefore we make use of the software keil. Programming in keil makes use of C or Assembly language which are easily programmable. Keil on its own converts these files to hex files. Proload After the formation of hex file we need to insert this hex file into the micro controller so that it executes the program written in the keil. For this purpose we make use of proload.

Reference
www.vedrobotics.com www.datasheetarchive.com www.google.com www.wikipedia.com www.answers.com

Você também pode gostar