Vous êtes sur la page 1sur 100

IRRIGATION SYSTEM SOLAR USING ENERGY

ABSTRACT
Embedded systems are designed to do some specific task, rather than be a generalpurpose computer for multiple tasks. Some also have real time performance constraints that must be met, for reason such as safety and usability; others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs.

An embedded system is not always a separate block - very often it is physically built-in to the device it is controlling. The software written for embedded systems is often called firmware, and is stored in read-only memory or flash convector chips rather than a disk drive. It often runs with limited computer hardware resources: small or no keyboard, screen, and little memory.

In todays world in cultivation where there is a requirement of pumping water to lands, by using this scenario we can have the knowledge of the land weather it is dry or wet with the help of microcontroller, we can activate the motor with the help of its driver circuit L293D and thereby motor pumps the water into the land, the status of the presence of water available in land can be notified with the help of an SMS in the form of alert to the authorized mobile number which is programmed into the microcontroller. The status of the project is displayed on a 16X2 LCD. This project uses regulated 5V, 500mA power supply. 7805 three terminal voltage regulator is used for voltage regulation. Bridge type full wave rectifier is used to rectify the ac output of secondary of 12V battery, which is powered by a solar panel.

IRRIGATION SYSTEM SOLAR USING ENERGY

BLOCK DIAGRAM:

Technical Specifications :

1. MICRO CONTROLLER AT89S51 2. MAX 232 3. GSM MODEM 4. DC MOTER

IRRIGATION SYSTEM SOLAR USING ENERGY


5. POWER SUPPLY
6. L239D DRIVER. SOFTWARE: 1. EMBEDDED KEIL C LANGUAGE 2. MICRO FLASH\FLASH MAGIC

1. INTRODUCTION EMBEDDED SYSTEMS In this world of knowledge everything around us is run by Computing Systems. The technical Brilliance and Developments in different fields has led to a drastic change in our lives especially in the communications field. Due to various changes in technologies many systems have come up with breathtaking developments. One amongst them is the EMBEDDED SYSTEMS. It is the evolution or further development of computing system. Its applications provide tremendous opportunities for creative use of computer technology. Almost every new system introduced in the market is an example of Embedded System. An embedded system is basically a close interaction of hardware and software. The design part involves different instruction sets in terms of functionality, compactness of code, power consumption, performance, and reliability so on. The Embedded software interacts with the hardware circuitry to generate the desired functionality. An embedded application software. systems typically comprises the hardware, embedded RTOS, device drivers, communication stacks and embedded

IRRIGATION SYSTEM SOLAR USING ENERGY

Understand Understanduser user requirements requirements Fig:1.1 parts of an embedded system Choose optimum optimum Apart from the common Choose computer applications there are many applications, which electronic electronicchip chip do not need high performances. S/W Side H/W Side

HLL/ALL HLL/ALL Algorithm Embedded Product Algorithm development Life Cycle:Coding/Editing Coding/Editing Compiling/Assembling Compiling/Assembling Debugging Debugging Testing Testing Simulator Simulator S/W S/W Download H/W H/W Testing Testing PCB PCBLayout Layoutdesign design

Assembling Assembling components components

ICE ICE(In (InCircuit Circuit Emulator) Emulator) Embedded EmbeddedProduct Product

IRRIGATION SYSTEM SOLAR USING ENERGY

Fig:1.2 life cycle of an embedded system Design Considerations for an Embedded System Unlike software designed for general-purpose computers, embedded software cannot usually be run on other embedded system without significant modification. This is mainly because of the incredible variety in the underlying hardware. The hardware in each embedded system is tailored specifically to the application, in order to keep system costs low. As a result, unnecessary circuitry is eliminated and hardware resources are shared whenever possible. In order to have software, there must be a place to store the executable code and temporary storage for runtime data manipulation. These take the form of ROM and RAM, respectively. All embedded systems also contain some type of inputs and outputs. It is almost always the case that the outputs of the embedded system are a function of its inputs and several other factors. The inputs to the system usually take the form of sensors and probes, communication signals, or control knobs and buttons. The outputs are typically displays, communication signals, or changes to the physical world.

IRRIGATION SYSTEM SOLAR USING ENERGY

Memory Memory

Inputs Inputs

Processor Processor

Outputs Outputs

Fig:1.3 design considerations of embedded systems Other common design requirement includes Processing power Memory Development cost Number of Units Expected Lifetime Reliability Processing power This is the amount of processing power necessary to get the hob done. A common way to compare processing power is the MIPS (millions of instructions per second) rating. Other important features of the processor need to be consider is register width, typically ranges from 8 to 64 bits.

Memory The amount of memory (ROM and RAM) required holding the executable software and data it manipulates. The amount of memory required can also affect the processor selection. In general, the register width off a processor establishes the upper limit of the amount of memory it can access. Development cost The development cost of the hardware and software design processes is a fixed, one-time cost, so it might be that money is no object or that this is the only accurate measure of system cost.

IRRIGATION SYSTEM SOLAR USING ENERGY


Number of units The tradeoff between production cost and development cost is affected most by the number of units expected to be produced and sold. Expected lifetime This indicates how long must the system continue to function? This affects all sorts of design decisions from the selection of hardware components to how much the system may cost to develop and produce Reliability :How reliable must the final product be? If it is a childrens toy, it doesnt always have to work right, but if it is part of a space shuttle or a car, it had sure better do what it is supposed to each and every time. Example Most of the things which we use in our day-to-day life is an example of embedded systems. Micro Oven Washing Machines Toys Air Conditioners Automobiles Pagers MP3 Players Automobile brakes Digital Camera Home telemetry Fax Machines MPEG Decodes Modems Mobile Phones

Some common characteristics of embedded systems are Single-functioned Executes a single program, repeatedly Tightly-constrained Low cost, low power, small, fast, etc.

IRRIGATION SYSTEM SOLAR USING ENERGY


Reactive and real-time Continually reacts to changes in the systems environment

EMBEDDED SYSTEM CLASSIFICATION Autonomous Embedded Systems: response times are not critical. devices. Eg. : Air Conditioners, CD Players. Real time Embedded Systems: These are used to carry out time critical task process control. Eg. : Boiler Plant must open the valves in a stipulated time; else the pressure Exceeding its threshold results in a catastrophe. Networked Embedded Systems: They monitor plant parameters such as temperature, Pressure, humidity and send the data over the network to a centralized system for online monitoring. Eg. : A network enabled web cam monitoring the plant floor transmits its video output to a remote controlling organization. Mobile Embedded Systems: Mobile gadgets need to store databases locally in their memory. These gadgets imbibe powerful, computing and communication capabilities to perform real time as well as non-real time tasks and handle multimedia applications. The gadgets embed powerful processor and OS and a lot of memory with minimal power consumption. Advantage Customization yields lower area, power, cost. Disadvantages These systems function in standalone mode Where the The input signals originating from transducers Convert a

physical quantity like temperature into electric signals. Also, the system output controls the

IRRIGATION SYSTEM SOLAR USING ENERGY


Higher HW/ software development overhead. Design, compilers, debuggers may result in delayed time to market. Microcontroller Mirocontrollers are "embedded" inside some other device (often a consumer product) so that they can control the features or actions of the product. Another name for a microcontroller, therefore, is "embedded controller". Microcontrollers are dedicated to one task and run one specific program. The program is stored in ROM (read-only memory) and generally does not change. Microcontrollers are often low-power devices and has a dedicated input device and often (but not always) has a small LED or LCD display for output. A microcontroller also takes input from the device it is controlling and controls the device by sending signals to different components in the device. For example, the microcontroller inside a TV takes input from the remote control and displays output on the TV screen. The controller controls the channel selector, the speaker system and certain adjustments on the picture tube electronics such as tint and brightness. The engine controller in a car takes input from sensors such as the oxygen and knock sensors and controls things like fuel mix and spark plug timing. A microwave oven controller takes input from a keypad, displays output on an LCD display and controls a relay that turns the microwave generator on and off. A microcontroller is often small and low cost. The components are chosen to minimize size and to be as inexpensive as possible. A microcontroller is often, but not always, ruggedized in some way. The microcontroller controlling a car's engine, for example, has to work in temperature extremes that a normal computer generally cannot handle. A car's microcontroller in Alaska has to work fine in -30 degree F (-34 C) weather, while the same microcontroller in Nevada might be operating at 120 degrees F (49 C). When you add the heat naturally generated by the engine, the temperature can go as high as 150 or 180 degrees F (65-80 C) in the engine compartment. On the other hand, a microcontroller embedded inside a VCR hasn't been ruggedized at all. The actual processor used to implement a microcontroller can vary widely. The Intel 8051 is a Harvard architecture, single chip microcontroller (C) which was developed by Intel in 1980 for use in embedded systems. The official designation for the 8051 family

IRRIGATION SYSTEM SOLAR USING ENERGY


is MCS 51. Intel's original versions were popular in the 1980s and early 1990s, but has today largely been superseded by a vast range of faster and/or functionally enhanced 8051compatible devices manufactured by more than 20 independent manufacturers including Atmel, Infineon Technologies (formerly Siemens AG), Maxim Integrated Products (via its Dallas Semiconductor subsidiary), NXP (formerly Philips Semiconductor), Nuvoton (formerly Winbond), ST Microelectronics, Silicon Laboratories (formerly Cygnal), Texas Instruments and Cypress Semiconductor. Intel's original 8051 family was developed using NMOS technology, but later versions, identified by a letter C in their name (e.g., 80C51) used CMOS technology and were less powerhungry than their NMOS predecessors. This made them more suitable for battery-powered devic Important features and applications It provides many single package

functions

(CPU, RAM, ROM, I/O, interrupt logic, timer,

etc.)

in

8-bit ALU, Accumulator and 8-bit Registers; hence it is an 8-bit microcontroller 8-bit data bus - It can access 8 bits of data in one operation 16-bit address bus - It can access 216 memory locations - 64 KB (65536 locations) each of RAM and ROM On-chip RAM - 128 bytes (data memory) On-chip ROM - 4 kByte (program memory) Four byte bi-directional input/output port UART (serial port) Two 16-bit Counter/timers Two-level interrupt priority Power saving mode (on some derivatives)

A particularly useful feature of the 8051 core is the inclusion of a boolean processing engine which allows bit-level boolean logic operations to be carried out directly and efficiently on internal registers and RAM. This feature helped cement the 8051's popularity in industrial control applications. Another valued feature is that it has four separate register sets, which can be used to greatly reduce interrupt latency compared to the more common method of storing interrupt context on a stack.

IRRIGATION SYSTEM SOLAR USING ENERGY


The 8051 UARTs make it simple to use the chip as a serial communications interface. External pins can be configured to connect to internal shift registers in a variety of ways, and the internal timers can also be used, allowing serial communications in a number of modes, both synchronous and asynchronous. Some modes allow communications with no external components. A mode compatible with an RS-485 multi-point communications environment is achievable, but the 8051's real strength is fitting in with existing ad-hoc protocols (e.g., when controlling serial-controlled devices). Once a UART, and a timer if necessary, have been configured, the programmer needs only to write a simple interrupt routine to refill the send shift register whenever the last bit is shifted out by the UART and/or empty the full receive shift register (copy the data somewhere else). The main program then performs serial reads and writes simply by reading and writing 8bit data to stacks. 8051 based microcontrollers typically include one or two UARTs, two or three timers, 128 or 256 bytes of internal data RAM (16 bytes of which are bit-addressable), up to 128 bytes of I/O, 512 bytes to 64 kB of internal program memory, and sometimes a quantity of extended data RAM (ERAM) located in the external data space. The original 8051 core ran at 12 clock cycles per machine cycle, with most instructions executing in one or two machine cycles. With a 12 MHz clock frequency, the 8051 could thus execute 1 million one-cycle instructions per second or 500,000 two-cycle instructions per second. Enhanced 8051 cores are now commonly used which run at six, four, two, or even one clock per machine cycle, and have clock frequencies of up to 100 MHz, and are thus capable of an even greater number of instructions per second. All SILabs, some Dallas and a few Atmel devices have single cycle cores. Common features included in modern 8051 based microcontrollers include built-in reset timers with brown-out detection, on-chip oscillators, self-programmable Flash ROM program memory, bootloader code in ROM, EEPROM non-volatile data storage, IC, SPI, and USB ho interfaces, CAN or LIN bus, PWM generators, analog comparators, A/D and D/Aconverters, RTCs, extra counters and timers, in-circuit debugging facilities, more interrupt sources, and extra power saving modes.

Memory architecture The 8051 has four distinct types of memory - internal RAM, special function registers, program memory, and external data memory.

IRRIGATION SYSTEM SOLAR USING ENERGY


Internal RAM (IRAM) is located from address 0 to address 0xFF. IRAM from 0x00 to 0x7F can be accessed directly, and the bytes from 0x20 to 0x2F are also bit-addressable. IRAM from 0x80 to 0xFF must be accessed indirectly, using the @R0 or @R1 syntax, with the address to access loaded in R0 or R1. Special function registers (SFR) are located from address 0x80 to 0xFF, and are accessed directly using the same instructions as for the lower half of IRAM. Some of the SFR's are also bit-addressable. Program memory (PMEM, though less common in usage than IRAM and XRAM) is located starting at address 0. It may be on- or off-chip, depending on the particular model of chip being used. Program memory is read-only, though some variants of the 8051 use on-chip flash memory and provide a method of re-programming the memory in-system or in-application. Aside from storing code, program memory can also store tables of constants that can be accessed by MOVC A, @DPTR, using the 16-bit special function register DPTR. External data memory (XRAM) also starts at address 0. It can also be on- or off-chip; what makes it "external" is that it must be accessed using the MOVX (Move eXternal) instruction. Many variants of the 8051 include the standard 256 bytes of IRAM plus a few KB of XRAM on the chip. If more XRAM is required by an application, the internal XRAM can be disabled, and all MOVX instructions will fetch from the external bus.

Programming There are various high-level programming language compilers for the 8051. Several C compilers are available for the 8051, most of which feature extensions that allow the programmer to specify where each variable should be stored in its six types of memory, and provide access to 8051 specific hardware features such as the multiple register banks and bit manipulation instructions. There are many commercial C compilers. SDCC is a popular open source C compiler. Other high level languages such as Forth, BASIC, Pascal/Object Pascal, PL/M and Modula-2 are available for the 8051, but they are less widely used than C and assembly. Because IRAM, XRAM, and PMEM all have an address 0, C compilers for the 8051 architecture provide compiler-specific pragmas or other extensions to indicate where a particular piece of data should be stored (i.e. constants in PMEM or variables needing fast access

IRRIGATION SYSTEM SOLAR USING ENERGY


in IRAM). Since data could be in one of three memory spaces, a mechanism is usually provided to allow determining to which memory a pointer refers, either by constraining the pointer type to include the memory space, or by storing metadata with the pointer. Instruction set The 8051 instruction set offers several addressing modes, including

direct register, using ACC (the accumulator) and R0-R7 direct memory, which access the internal RAM or the SFR's, depending on the address indirect memory, using R0, R1, or DPTR to hold the memory address. The instruction used may vary to access internal RAM, external RAM, or program memory. individual bits of a range of IRAM and some of the SFR's

Many of the operations allow any addressing mode for the source or the destination, for example, MOV 020h, 03fh will copy the value in memory location 0x3f in the internal RAM to the memory location 0x20, also in internal RAM. Because the 8051 is an accumulator-based architecture, all arithmetic operations must use the accumulator, e.g. ADD A, 020h will add the value in memory location 0x20 in the internal RAM to the accumulator. One does not need to master these instructions to program the 8051. With the availability of good quality C compilers, including open source SDCC, virtually all programs can be written with high-level language.

Related processors

Fig:1.4 processor Intel 8031 processors

IRRIGATION SYSTEM SOLAR USING ENERGY


The 8051's predecessor, the 8048, was used in the keyboard of the first IBM PC, where it converted keypresses into the serial data stream which is sent to the main unit of the computer. The 8048 and derivatives are still used today for basic model keyboards. The 8031 was a cut down version of the original Intel 8051 that did not contain any internal program memory (ROM). To use this chip, external ROM had to be added containing the program that the 8031 would fetch and execute. The 8052 was an enhanced version of the original 8051 that featured 256 bytes of internal RAM instead of 128 bytes, 8 kiB of ROM instead of 4 kiB, and a third 16-bit timer. The 8032 had these same features except for the internal ROM program memory. The 8052 and 8032 are largely considered to be obsolete because these features and more are included in nearly all modern 8051 based microcontrollers. Intel discontinued its MCS 51 product line in March 2007, however there are plenty of enhanced 8051 products or silicon IP added regularly from other vendors. External links Intel bows out, discontinues MCS 51 The 8051 is a flexible microcontroller with a relatively large number of modes of operations. Your program may inspect and/or change the operating mode of the 8051 by manipulating the values of the 8051's Special Function Registers (SFRs). SFRs are accessed as if they were normal Internal RAM. The only difference is that Internal RAM is from address 00h through 7Fh whereas SFR registers exist in the address range of 80h through FFh. Each SFR has an address (80h through FFh) and a name. The following chart provides a graphical presentation of the 8051's SFRs, their names, and their address.

IRRIGATION SYSTEM SOLAR USING ENERGY

Table:1.5 Graphical presentation of the 8051's SFRs, their names, and their address

As you can see, although the address range of 80h through FFh offer 128 possible addresses, there are only 21 SFRs in a standard 8051. All other addresses in the SFR range (80h through FFh) are considered invalid. Writing to or reading from these registers may produce undefined values or behavior. Programming Tip: It is recommended that you not read or write to SFR addresses that have not been assigned to an SFR. Doing so may provoke undefined behavior and may cause your program to be incompatible with other 8051-derivatives that use the given SFR for some other purpose.

SFR Types As mentioned in the chart itself, the SFRs that have a blue background are SFRs related to the I/O ports. The 8051 has four I/O ports of 8 bits, for a total of 32 I/O lines. Whether

IRRIGATION SYSTEM SOLAR USING ENERGY


a given I/O line is high or low and the value read from the line are controlled by the SFRs in green. The SFRs with yellow backgrouns are SFRs which in some way control the operation or the configuration of some aspect of the 8051. For example, TCON controls the timers, SCON controls the serial port. The remaining SFRs, with green backgrounds, are "other SFRs." These SFRs can be thought of as auxillary SFRs in the sense that they don't directly configure the 8051 but obviously the 8051 cannot operate without them. For example, once the serial port has been configured using SCON, the program may read or write to the serial port using the SBUF register. Programming Tip: The SFRs whose names appear in red in the chart above are SFRs that may be accessed via bit operations (i.e., using the SETB and CLR instructions). The other SFRs cannot be accessed using bit operations. As you can see, all SFRs that whose addresses are divisible by 8 can be accessed with bit operations.

SFR Descriptions This section will endeavor to quickly overview each of the standard SFRs found in the above SFR chart map. It is not the intention of this section to fully explain the functionality of each SFR--this information will be covered in separate chapters of the tutorial. This section is to just give you a general idea of what each SFR does. P0 (Port 0, Address 80h, Bit-Addressable): This is input/output port 0. Each bit of this SFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 0 is pin P0.0, bit 7 is pin P0.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to a low level. Programming Tip: While the 8051 has four I/O port (P0, P1, P2, and P3), if your hardware uses external RAM or external code memory (i.e., your program is stored in an external ROM or EPROM chip or if you are using external RAM chips) you may not use P0 or P2. This is because the 8051 uses ports P0 and P2 to address the external memory. Thus if you are using external RAM or code memory you may only use ports P1 and P3 for your own use. SP (Stack Pointer, Address 81h): This is the stack pointer of the microcontroller. This SFR indicates where the next value to be taken from the stack will be read from in Internal RAM. If you push a value onto the stack, the value will be written to the address of SP + 1. That is to say, if SP holds the value 07h, a PUSH instruction will push the value onto the stack at address 08h. This SFR is modified by all instructions which modify the stack, such as PUSH, POP, LCALL, RET, RETI, and whenever interrupts are provoked by the microcontroller. Programming Tip: The SP SFR, on startup, is initialized to 07h. This means the stack will start at 08h and start expanding upward in internal RAM. Since alternate register banks 1, 2, and 3 as well as the user bit variables occupy internal RAM from addresses 08h through 2Fh, it is necessary to initialize SP in your program to some other value if you will be using the alternate register banks and/or bit memory. It's not a bad idea to initialize SP to 2Fh as the first instruction of every

IRRIGATION SYSTEM SOLAR USING ENERGY


one of your programs unless you are 100% sure you will not be using the register banks and bit variables. DPL/DPH (Data Pointer Low/High, Addresses 82h/83h): The SFRs DPL and DPH work together to represent a 16-bit value called the Data Pointer. The data pointer is used in operations regarding external RAM and some instructions involving code memory. Since it is an unsigned two-byte integer value, it can represent values from 0000h to FFFFh (0 through 65,535 decimal). Programming Tip: DPTR is really DPH and DPL taken together as a 16-bit value. In reality, you almost always have to deal with DPTR one byte at a time. For example, to push DPTR onto the stack you must first push DPL and then DPH. You can't simply plush DPTR onto the stack. Additionally, there is an instruction to "increment DPTR." When you execute this instruction, the two bytes are operated upon as a 16-bit value. However, there is no instruction that decrements DPTR. If you wish to decrement the value of DPTR, you must write your own code to do so. PCON (Power Control, Addresses 87h): The Power Control SFR is used to control the 8051's power control modes. Certain operation modes of the 8051 allow the 8051 to go into a type of "sleep" mode which requires much less power. These modes of operation are controlled through PCON. Additionally, one of the bits in PCON is used to double the effective baud rate of the 8051's serial port. TCON (Timer Control, Addresses 88h, Bit-Addressable): The Timer Control SFR is used to configure and modify the way in which the 8051's two timers operate. This SFR controls whether each of the two timers is running or stopped and contains a flag to indicate that each timer has overflowed. Additionally, some non-timer related bits are located in the TCON SFR. These bits are used to configure the way in which the external interrupts are activated and also contain the external interrupt flags which are set when an external interrupt has occured. TMOD (Timer Mode, Addresses 89h): The Timer Mode SFR is used to configure the mode of operation of each of the two timers. Using this SFR your program may configure each timer to be a 16-bit timer, an 8-bit autoreload timer, a 13-bit timer, or two separate timers. Additionally, you may configure the timers to only count when an external pin is activated or to count "events" that are indicated on an external pin. TL0/TH0 (Timer 0 Low/High, Addresses 8Ah/8Ch): These two SFRs, taken together, represent timer 0. Their exact behavior depends on how the timer is configured in the TMOD SFR; however, these timers always count up. What is configurable is how and when they increment in value. TL1/TH1 (Timer 1 Low/High, Addresses 8Bh/8Dh): These two SFRs, taken together, represent timer 1. Their exact behavior depends on how the timer is configured in the TMOD SFR; however, these timers always count up. What is configurable is how and when they increment in value. P1 (Port 1, Address 90h, Bit-Addressable): This is input/output port 1. Each bit of this SFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 1 is pin P1.0, bit 7 is pin P1.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to a low level.

IRRIGATION SYSTEM SOLAR USING ENERGY

SCON (Serial Control, Addresses 98h, Bit-Addressable): The Serial Control SFR is used to configure the behavior of the 8051's on-board serial port. This SFR controls the baud rate of the serial port, whether the serial port is activated to receive data, and also contains flags that are set when a byte is successfully sent or received. Programming Tip: To use the 8051's on-board serial port, it is generally necessary to initialize the following SFRs: SCON, TCON, and TMOD. This is because SCON controls the serial port. However, in most cases the program will wish to use one of the timers to establish the serial port's baud rate. In this case, it is necessary to configure timer 1 by initializing TCON and TMOD. SBUF (Serial Control, Addresses 99h): The Serial Buffer SFR is used to send and receive data via the on-board serial port. Any value written to SBUF will be sent out the serial port's TXD pin. Likewise, any value which the 8051 receives via the serial port's RXD pin will be delivered to the user program via SBUF. In other words, SBUF serves as the output port when written to and as an input port when read from. P2 (Port 2, Address A0h, Bit-Addressable): This is input/output port 2. Each bit of this SFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 2 is pin P2.0, bit 7 is pin P2.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to a low level. Programming Tip: While the 8051 has four I/O port (P0, P1, P2, and P3), if your hardware uses external RAM or external code memory (i.e., your program is stored in an external ROM or EPROM chip or if you are using external RAM chips) you may not use P0 or P2. This is because the 8051 uses ports P0 and P2 to address the external memory. Thus if you are using external RAM or code memory you may only use ports P1 and P3 for your own use. IE (Interrupt Enable, Addresses A8h): The Interrupt Enable SFR is used to enable and disable specific interrupts. The low 7 bits of the SFR are used to enable/disable the specific interrupts, where as the highest bit is used to enable or disable ALL interrupts. Thus, if the high bit of IE is 0 all interrupts are disabled regardless of whether an individual interrupt is enabled by setting a lower bit. P3 (Port 3, Address B0h, Bit-Addressable): This is input/output port 3. Each bit of this SFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 3 is pin P3.0, bit 7 is pin P3.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to a low level. IP (Interrupt Priority, Addresses B8h, Bit-Addressable): The Interrupt Priority SFR is used to specify the relative priority of each interrupt. On the 8051, an interrupt may either be of low (0) priority or high (1) priority. An interrupt may only interrupt interrupts of lower priority. For example, if we configure the 8051 so that all interrupts are of low priority except the serial interrupt, the serial interrupt will always be able to interrupt the system, even if another interrupt is currently executing. However, if a serial interrupt is executing no other interrupt will be able to interrupt the serial interrupt routine since the serial interrupt routine has the highest priority. PSW (Program Status Word, Addresses D0h, Bit-Addressable): The Program Status Word is used to store a number of important bits that are set and cleared by 8051 instructions. The PSW SFR contains the carry flag, the auxiliary carry flag, the overflow

IRRIGATION SYSTEM SOLAR USING ENERGY


flag, and the parity flag. Additionally, the PSW register contains the register bank select flags which are used to select which of the "R" register banks are currently selected. Programming Tip: If you write an interrupt handler routine, it is a very good idea to always save the PSW SFR on the stack and restore it when your interrupt is complete. Many 8051 instructions modify the bits of PSW. If your interrupt routine does not guarantee that PSW is the same upon exit as it was upon entry, your program is bound to behave rather erradically and unpredictably--and it will be tricky to debug since the behavior will tend not to make any sense. ACC (Accumulator, Addresses E0h, Bit-Addressable): The Accumulator is one of the most-used SFRs on the 8051 since it is involved in so many instructions. The Accumulator resides as an SFR at E0h, which means the instruction MOV A,#20h is really the same as MOV E0h,#20h. However, it is a good idea to use the first method since it only requires two bytes whereas the second option requires three bytes. B (B Register, Addresses F0h, Bit-Addressable): The "B" register is used in two instructions: the multiply and divide operations.

Other SFRs

The chart above is a summary of all the SFRs that exist in a standard 8051. All derivative microcontrollers of the 8051 must support these basic SFRs in order to maintain compatability with the underlying MSCS51 standard. A common practice when semiconductor firms wish to develop a new 8051 derivative is to add additional SFRs to support new functions that exist in the new chip. For example, the Dallas Semiconductor DS80C320 is upwards compatible with the 8051. This means that any program that runs on a standard 8051 should run without modification on the DS80C320. This means that all the SFRs defined above also apply to the Dallas component. However, since the DS80C320 provides many new features that the standard 8051 does not, there must be some way to control and configure these new features. This is accomplished by adding additional SFRs to those listed here. For example, since the DS80C320 supports two serial ports (as opposed to just one on the 8051), the SFRs SBUF2 and SCON2 have been added. In addition to all the SFRs listed above, the DS80C320 also recognizes these two new SFRs as valid and uses their values to determine the mode of operation of the secondary serial port. Obviously, these new SFRs have been assigned to SFR addresses that were unused in the original 8051. In this manner, new 8051 derivative chips may be developed which will run existing 8051 programs.

COMPONENT DESCRIPTION MICROCONTROLLER

IRRIGATION SYSTEM SOLAR USING ENERGY


Microcontrollers are " embedded" inside some other device (often a consumer product) so that they can control the features or actions of the product.Another name for a microcontroller, therefore, is "embedded controller."Microcontrollers are dedicated to one task and run one specific program. The program is stored in ROM (read-only memory) and generally does not change.Microcontrollers are often low-power devices.A microcontroller has a dedicated input device and often (but not always) has a small LED or LCD display for output. A microcontroller also takes input from the device it is controlling and controls the device by sending signals to different components in the device. For example, the microcontroller inside a TV takes input from the remote control and displays output on the TV screen. The controller controls the channel selector, the speaker system and certain adjustments on the picture tube electronics such as tint and brightness. The engine controller in a car takes input from sensors such as the oxygen and knock sensors and controls things like fuel mix and spark plug timing. DESCRIPTION The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8Kbytes of in-system programmable flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications flash memory. The device is manufactured using Atmels highdensity non volatile memory technology and is compatible with the industry standard 80C51 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional non volatile memory programmer. By combining a versatile 8-bit CPU with in-system The AT89S52 provides the following standard features: 8K bytes of flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 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 interrupt or hardware reset. Features Compatible with MCS-51 Products 8K Bytes of In-System Programmable (ISP) Flash Memory -Endurance: 10,000 Write/Erase Cycles 4.0V to 5.5V Operating Range Fully Static Operation: 0 Hz to 33 MHz Three- bit Internal RAM 32 Programmable I/O Lines Three 16-bit Timer/Counters

IRRIGATION SYSTEM SOLAR USING ENERGY


Eight Interrupt Sources Full Duplex UART Serial Channel Low-power Idle and Power-down Modes Interrupt Recovery from Power-down Mode Watchdog Timer Dual Data Pointer Power-off Flag Fast Programming Time level Program Memory Lock Flexible ISP Programming (Byte and Page Mode) Green (Pb/Halide-free) Packaging Option

PIN DIAGRAM

IRRIGATION SYSTEM SOLAR USING ENERGY

pin diagram of micro controller

BLOCKDIAGRAM

IRRIGATION SYSTEM SOLAR USING ENERGY

Block diagram of micro controller

Pin Description VCC: Supply voltage. GND: 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 high impedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external

IRRIGATION SYSTEM SOLAR USING ENERGY


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 pullups 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 a 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 During accesses to external data memory that uses (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 data16-bit addresses (MOVX@DPTR).In this application, it uses strong memory that uses internal pull-ups when emitting 1s. 8-bit addresses (MOVX @ RI); Port 2 emits the contents of the P2 Special Function Register. Port2also 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 also serves the functions of various special features of the AT89C51 as listed below: Port Pin P3.0 P3.1 P3.2 P3.3 P3.4 P3.5 P3.6 P3.7 Alternate Functions RXD (serial input port) TXD (serial output port) INT0 (external interrupt 0) INT1 (external interrupt 1) T0 (timer 0 external input) T1 (timer 1 external input) WR (external data memory Write strobe) RD (external data memory read strobe)

IRRIGATION SYSTEM SOLAR USING ENERGY

port 3 pin description RESET Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. ALE/PROG Address Latch Enable 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 ALEdisable bit has no effect if the microcontroller is in external execution mode. Program Store Enable 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 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. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2

IRRIGATION SYSTEM SOLAR USING ENERGY


Output from the inverting oscillator amplifier OSCILLATOR CHARACTERISTICS XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure3.3. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2. There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.

Connections of oscillator

AT89S52: TYPES OF MEMORY

IRRIGATION SYSTEM SOLAR USING ENERGY


The 89S51 as three very general types of memory The memory types are On-Chip Memory, External Code Memory, and External RAM

Diagram for types of memory EXTERNAL CODE MEMORY Is code (or program) memory that resides off-chip. This is often in the form of an external EPROM. EXTERNAL RAM Is RAM memory that resides off-chip. This is often in the form of standard static RAM or flash RAM. CODE MEMORY Code memory is the memory that holds the actual 89S52 program that is to be run. This memory is limited to 64K and comes in many shapes and sizes: Code memory may be found on-chip, either burned into the microcontroller as ROM or EPROM. Code may also be stored completely off-chip in an external ROM or, more commonly, an external EPROM. Flash RAM is also another popular method of storing a program. Various combinations of these memory types may also be used that is to say, it is possible to have 4K of code memory on-chip and 64k of code memory off chip in an EPROM. When the program is stored on-chip the 64K maximum is often reduced to 4k, 8k, or 16k. This varies depending on the version of the chip that is being used. Each version offers specific capabilities and one of the distinguishing factors from chip to chip is how much ROM/EPROM space the chip has.

IRRIGATION SYSTEM SOLAR USING ENERGY


External RAM As an obvious opposite of Internal RAM, the 89S52 also supports what is called External RAM.As the name suggests, External RAM is any random access memory which is found off-chip. Since the memory is off-chip it is not as flexible in terms of accessing, and is also slower. For example, to increment an Internal RAM location by 1 requires only 1 instruction and 1 instruction cycle. To increment a 1-byte value stored in External RAM requires 4 instructions and 7 instruction cycles. In this case, external memory is 7 times slower! What External RAM loses in speed and flexibility it gains in quantity. While Internal RAM is limited to 128 bytes (256 bytes with an 8052), the 89S52supports External RAM up to 64K. ON-CHIP MEMORY As mentioned, the 89S52 includes a certain amount of on-chip memory. On-chip memory is really one of two types: Internal RAM and Special Function Register (SFR) memory. The layout of the 89c52's internal memory is presented in the following memory map..

Fig3.6 On chip memory diagram As is illustrated in above map, the 89S52 has a bank of 128 bytes of Internal RAM. This Internal RAM is found on-chip on the 89S52 so it is the fastest RAM available, and it is also the most flexible in terms of reading, writing, and modifying its contents. Internal RAM is volatile, so when the 89S52 is reset this memory is cleared.

IRRIGATION SYSTEM SOLAR USING ENERGY

POWER SUPPLY The power supplies are designed to convert high voltage AC mains electricity to a suitable low voltage supply for electronic circuits and other devices. A power supply can by broken down into a series of blocks, each of which performs a particular function. A d.c power supply which maintains the output voltage constant irrespective of a.c mains fluctuations or load variations is known as Regulated D.C Power Supply For example a 5V regulated power supply system as shown below:

Block diagram of power supply Transformer Transformers are static devices made up of one or more windings, in which those with two or more windings are coupled, and may be manufactured with or without a magnetic core. They are used in induction of currents, producing a coupling between two circuits. Transformers typically change values of voltage and current and are always used in transferring power through electromagnetic induction between circuits at the same frequency. To the left are links to pages o this site that are about various kinds of transformers. A Transformer's output (neglecting losses due to resistance or other manufacturing and physical factors) will be predictably computed by the general formula: V2/V1=N2/N1. And transformer can also be defined as A transformer is an electrical device which is used to convert electrical power from one Electrical circuit to another without change in frequency. Transformers convert AC electricity from one voltage to another with little loss of power. Transformers work only with AC and this is one of the reasons why mains electricity is AC. Transformers can be differentiated in two ways they are 1. Step up Transformer 2. Step down Transformer

IRRIGATION SYSTEM SOLAR USING ENERGY

Step up transformer

step up transformer Transformers only work with alternating current. Using direct current will create a magnetic field in the core but it will not be a changing magnetic field and so no voltage will be induced in the secondary coil. Using a step up transformer to increase the voltage does not give you something for nothing. As the voltage goes up, the current goes down by the same proportion. The power equation shows that the overall power remains the same. P=V x I Power = Voltage x Current In reality, the power output is always less than the power input because the changing magnetic field in the core creates currents (called eddy currents) which heat the core. This heat is then lost to the environment, it is wasted energy. Electricity is first produced at the power plants. Electricity is then sent to step-up transformers where low-voltage electricity is changed to high voltage to facilitate the transfer of power from the power plant to the customer. Voltage must be increased so that the electric current has the "push" it needs to efficiently travel long distances. From the step-up transformer, transmission lines carry the high voltage electric current long distances through thick wires mounted on tall towers that keep the transmission lines high above the ground. Insulators made of porcelain or polymers are used to prevent the electricity from leaving the transmission lines. High-voltage transmission lines carry the electric current to substations where the voltage is lowered so it that can be distributed locally on smaller power lines known as distribution lines. Distribution line voltage levels are typically 4 kV or 12 kV. These voltages are reduced one last time at smaller pole-top transformers to utilization voltages, typically 120 and 240 volts, to make the power safe to use in our homes. Step down transformer

IRRIGATION SYSTEM SOLAR USING ENERGY

step down transformer Step down transformers are designed to reduce electrical voltage. Their primary voltage is greater than their secondary voltage. This kind of transformer "steps down" the voltage applied to it. For instance, a step down transformer is needed to use a 110v product in a country with a 220v supply. Step down transformers convert electrical voltage from one level or phase configuration usually down to a lower level. They can include features for electrical isolation, power distribution, and control and instrumentation applications. Step down transformers typically rely on the principle of magnetic induction between coils to convert voltage and/or current levels. Step down transformers are made from two or more coils of insulated wire wound around a core made of iron. When voltage is applied to one coil (frequently called the primary or input) it magnetizes the iron core, which induces a voltage in the other coil, (frequently called the secondary or output). The turns ratio of the two sets of windings determines the amount of voltage transformation. An example of this would be: 100 turns on the primary and 50 turns on the secondary, a ratio of 2 to 1. Step down transformers can be considered nothing more than a voltage ratio device. With step down transformers the voltage ratio between primary and secondary will mirror the "turns ratio" (except for single phase smaller than 1 kv a which have compensated secondarys). A practical application of this 2 to 1 turns ratio would be a 480 to 240 voltage step down. Note that if the input were 440 volts then the output would be 220 volts. The ratio between input and output voltage will stay constant. Transformers should not be operated at voltages higher than the nameplate rating, but may be operated at lower voltages than rated. Because of this it is possible to do some non-standard applications using standard transformers. Single phase step down transformers 1 kva and larger may also be reverse connected to stepdown or step-up voltages. (Note: single phase step up or step down transformers sized less than 1 KVA should not be reverse connected because the secondary windings have additional turns to

IRRIGATION SYSTEM SOLAR USING ENERGY


overcome a voltage drop when the load is applied. If reverse connected, the output voltage will be less than desired.) Step-up transformers increase in output voltage, step-down transformers decrease in output voltage. Most power supplies use a step-down transformer to reduce the dangerously high mains voltage to a safer low voltage. The input coil is called the primary and the output coil is called the secondary. There is no electrical connection between the two coils; instead they are linked by an alternating magnetic field created in the soft-iron core of the transformer. The two lines in the middle of the circuit symbol represent the core. Transformers waste very little power so the power out is (almost) equal to the power in. Note that as voltage is stepped down current is stepped up. The ratio of the number of turns on each coil, called the turns ratio, determines the ratio of the voltages. A step-down transformer has a large number of turns on its primary (input) coil which is connected to the high voltage mains supply, and a small number of turns on its secondary (output) coil to give a low output voltage.

Fig:3.13 An Electrical Transformer

Turns ratio = Vp/ VS = Np/NS Power Out= Power In VS X IS=VP X IP Vp = primary (input) voltage Np = number of turns on primary coil Ip = primary (input) current

IRRIGATION SYSTEM SOLAR USING ENERGY


RECTIFIER There are several ways of connecting diodes to make a rectifier to convert AC to DC. TYPES OF RECTIFIERS Half wave Rectifier Full wave rectifier 1. Centre tap full wave rectifier. 2. Bridge type full bridge rectifier. The bridge rectifier is the most important and it produces full-wave varying DC. A full-wave rectifier can also be made from just two diodes if a centre-tap transformer is used, but this method is rarely used now that diodes are cheaper. A single diode can be used as a rectifier but it only uses the positive (+) parts of the AC wave to produce half-wave varying DC. Bridge rectifier A bridge rectifier can be made using four individual diodes, but it is also available in special packages containing the four diodes required. It is called a full-wave rectifier because it uses all the AC wave (both positive and negative sections). 1.4V is used up in the bridge rectifier because each diode uses 0.7V when conducting and there are always two diodes conducting, as shown in the diagram below. Bridge rectifiers are rated by the maximum current they can pass and the maximum reverse voltage they can withstand (this must be at least three times the supply RMS voltage so the rectifier can withstand the peak voltages). Please see the Diodes page for more details, including pictures of bridge rectifiers.

Fig:3.14 Bridge rectifier Alternate pairs of diodes conduct, changing over the connections so the alternating directions of AC are converted to the one direction of DC

Output: full-wave varying DC

IRRIGATION SYSTEM SOLAR USING ENERGY


(using all the AC wave) Operation During positive half cycle of secondary, the diodes D2 and D3 are in forward biased while D1 and D4 are in reverse biased as shown in the fig(b). The current flow direction is shown in the fig (b) with dotted arrows.

During negative half cycle of secondary voltage, the diodes D1 and D4 are in forward biased while D2 and D3 are in reverse biased as shown in the fig(c). The current flow direction is shown in the fig (c) with dotted arrows

Fig:3.16 bridge rectifier negative half cycle Single diode rectifier A single diode can be used as a rectifier but this produces half-wave varying DC which has gaps when the AC is negative. It is hard to smooth this sufficiently well to supply electronic circuits unless they require a very small current so the smoothing capacitor does not significantly discharge during the gaps. Please see the Diodes page for some examples of rectifier diodes.

IRRIGATION SYSTEM SOLAR USING ENERGY

Fig:3.17 Single diode rectifier

Output: halfwave varying DC

A circuit which is used to convert a.c to dc is known as RECTIFIER. The process of conversion a.c to d.c is called rectification

Comparison of rectifier circuits Type of Rectifier Parameter Number of diodes 1 PIV of diodes Vm D.C output voltage Vm/ 2Vm 2Vm/ Vm 2Vm/ 2 4 Half wave Full wave Bridge

IRRIGATION SYSTEM SOLAR USING ENERGY


Vdc,at no-load Ripple factor Ripple Frequency Rectification Efficiency Transformer Utilization Factor(TUF) RMS voltage Vrms 0.318Vm 1.21 f 0.406 0.287 Vm/2 0.636Vm 0.482 2f 0.812 0.693 Vm/2 0.636Vm 0.482 2f 0.812 0.812 Vm/2

Table:3.2 comparision of rectifier circuits Full-wave Rectifier From the above comparison we came to know that full wave bridge rectifier as more advantages than the other two rectifiers. So, in our project we are using full wave bridge rectifier circuit. Filter or smoothening circuit Smoothing is performed by a large value electrolytic capacitor connected across the DC supply to act as a reservoir, supplying current to the output when the varying DC voltage from the rectifier is falling. The diagram shows the unsmoothed varying DC (dotted line) and the smoothed DC (solid line). The capacitor charges quickly near the peak of the varying DC, and then discharges as it supplies current to the output.

fig:3.18 smoothing circuit and its waveform Note that smoothing significantly increases the average DC voltage to almost the peak value (1.4 RMS value). For example 6V RMS AC is rectified to full wave DC of about 4.6V RMS (1.4V is lost in the bridge rectifier), with smoothing this increases to almost the peak value giving 1.4 4.6 = 6.4V smooth DC. Smoothing is not perfect due to the capacitor voltage falling a little as it discharges,

IRRIGATION SYSTEM SOLAR USING ENERGY


giving a small ripple voltage. For many circuits a ripple which is 10% of the supply voltage is satisfactory and the equation below gives the required value for the smoothing capacitor. A larger capacitor will give less ripple. The capacitor value must be doubled when smoothing half-wave DC. C = smoothing capacitance in farads (F) Io = output current from the supply in amps (A) Vs = supply voltage in volts (V), this is the peak value of the unsmoothed DC f = frequency of the AC supply in hertz (Hz), 50Hz in the UK

A Filter is a device which removes the a.c component of rectifier output but allows the d.c component to reach the load As we have already seen, the rectifier circuitry takes the initial ac sine wave from the transformer or other source and converts it to pulsating dc. A full-wave rectifier will produce the waveform shown to the right, while a half-wave rectifier will pass only every other half-cycle to its output. This may be good enough for a basic battery charger, although some types of rechargeable batteries still won't like it. In any case, it is nowhere near good enough for most electronic circuitry. We need a way to smooth out the pulsations and provide a much "cleaner" dc power source for the load circuit. To accomplish this, we need to use a circuit called a filter. In general terms, a filter is any circuit that will remove some parts of a signal or power source, while allowing other parts to continue on without significant hinderance. In a power supply, the filter must remove or drastically reduce the ac variations while still making the desired dc available to the load circuitry. Filter circuits aren't generally very complex, but there are several variations. Any given filter may involve capacitors, inductors, and/or resistors in some combination. Each such combination has both advantages and disadvantages, and its own range of practical application. We will examine a number of common filter circuits on this page. A Single Capacitor

IRRIGATION SYSTEM SOLAR USING ENERGY

Fig:3.19 single capacitor circuit and its waveform If we place a capacitor at the output of the full-wave rectifier as shown to the left, the capacitor will charge to the peak voltage each half-cycle, and then will discharge more slowly through the load while the rectified voltage drops back to zero before beginning the next half-cycle. Thus, the capacitor helps to fill in the gaps between the peaks, as shown in red in the first figure to the right. Although we have used straight lines for simplicity, the decay is actually the normal exponential decay of any capacitor discharging through a load resistor. The extent to which the capacitor voltage drops depends on the capacitance of the capacitor and the amount of current drawn by the load; these two factors effectively form the RC time constant for voltage decay.

As a result, the actual voltage output from this combination never drops to zero, but rather takes the shape shown in the second figure to the right. The blue portion of the waveform corresponds to the portion of the input cycle where the rectifier provides current to the load, while the red portion shows when the capacitor provides current to the load. As you can see, the output voltage, while not pure dc, has much less variation (or ripple, as it is called) than the unfiltered output of the rectifier. A half-wave rectifier with a capacitor filter will only recharge the capacitor on every other peak shown here, so the capacitor will discharge considerably more between input pulses. Nevertheless, if the output voltage from the filter can be kept high enough at all times, the capacitor filter is sufficient for many kinds of loads, when followed by a suitable regulator circuit.

RC Filters

IRRIGATION SYSTEM SOLAR USING ENERGY

RC filters In order to reduce the ripple still more without losing too much of the dc output, we need to extend the filter circuit a bit. The circuit to the right shows one way to do this. This circuit does cause some dc loss in the resistor, but if the required load current is low, this is an acceptable loss.To see how this circuit reduces ripple voltage more than it reduces the dc output voltage, consider a load circuit that draws 10 mA at 20 volts dc. We'll use 100 f capacitors and a 100 resistor in the filter. For dc, the capacitors are effectively open circuits. Therefore any dc losses will be in that 100 resistor. for a load current of 10 mA (0.01 A), the resistor will drop 100 0.01 = 1 volt. Therefore, the dc output from the rectifier must be 21 volts, and the dc loss in the filter resistor amounts to 1/21, or about 4.76% of the rectifier output. This is generally quite acceptable. On the other hand, the ripple voltage (in the USA) exists mostly at a frequency of 120 Hz (there are higher-frequency components, but they will be attenuated even more than the 120 Hz component). At this frequency, each capacitor has a reactance of about 13.26 . Thus R and C2 form a voltage divider that reduces the ripple to about 13% of what came from the rectifier. Therefore, for a dc loss of less than 5%, we have attenuated the ripple by almost 87%. This is a substantial amount of ripple reduction, although it doesn't remove the ripple entirely. If the amount of ripple is still too much for the particular load circuit, additional filtering or a regulator circuit will be required.

LC Filters

IRRIGATION SYSTEM SOLAR USING ENERGY


FIG:3.21 LC filters While the RC filter shown above helps to reduce the ripple voltage, it introduces excessive resistive losses when the load current is significant. To reduce the ripple even more without a lot of dc resistance, we can replace the resistor with an inductor as shown in the circuit diagram to the right. In this circuit, the two capacitors store energy as before, and attempt to maintain a constant output voltage between input peaks from the rectifier. At the same time, the inductor stores energy in its magnetic field, and releases energy as needed in its attempt to maintain a constant current through itself. This provides yet another factor that attempts to smooth out the ripple voltage. In some cases, C1 is omitted from this filter circuit. The result is a lower dc output voltage, but improved ripple removal. The choice is a trade-off, and must be made according to the specific requirements in each individual case. For dc, the inductance has only the resistance of the wire that comprises the coil, which amounts to a few ohms. Meanwhile, the capacitors still operate as open circuits at dc, so they do not reduce the dc output voltage. However, at the basic ripple frequency of 120 Hz, a 10 Henry inductance has a reactance of: XL = 2 fL = 7540 At the same time, a 100 f capacitor at the same ripple frequency has a reactance of: XC = 1/2 fC = 13.26 Thus, L and C2 form a voltage divider that drastically reduces the ripple component (to less than 0.2%) while leaving the desired dc output nearly alone. This configuration may provide sufficiently pure dc for some applications, without the need for any following regulator at all. The drawback of this approach is that a 10 Henry inductor is as large as some power transformers, with a heavy iron core. It takes up a lot of space and is relatively expensive. This is why the RC filter circuit may be preferred to the LC filter, provided the ripple reduction is sufficient and the power loss in the resistor is not excessive. Capacitive filter The simple capacitor filter is the most basic type of power supply filter. The use of this filter is very limited. It is sometimes used on extremely high-voltage, low-current

IRRIGATION SYSTEM SOLAR USING ENERGY


power supplies for cathode-ray and similar electron tubes that require very little load current from the supply. This filter is also used in circuits where the power-supply ripple frequency is not critical and can be relatively high. The simple capacitor filter shown in figure 3-20 consists of a single-filter element. This capacitor (C1) is connected across the output of the rectifier in parallel with the load. The RC charge time of the filter capacitor (C1) must be short and the RC discharge time must be long to eliminate ripple action when using this filter. In other words, the capacitor must charge up fast with preferably no discharge at all. Better filtering also results when the frequency is high; therefore, the full-wave rectifier output is easier to filter than the half-wave rectifier because of its higher frequency.

Figure 3-22. - Full-wave rectifier with a capacitor filter.

full wave rectifier with a capacitor filter To understand better the effect that filtering has on E avg , compare the rectifier circuits without filters in figure 3-21 to those with filters in figure 3-22. The output waveforms in figure 3-21 represent the unfiltered outputs of the half-wave and full-wave rectifier circuits. Current pulses flow through the load resistance (R L) each time a diode conducts. The dashed line indicates the average value of output voltage. For the halfwave rectifier, Eavg is less than half the peak output voltage (or approximately 0.318 of the peak output voltage). For the full-wave rectifier, E avg is approximately 0.637. This value is still much less than the applied voltage. With no capacitor connected across the output of the rectifier circuit, the waveform has a large pulsating component (ripple) compared with the average or dc component. Now refer to figure 3-22. When a capacitor is connected across the output (in parallel with R L), the average value of output voltage (Eavg) is increased due to the filtering action of capacitor C1.

IRRIGATION SYSTEM SOLAR USING ENERGY

half-wave/full-wave rectifiers(without filters

Half-wave/full-wave rectifiers (with capacitor filters).

The value of the capacitor is fairly large (several microfarads); it thus presents a relatively low reactance to the pulsating current and stores a substantial charge. The rate of charge for the capacitor is limited only by the relatively low resistance of the conducting diode. The RC charge time of the circuit is, therefore, relatively short. As a result, when the pulsating voltage is first applied to the circuit, the capacitor charges rapidly and almost reaches the peak value of the rectified voltage within the first few cycles. The capacitor attempts to charge to the peak value of the rectified voltage anytime a diode is conducting, and tends to retain its charge when the rectifier output falls to zero. (The capacitor cannot discharge immediately). The capacitor slowly discharges through the load resistance (RL) during the time the rectifier

IRRIGATION SYSTEM SOLAR USING ENERGY


is nonconducting. We have seen that the ripple content in the rectified output of half wave rectifier is 121% or that of full-wave or bridge rectifier or bridge rectifier is 48% such high percentages of ripples is not acceptable for most of the applications. Ripples can be removed by one of the following methods of filtering. (a) A capacitor, in parallel to the load, provides an easier by pass for the ripples voltage though it due to low impedance. At ripple frequency and leave the d.c.to appears the load. (b) An inductor, in series with the load, prevents the passage of the ripple current (due to high impedance at ripple frequency) while allowing the d.c (due to low resistance to d.c) (c) Various combinations of capacitor and inductor, such as L-section filter section filter, multiple section filter etc. which make use of both the properties mentioned in (a) and (b) above. Two cases of capacitor filter, one applied on half wave rectifier and another with full wave rectifier Filtering is performed by a large value electrolytic capacitor connected across the DC supply to act as a reservoir, supplying current to the output when the varying DC voltage from the rectifier is falling. The capacitor charges quickly near the peak of the varying DC, and then discharges as it supplies current to the output. Filtering significantly increases the average DC voltage to almost the peak value (1.4 RMS value). To calculate the value of capacitor(C), C = *3*f*r*Rl Where, f = supply frequency, r = ripple factor, Rl = load resistance Note: In our circuit we are using 1000F Hence large value of capacitor is placed to reduce ripples and to improve the DC component.

IRRIGATION SYSTEM SOLAR USING ENERGY


Regulator

fig:3.25 Regulators An assortment of 78XX ICs The 78xx (also sometimes known as LM78xx) series of devices is a family of selfcontained fixed linear voltage regulator integrated circuits. The 78xx family is a very popular choice for many electronic circuits which require a regulated power supply, due to their ease of use and relative cheapness. When specifying individual ICs within this family, the xx is replaced with a two-digit number, which indicates the output voltage the particular device is designed to provide (for example, the 7805 has a 5 volt output, while the 7812 produces 12 volts). The 78xx line are positive voltage regulators, meaning that they are designed to produce a voltage that is positive relative to a common ground. There is a related line of 79xx devices which are complementary negative voltage regulators. 78xx and 79xx ICs can be used in combination to provide both positive and negative supply voltages in the same circuit, if necessary. 78xx ICs have three terminals and are most commonly found in the TO220 form factor, although smaller surface-mount and larger TO3 packages are also available from some manufacturers. These devices typically support an input voltage which can be anywhere from a couple of volts over the intended output voltage, up to a maximum of 35 or 40 volts, and can typically provide up to around 1 or 1.5 amps of current (though smaller or larger packages may have a lower or higher current rating). Advantages The 78xx series has several key advantages over many other voltage regulator circuits which have resulted in its popularity:

78xx series ICs do not require any additional components to provide a constant, regulated source of power, making them easy to use, as well as economical, and also efficient uses of circuit board real estate. By contrast, most other voltage

IRRIGATION SYSTEM SOLAR USING ENERGY


regulators require several additional components to set the output voltage level, or to assist in the regulation process. Some other designs (such as a switching power supply) can require not only a large number of components but also substantial engineering expertise to implement correctly as well.

78xx series ICs have built-in protection against a circuit drawing too much power. They also have protection against overheating and short-circuits, making them quite robust in most applications. In some cases, the current-limiting features of the 78xx devices can provide protection not only for the 78xx itself, but also for other parts of the circuit it is used in, preventing other components from being damaged as well.

Disadvantages The 78xx devices have a few drawbacks which can make them unsuitable or less desirable for some applications:

The input voltage must always be higher than the output voltage by some minimum amount (typically 2 volts). This can make these devices unsuitable for powering some devices from certain types of power sources (for example, powering a circuit which requires 5 volts using 6-volt batteries will not work using a 7805). As they are based on a linear regulator design, the input current required is always the same as the output current. As the input voltage must always be higher than the output voltage, this means that the total power (voltage multiplied by current) going into the 78xx will be more than the output power provided. The extra input power is dissipated as heat. This means both that for some applications an adequate heatsink must be provided, and also that a (often substantial) portion of the input power is wasted during the process, rendering them less efficient than some other types of power supplies. When the input voltage is significantly higher than the regulated output voltage (for example, powering a 7805 using a 24 volt power source), this inefficiency can be a significant issue. Even in larger packages, 78xx integrated circuits cannot supply as much power as many designs which use discrete components, and therefore are generally not

IRRIGATION SYSTEM SOLAR USING ENERGY


appropriate for applications which require more than a few amps of current. Manufacturers Semiconductor manufacturers producing 78xx ICs, or variants thereof, include:

National Semiconductor Fairchild Semiconductor Datel Korea Electronics Company (KEC) Semelab Unisonic Technologies Bay Linear NTE Electronics Power Mate (PDuke) Motorola

Individual devices in series There are several common configurations for 78xx ICs, including 7805 (5 volt), 7806 (6 volt), 7808 (8 volt), 7809 (9 volt), 7810 (10 volt), 7812 (12 volt), 7815 (15 volt), 7818 (18 volt), and 7824 (24 volt) versions. The 7805 is very commonly used, as its regulated 5 volt supply can provide an easy and useful power source for most TTL components. Some manufacturers also produce less common variations on the 78xx design, including lower-power versions such as the LM78Mxx series (500mA) and LM78Lxx series (100mA) from National Semiconductor. Some devices also provide slightly different voltages than usual, such as the LM78L62 (6.2 volts) and LM78L82 (8.2 volts).

Unrelated Devices Despite similar names, the LM78S40 device from National Semiconductor is not part of the usual 78xx family, and does not use the same design. It is intended to be used as a component in switching regulator designs, and is not a linear regulator like other 78xx devices. Likewise, the 7803SR from Datel is actually a full switching power

IRRIGATION SYSTEM SOLAR USING ENERGY


supply module (designed as a drop-in replacement for 78xx chips), and not actually a linear regulator like the 78xx ICs.

LM317 A similar linear regulator chip with a configurable output voltage. DC to DC converter A class of devices which convert one DC voltage level to another. Linear regulators (and thus 78xx devices) are a form of DC to DC converter.

External links Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable output voltages. The maximum current they can pass also rates them. Negative voltage regulators are available, mainly for use in dual supplies. Most regulators include some automatic protection from excessive current ('overload protection') and overheating ('thermal protection'). Many of the fixed voltage regulator ICs has 3 leads and look like power transistors, such as the 7805 +5V 1A regulator shown on the right. The LM7805 is simple to use. You simply connect the positive lead of your unregulated DC power supply (anything from 9VDC to 24VDC) to the Input pin, connect the negative lead to the Common pin and then when you turn on the power, you get a 5 volt supply from the

output pin. Fig:3.26 LM7805 Regulators 78XX The Bay Linear LM78XX is integrated linear positive regulator with three terminals. The LM78XX offer several fixed output voltages making them useful in wide range of applications. When used as a zener diode/resistor combination replacement, the LM78XX usually results in an effective output impedance improvement of two orders of magnitude, lower quiescent current. The LM78XX is available in the TO-252, TO-220 & TO-263packages, Features Output Current of 1.5A Output Voltage Tolerance of 5% Internal thermal overload protection

IRRIGATION SYSTEM SOLAR USING ENERGY


Internal Short-Circuit Limited No External Component Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V Offer in plastic TO-252, TO-220 & TO-263 Direct Replacement for LM78XX The power supplies are designed to convert high voltage AC mains electricity to a suitable low voltage supply for electronics circuits and other devices. A RPS (Regulated Power Supply) is the Power Supply with Rectification, Filtering and Regulation being done on the AC mains to get a Regulated power supply for Microcontroller and for the other devices being interfaced to it. A power supply can by broken down into a series of blocks, each of which performs a particular function. A d.c power supply which maintains the output voltage constant irrespective of a.c mains fluctuations or load variations is known as Regulated D.C Power SupplyWe are connected +5v dc supply to 40th pin of controller and ground to the 20th pin of controller.

LIGHT EMITTING DIODES (LEDS)

Fig3.27 . Circuit symbol

FUNCTION

IRRIGATION SYSTEM SOLAR USING ENERGY


LEDs emit light when an electric current passes through them.

CONNECTING AND SOLDERING LEDs must be connected the correct way round, the diagram may be labelled a or + for anode and k or - for cathode (yes, it really is k, not c, for cathode!). The cathode is the short lead and there may be a slight flat on the body of round LEDs. If you can see inside the LED the cathode is the larger electrode (but this is not an official identification method). LEDs can be damaged by heat when soldering, but the risk is small unless you are very slow. No special precautions needed for soldering most LEDs. TESTING AN LED Never connect an LED directly to a battery powersupply! It will be destroyed almost instantly because too much current will pass through and burn it out. LEDs must have a resistor in series to limit the current to a safe value, for quick testing purposes a 1k resistor is suitable for most LEDs if your supply voltage is 12V or less. Remember connect the LED the correct way round! MAX232 The MAX232 is an integrated circuit that converts signals from an RS-232 serial port to signals suitable for use in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver and typically converts the RX, TX, CTS and RTS signals. The drivers provide RS-232 voltage level outputs (approx. 7.5 V) from a single + 5 V supply via on-chip charge pumps and external capacitors. This makes it useful for implementing RS-232 in devices that otherwise do not need any voltages outside the 0 V to + 5 V range, as power supply design does not need to be made more complicated just for driving the RS-232 in this case. The receivers reduce RS-232 inputs (which may be as high as 25 V), to standard 5 V TTLlevels. These receivers have a typical threshold of 1.3 V, and a

IRRIGATION SYSTEM SOLAR USING ENERGY


typical hysteresis of 0.5 V. The later MAX232A is backwards compatible with the original MAX232 but may operate at higher baud rates and can use smaller external capacitors 0.1 F in place of the 1.0 F capacitors used with the original device. The newer MAX3232 is also backwards compatible, but operates at a broader voltage range, from 3 to 5.5 V. Pin to pin compatible: ICL232, ST232, ADM232, HIN232. Voltage levels It is helpful to understand what occurs to the voltage levels. When a MAX232 IC receives a TTL level to convert, it changes a TTL Logic 0 to between +3 and +15 V, and changes TTL Logic 1 to between -3 to -15 V, and vice versa for converting from RS232 to TTL. This can be confusing when you realize that the RS232 Data Transmission voltages at a certain logic state are opposite from the RS232 Control Line voltages at the same logic state. To clarify the matter, see the table below. For more information see RS-232 Voltage Levels. RS232 Line Type & Logic Level RS232 Voltage TTL Voltage to/from MAX232

Data Transmission (Rx/Tx) Logic 0

+3 V to +15 V 0 V

Data Transmission (Rx/Tx) Logic 1

-3 V to -15 V 5 V

Control Signals (RTS/CTS/DTR/DSR) Logic 0

-3 V to -15 V 5 V

Control Signals (RTS/CTS/DTR/DSR) Logic 1

+3 V to +15 V 0 V

IRRIGATION SYSTEM SOLAR USING ENERGY

RELAYS
Relay and Switch: 1. Mechanical relay: Typical Mechanical Relay connection pin This is a very important section. The introduction to this electrical control switch, call a Relay. It is basically a device to activate a mechanical switch, by electrical means. This is unlike a switch which is activated manually. In another words it is a device that convert electrical signal to a mechanical energy back to electrical signal again.Similar to mechanical switch, they can be described as 2P2T, single pole double throw, etc...

IRRIGATION SYSTEM SOLAR USING ENERGY


How it works? A electrical voltage will be applied to activate a coil in the relay. The coil being powered up, will generate a magnetic force that will attract the lever. This lever will be pulled towards the magnetized coil, causing an action that will switch the mechanical contact. Why on earth this relay is for? Why is there a need to convert electrical to mechanical to electrical again? A example would be that you may want to switch on your home 230Vac power remotely from your friend house 1km away. To do this, one possibility is to lay cables thick between your friend's home and your home. The cable must be thick enough to handle the high current and 230Vac voltage. Using a 230Vac rated switch, which is relatively bigger in size, it can be mounted in your friends home in order to do the switching. Another cool method is that you can deploy a relay to help switching the 230Vac in your own house, while a thinner wire and lower rating switch laid across your friend's house. This is one of the use of a relay.To be exact, the relay helps to control energy from a electrical signal to a mechanical energy to electrical power. Other application can be, controlling a high power motor using tiny switch, or to switch on the house lightings using your computer system digital signal. The application of relay is important, as it is still widely used in control application. It can be thought of as a amplifier. A powered signal can be produced by using a small signal. This principle is similar to the use of a transistor as a switch. Knowledge in the relay will certainly aid understanding the transistor, commonly seen in circuit interfacing.

IRRIGATION SYSTEM SOLAR USING ENERGY


Another common use of relay is to act as a isolator output for communication or I/O between unknown electrical system. This isolated output acts as a mean for electronic hardware to communicate without affecting another electronics system. System design will be simpler, while integration/troubleshooting work will be easier and faster, because system can be isolated easily. For example, one company may have a robotic application which require mobility and high current discharge. A 12V SLA sealed lead acid battery would certainly meet this requirement. A mobile phone company is following the market trend and will be designing a 3.3V electronics circuits which has the advantage of size and energy efficiency. Another one may choose to deploy 5V system, because they have been using some critical component which requires 5V. How are their design able to communicate or control another system using a different voltage system. They may use communication standard like RS232 to communication between systems. However the design will be considerably too complex if the communication requires only 1 bit of information, either on or off. The operation of a relay as an isolated output is simple. The system X that activate the relay provides a switch contact to indicate logic 1 or 0 to the receiving system Y. Y provides its own power and interfacing circuit to sense if the switch is close or open. Since there is no voltage interaction between the two system, some people defined this as a "Dry Contact interface". System X activating the relay has provides a "Dry Contact" or a switch contact output without any electrical signal transmitted to system Y. Dry contact does not mean that no electrical current flow. It simply mean that Y will provide its own electrical circuit to obtain the output signal from X. For further information on detecting switch status, you can refer to the section on mechanical switch.

2. Reed relay : Reed Relay is a smaller version of relay. Package is inplastic. It is about the same size as a 14 pin DIP IC socket. It has a slightly different magnetize structure,however the principle is the same as a mechanical relay. Since it is small, this reed relay is suitable for handling signal, and not high power or high current drawing load. Switching sound is hardly noticeable. You can still be able to hear some tick tick sound when it is activate. Switching speed is considerable faster than a relay because the switch mechanism inside the package is small.

IRRIGATION SYSTEM SOLAR USING ENERGY


Application for a reed relay can be for output signal isolation purposes or for switching on small current load. Example of small load devices that can be switched on might be LED, DC buzzer, relay, circuit or sensors. Typical current handling capacity is of about 0.5A load. Reed relay comes in different type of forms. Forms refers to the nature of the switch contact. For further information on "contact forms", refer to the switch section above.

3. Solid state relay: This is newer switch device known as Solid State Relay (SSR) or MOSFET relay. It is a semiconductor device, to replace the mechanical relay as a reliable alternative. In solid state relay, the input and switched output have voltage polarity. Be careful not to connect to the wrong terminal. Some SSR are design to have the same package and pin layout design as a reed relay. It looks like a reed relay. You can differential between a reed and a SSR device by testing it's input terminal. A reed relay is able to function with a reverse input priority, however a SSR will not be able to function with reverse input priority. The solid state relay can be smaller than a mechanical relay. It is a soft start device and does not result in current slug or arcing effect. It has no mechanical switching and is able to do faster switching. This mean that there are no noise, no glitches mechanical switching, lesser wear and tear. All these advantage adds up to longer lasting and more reliable device. The device works with a wider range of input voltage (typical 3V to 12V) and consume relatively less power to turn on the switch.

IRRIGATION SYSTEM SOLAR USING ENERGY


Like other semiconductor devices, they do have their disadvantages. The component have current leakage when inactive and dissipate heat during operation. Heat sink may be required to prevent overheating. With a heat sink mounted, the whole design could be a lot larger than the mechanical relay alternative. The heat sink itself can be up to 5 times the size of the SSR. If you don't want to mount the huge heat sink to the device, you can try using a SSR that have a much higher current rating, of at least 2 times the capacity of what is required. At least it will not be very hot. If possible, mount it to a metal chassis or metal surface to act as a heat sink to dissipate the heat.

Switch: 1.Wire connection: Long long time ago, circuit connection is achieved usingmuscular means. The telephone network is one of a majorcommunication system in the early days. To Call your buddynext block, the first step you have to do is to pick up the phone. A human operator will attend to your pick up. Speakto her about the intention to talk to your buddy. The operator will manually plunk in wire connector linking your home telephone to your buddy phone. And Yes, you can now talk to your friend because there are operator doing the switching at the end of your telephone line. Sounds a lot of manual work. Yes, this is the good old days. The telephone operators in the central telephone exchange house, are making the circuit connection manually. This is what this

IRRIGATION SYSTEM SOLAR USING ENERGY


page is all about. All about switches. All about making a good short circuit. Not all short circuit is bad. In fact they are the fundamental building blocks in digital electronics. Many electronic design/interface are as simple as a switch.In the articles that follows, it will be about the various type of electronics components that can help you in the creation of the perfect short circuits.

2.Mechanical switch: Mechanical switches is a simple type of interface to control electrical stuff using the means of some mechanical action. In short, a switch is a mechanical to electrical conversion device. I can't find any history on the evolution of the mechanical switches. I guess people might have become smarter. Rather than using a jumper wire to make connection manually, human invented switch to make short circuiting task more efficient. Tedious and time consuming work. Plucking the wires in and out takes a lot more effort, compare to toggling switches.Of course mechanical switches are not suitable for telephone exchange application for the millions of household. However understand the roles of switches.. The greatest thing to understand about switches is allabout the component/device rating. Some people refer it as the power handling capacity, which is the voltage and the current. The voltage it can handle across the switch terminals without destroying itself. Sometimes refer to as the breakdown voltage. The maximum amount of current that can flow through, without destroying itself. Sometimes refer to as the load current the switch can support. In fact, the whole idea of this "switch" thingy is aboutunderstanding the rating and capabilities of the various type of electronics components. I mean it applies to all the electronics devices, includingeven wires. To me, this is also the most important concept towards understanding of all other electronics. It is so important. Fortunately it is also easy to understand, if you pay enough attention in this topic. Not just switch have rating. Wire also have it's rating, since we know that switch is in fact another form of wire, or to be precise we call it a conductor.

IRRIGATION SYSTEM SOLAR USING ENERGY


Like the size of a water pipe, there is a limit on the water flow rate. If the pipe diameter size is small, flow rate will be small too. Larger diameter pipe more water can flow. This is what they mean by the term "current rating". Larger wire size can carry more current. Small wire may also carry the same current at the expense of increase temperature. When it gets too hot, the wire will just burn off, just like what a fuse do.

IRRIGATION SYSTEM SOLAR USING ENERGY

IRRIGATION SYSTEM SOLAR USING ENERGY


SERIAL COMMUNICATION: The main requirements for serial communication are: 1. Microcontroller 2. PC 3. RS 232 cable 4. MAX 232 IC 5. HyperTerminal When the pins P3.0 and P3.1 of microcontroller are set, UART which is inbuilt in the microcontroller will be enabled to start the serial communication. Asynchronous and synchronous serial communication Computers transfer data in two ways: parallel and serial. In parallel data transfers, often 8 or more lines are used to transfer data to a device that is only a few feet away. Although a lot of data can be transferred in a short amount of time by using many wires in parallel, the distance cannot be great. To transfer to a device located many meters away, the serial method is best suitable. In serial communication, the data is sent one bit at a time. The 8051 has serial communication capability built into it, thereby making possible fast data transfer using only a few wires. The fact that serial communication uses a single data line instead of the 8-bit data line instead of the 8-bit data line of parallel communication not only makes it cheaper but also enables two computers located in two different cities to communicate over the telephone.

IRRIGATION SYSTEM SOLAR USING ENERGY


Serial data communication uses two methods, asynchronous and synchronous. The synchronous method transfers a block of data at a time, while the asynchronous method transfers a single byte at a time. With synchronous communications, the two devices initially synchronize themselves to each other, and then continually send characters to stay in sync. Even when data is not really being sent, a constant flow of bits allows each device to know where the other is at any given time. That is, each character that is sent is either actual data or an idle character. Synchronous communications allows faster data transfer rates than asynchronous methods, because additional bits to mark the beginning and end of each data byte are not required. The serial ports on IBM-style PCs are asynchronous devices and therefore only support asynchronous serial communications. Asynchronous means "no synchronization", and thus does not require sending and receiving idle characters. However, the beginning and end of each byte of data must be identified by start and stop bits. The start bit indicates when the data byte is about to begin and the stop bit signals when it ends. The requirement to send these additional two bits causes asynchronous communication to be slightly slower than synchronous however it has the advantage that the processor does not have to deal with the additional idle characters. There are special IC chips made by many manufacturers for serial data communications. These chips are commonly referred to as UART(universal asynchronous receiver-transmitter) and USART(universal synchronous-asynchronous receiver-transmitter). The 8051 has a built-in UART. In the asynchronous method, the data such as ASCII characters are packed between a start and a stop bit. The start bit is always one bit, but the stop bit can be one or two bits. The start bit is always a 0 (low) and stop bit (s) is 1 (high). This is called framing. The rate of data transfer in serial data communication is stated as bps (bits per second). Another widely used terminology for bps is baud rate. The data transfer rate of a given computer system depends on communication ports incorporated into that system. And in asynchronous serial data communication, this baud rate is generally limited to 100,000bps. The baud rate is fixed to 9600bps in order to interface with the microcontroller using a crystal of 11.0592 MHz.

IRRIGATION SYSTEM SOLAR USING ENERGY

RS232 CABLE: To allow compatibility among data communication equipment, an interfacing standard called RS232 is used. Since the standard was set long before the advent of the TTL logic family, its input and output voltage levels are not TTL compatible. For this reason, to connect any RS232 to a microcontroller system, voltage converters such as MAX232 are used to convert the TTL logic levels to the RS232 voltage levels and vice versa. MAX 232: Max232 IC is a specialized circuit which makes standard voltages as required by RS232 standards. This IC provides best noise rejection and very reliable against discharges and short circuits. MAX232 IC chips are commonly referred to as line drivers. To ensure data transfer between PC and microcontroller, the baud rate and voltage levels of Microcontroller and PC should be the same. The voltage levels of microcontroller are logic1 and logic 0 i.e., logic 1 is +5V and logic 0 is 0V. But for PC, RS232 voltage levels are considered and they are: logic 1 is taken as -3V to -25V and logic 0 as +3V to +25V. So, in order to equal these voltage levels, MAX232 IC is used. Thus this IC converts RS232 voltage levels to microcontroller voltage levels and vice versa. Fig: Pin diagram of MAX 232 IC:

IRRIGATION SYSTEM SOLAR USING ENERGY

SCON (serial control) register: The SCON register is an 8-bit register used to program the start bit, stop bit and data bits of data framing. SM0 SM0 TI SM1 RI SM0 SM1 SM2 REN TB8 RB8 TI SCON.7 SCON.6 SCON.5 SCON.4 SCON.3 SCON.2 SCON.1 Serial port mode specifier Serial port mode specifier Used for multiprocessor communication Set/cleared by software to enable/disable reception Not widely used Not widely used Transmit interrupt flag. Set by hardware at the beginning of the stop bit in mode 1. Must be cleared by software. RI SCON.0 Receive interrupt flag. Set by hardware at the beginning of the stop bit in mode 1. Must be cleared by software. SM1 SM2 REN TB8 RB8 SM2 REN TB8 RB8 TI RI

IRRIGATION SYSTEM SOLAR USING ENERGY

SM0 0 0 1 1

SM1 0 1 0 1 Serial Mode 0 Serial Mode 1, 8-bit data, 1 stop bit, 1 start bit Serial Mode 2 Serial Mode 3

Of the four serial modes, only mode 1 is widely used. In the SCON register, when serial mode 1 is chosen, the data framing is 8 bits, 1 stop bit and 1 start bit, which makes it compatible with the COM port of IBM/ compatible PCs. And the most important is serial mode 1 allows the baud rate to be variable and is set by Timer 1 of the 8051. In serial mode 1, for each character a total of 10 bits are transferred, where the first bit is the start bit, followed by 8 bits of data and finally 1 stop bit. GSM (Global System for Mobile Communications , originally Groupe Spcial Mobile), is a standard set developed by the European Telecommunications Standards Institute (ETSI) to describe technologies for second generation (2G) digital cellular networks. Developed as a replacement for first generation(1G) analog cellular networks, the GSM standard originally described a digital, circuit switched network optimized for full duplex voice telephony. The standard was expanded over time to include first circuit switched data transport, then packet data transport via GPRS (General Packet Radio services). Packet data transmission speeds were later increased via EDGE(Enhanced Data rates

IRRIGATION SYSTEM SOLAR USING ENERGY


for GSM Evolution). The GSM standard is more improved after the development of third generation (3G) UMTS standard developed by the 3GPP. GSM networks will evolve further as they begin to incorporate fourth generation (4G) LTE Advanced standards. "GSM" is a trademark owned by the GSM Association.

History Early European analogue cellular networks employed an uncoordinated mix of technologies and protocols that varied from country to country, preventing interoperability of subscriber equipment and increasing complexity for equipment manufacturers who had to contend with varying standards from a fragmented market. The work to develop a European standard for digital cellular voice telephony began in 1982 when theEuropean Conference of Postal and Telecommunications Administrations (CEPT) created the Groupe Spcial Mobile committee and provided a permanent group of technical support personnel, based in Paris. In 1987, 15 representatives from 13 European countries signed amemorandum of understanding to develop and deploy a common cellular telephone system across Europe. The foresight of deciding to develop a continental standard paid off, eventually resulting in a unified, open, standard-based network larger than that in the United States.[1][2][3][4] France and Germany signed a joint development agreement in 1984 and were joined by Italy and the UK in 1986. In 1986 the European Commission proposed to reserve the 900 MHz spectrum band for GSM. By 1987, basic parameters of the GSM standard had been agreed upon and 15 representatives from 13 European nations signed a memorandum of understanding in Copenhagen, committing to deploy GSM. In 1989, the Groupe Spcial Mobile committee was transferred from CEPT to the European Telecommunications Standards Institute (ETSI).[3] Phase I of the GSM specifications were published in 1990. The historic world's first GSM call was made by the Finnish prime minister Harri Holkeri to Kaarina Suonio (mayor in city of Tampere) on July 1, 1991. The first network was built by Telenokia and Siemens and operated byRadiolinja.[5] In 1992, the first short messaging service (SMS or "text message") message was sent and Vodafone UK and Telecom Finland signed the first international roaming agreement. Work had begun in 1991 to expand the GSM standard to the

IRRIGATION SYSTEM SOLAR USING ENERGY


1800 MHz frequency band and the first 1800 MHz network became operational in the UK in 1993. Also in 1993, Telecom Australia became the first network operator to deploy a GSM network outside of Europe and the first practical hand-held GSM mobile phone became available. In 1995, fax, data and SMS messaging services became commercially operational, the first 1900 MHz GSM network in the world became operational in the United States and GSM subscribers worldwide exceeded 10 million. In this same year, the GSM Association was formed. Pre-paid GSM SIM cards were launched in 1996 and worldwide GSM subscribers passed 100 million in 1998.[3] In 2000, the first commercial GPRS services were launched and the first GPRS compatible handsets became available for sale. In 2001 the first UMTS (W-CDMA) network was launched and worldwide GSM subscribers exceeded 500 million. In 2002 the first multimedia messaging services (MMS) were introduced and the first GSM network in the 800 MHz frequency band became operational. EDGE services first became operational in a network in 2003 and the number of worldwide GSM subscribers exceeded 1 billion in 2004.[3] By 2005, GSM networks accounted for more than 75% of the worldwide cellular network market, serving 1.5 billion subscribers. In 2005, the first HSDPA capable network also became operational. The first HSUPA network was launched in 2007 and worldwide GSM subscribers exceeded two billion in 2008.[3] The GSM Association estimates that technologies defined in the GSM standard serve 80% of the global mobile market, encompassing more than 5 billion people across more than 212 countries and territories, making GSM the most ubiquitous of the many standards for cellular networks.[6]

GSM cell site antennas in the Deutsches Museum, Munich, Germany GSM is a cellular network, which means that cell phones connect to it by searching for cells in the immediate vicinity. There are five different cell sizes in a GSM network macro, micro, pico, femtoand umbrella cells. The coverage area of each cell varies according to the implementation environment. Macro cells can be regarded as cells where the base station antenna is installed on a mast or a building above average roof top level. Micro cells are

IRRIGATION SYSTEM SOLAR USING ENERGY


cells whose antenna height is under average roof top level; they are typically used in urban areas. Picocells are small cells whose coverage diameter is a few dozen metres; they are mainly used indoors. Femtocells are cells designed for use in residential or small business environments and connect to the service providers network via a broadband internet connection. Umbrella cells are used to cover shadowed regions of smaller cells and fill in gaps in coverage between those cells. Cell horizontal radius varies depending on antenna height, antenna gain and propagation conditions from a couple of hundred metres to several tens of kilometres. The longest distance the GSM specification supports in practical use is 35 kilometres (22 mi). There are also several implementations of the concept of an extended cell,[7] where the cell radius could be double or even more, depending on the antenna system, the type of terrain and the timing advance. Indoor coverage is also supported by GSM and may be achieved by using an indoor picocell base station, or an indoor repeater with distributed indoor antennas fed through power splitters, to deliver the radio signals from an antenna outdoors to the separate indoor distributed antenna system. These are typically deployed when a lot of call capacity is needed indoors; for example, in shopping centers or airports. However, this is not a prerequisite, since indoor coverage is also provided by in-building penetration of the radio signals from any nearby cell. The modulation used in GSM is Gaussian minimum-shift keying (GMSK), a kind of continuousphase frequency shift keying. In GMSK, the signal to be modulated onto the carrier is first smoothed with a Gaussian low-pass filter prior to being fed to a frequency modulator, which greatly reduces the interference to neighboring channels (adjacent-channel interference). GSM carrier frequencies Main article: GSM frequency bands GSM networks operate in a number of different carrier frequency ranges (separated into GSM frequency ranges for 2G and UMTS frequency bands for 3G), with most 2G GSM networks operating in the 900 MHz or 1800 MHz bands. Where these bands were already allocated, the 850 MHz and 1900 MHz bands were used instead (for example in Canada and the United States). In rare cases the 400 and 450 MHz frequency bands are assigned in some countries because they were previously used for first-generation systems. Most 3G networks in Europe operate in the 2100 MHz frequency band.

IRRIGATION SYSTEM SOLAR USING ENERGY


Regardless of the frequency selected by an operator, it is divided into timeslots for individual phones to use. This allows eight full-rate or sixteen half-rate speech channels per radio frequency. These eight radio timeslots (or eight burst periods) are grouped into a TDMA frame. Half rate channels use alternate frames in the same timeslot. The channel data rate for all 8 channels is 270.833 kbit/s, and the frame duration is 4.615 ms. The transmission power in the handset is limited to a maximum of 2 watts in GSM850/900 and 1 watt in GSM1800/1900. Voice codecs GSM has used a variety of voice codecs to squeeze 3.1 kHz audio into between 6.5 and 13 kbit/s. Originally, two codecs, named after the types of data channel they were allocated, were used, called Half Rate (6.5 kbit/s) and Full Rate (13 kbit/s). These used a system based upon linear predictive coding (LPC). In addition to being efficient with bitrates, these codecs also made it easier to identify more important parts of the audio, allowing the air interface layer to prioritize and better protect these parts of the signal. GSM was further enhanced in 1997[8] with the Enhanced Full Rate (EFR) codec, a 12.2 kbit/s codec that uses a full rate channel. Finally, with the development of UMTS, EFR was refactored into a variable-rate codec called AMR-Narrowband, which is high quality and robust against interference when used on full rate channels, and less robust but still relatively high quality when used in good radio conditions on half-rate channels. Network structure

IRRIGATION SYSTEM SOLAR USING ENERGY

The structure of a GSM network The network is structured into a number of discrete sections:

The Base Station Subsystem (the base stations and their controllers). the Network and Switching Subsystem (the part of the network most similar to a fixed network). This is sometimes also just called the core network. The GPRS Core Network (the optional part which allows packet based Internet connections). The Operations support system (OSS) for maintenance of the network.

Subscriber Identity Module (SIM) Main article: Subscriber Identity Module One of the key features of GSM is the Subscriber Identity Module, commonly known as a SIM card. The SIM is a detachable smart card containing the user's subscription information and phone book. This allows the user to retain his or her information after switching handsets. Alternatively, the user can also change operators while retaining the handset simply by changing the SIM. Some operators will block this by allowing the phone to use only a single SIM, or only a SIM issued by them; this practice is known as SIM locking. Phone locking Main article: SIM lock

IRRIGATION SYSTEM SOLAR USING ENERGY


Sometimes mobile network operators restrict handsets that they sell for use with their own network. This is called locking and is implemented by a software feature of the phone. Because the purchase price of the mobile phone to the consumer may be subsidized with revenue from subscriptions, operators must recoup this investment before a subscriber terminates service. A subscriber may usually contact the provider to remove the lock for a fee, utilize private services to remove the lock, or make use of free or fee-based software and websites to unlock the handset themselves. In some countries (e.g., Bangladesh,Brazil, Chile, Hong Kong, India, Lebanon, Malaysia, Pakistan, Singapore) all phones are sold unlocked. In others (e.g., Finland, Singapore) it is unlawful for operators to offer any form of subsidy on a phone's price.[9] GSM service security GSM was designed with a moderate level of service security. The system was designed to authenticate the subscriber using a pre-shared key and challenge-response. Communications between the subscriber and the base station can be encrypted. The development of UMTSintroduces an optional Universal Subscriber Identity Module (USIM), that uses a longer authentication key to give greater security, as well as mutually authenticating the network and the user whereas GSM only authenticates the user to the network (and not vice versa). The security model therefore offers confidentiality and authentication, but limited authorization capabilities, and no non-repudiation. GSM uses several cryptographic algorithms for security. The A5/1 and A5/2 stream ciphers are used for ensuring over-the-air voice privacy. A5/1 was developed first and is a stronger algorithm used within Europe and the United States; A5/2 is weaker and used in other countries. Serious weaknesses have been found in both algorithms: it is possible to break A5/2 in real-time with a ciphertext-only attack, and in January 2007, The Hacker's Choice started the A5/1 cracking project with plans to use FPGAs that allow A5/1 to be broken with a rainbow tableattack.[10] The system supports multiple algorithms so operators may replace that cipher with a stronger one.

IRRIGATION SYSTEM SOLAR USING ENERGY


On 28 December 2009 German computer engineer Karsten Nohl announced that he had cracked the A5/1 cipher.[11] According to Nohl, he developed a number of rainbow tables (static values which reduce the time needed to carry out an attack) and have found new sources forknown plaintext attacks. He also said that it is possible to build "a full GSM interceptor ... from open source components" but that they had not done so because of legal concerns.[12] An update by Nancy Owano on Dec. 27, 2011 on PhysOrg.com quotes Nohl as a "security expert", and details these concerns: Nohl said that he was able to intercept voice and text conversations by impersonating another user to listen to their voice mails or make calls or send text messages. Even more troubling was that he was able to pull this off using a seven-year-old Motorola cellphone and decryption software available free off the Internet.[13] GSM was also mentioned in a Reuters story "Hackers say to publish emails stolen from Stratfor" on Yahoo! News.[14] New attacks have been observed that take advantage of poor security implementations, architecture and development for smart phone applications. Some wiretapping and eavesdropping techniques hijack[15] the audio input and output providing an opportunity for a 3rd party to listen in to the conversation. At present such attacks often come in the form of a Trojan, malware or a virus and might be detected by security software. GSM uses General Packet Radio Service (GPRS) for data transmissions like browsing the web. The most commonly deployed GPRS andEDGE ciphers were publicly broken in 2011, and the evidence indicates that they were once again intentionally left weak by the mobile industry designers.[16] The researchers revealed flaws in the commonly used GEA/1 and GEA/2 ciphers and published the open source "gprsdecode" software for sniffing GPRS/EDGE networks. They also noted that some carriers don't encrypt the data at all (i.e. using GEA/0) in order to detect the use of traffic or protocols they don't like, e.g. Skype, leaving their customers unprotected. GEA/3 seems to remain relatively hard to break and is said to be in use on some more modern networks. If used with USIM to prevent connections to fake base stations and downgrade attacks, users will be protected in the medium term, though migration to 128-bit GEA/4 is still recommended.

IRRIGATION SYSTEM SOLAR USING ENERGY


But since GEA/0, GEA/1 and GEA/2 are widely deployed, applications should use SSL/TLS for sensitive data, as they would on wi-finetworks.

GSM open-source software Several open-source software projects exist that provide certain GSM features:

gsmd daemon by Openmoko OpenBTS develops a Base transceiver station The GSM Software Project aims to build a GSM analyzer for less than $1000 OsmocomBB developers intend to replace the proprietary baseband GSM stack with a free software implementation.

Issues with patents and open source Patents remain a problem for any open-source GSM implementation, because it is not possible for GNU or any other free software distributor to guarantee immunity from all lawsuits by the patent holders against the users. Furthermore new features are being added to the standard all the time which means they have patent protection for a number of years.[citation needed] The original GSM implementations from 1991 are now entirely free of patent encumbrances and it is expected that OpenBTS will be able to implement features of that initial specification without limit and that as patents subsequently expire, those features can be added into the open source version. As of 2011, there have been no law suits against users of OpenBTS over GSM use. See also

International Mobile Subscriber Identity (IMSI) MSISDN Mobile Subscriber ISDN Number Handoff Visitors Location Register (VLR) Um interface

IRRIGATION SYSTEM SOLAR USING ENERGY


GSM-R (GSM-Railway) GSM services Cell Broadcast GSM localization Multimedia Messaging Service (MMS) NITZ Network Identity and Time Zone Wireless Application Protocol (WAP) Network simulation Simulation of GSM networks Standards Comparison of mobile phone standards GEO-Mobile Radio Interface Intelligent Network Parlay X RRLP Radio Resource Location Protocol GSM 03.48 Security mechanisms for the SIM application toolkit
RTP audio video profile Enhanced Network Selection (ENS) Huawei SingleRAN: RAN technology that allows migration from GSM to UMTS or simultaneous use of both.

LCD (LIQUID CRYSTAL DISPLAY) Description:

IRRIGATION SYSTEM SOLAR USING ENERGY


LCDs can add a lot to your application in terms of providing an useful interface for the user, debugging an application or just giving it a "professional" look. The most common type of LCD controller is the Hitachi 44780, which provides a relatively simple interface between a processor and an LCD. Using this interface is often not attempted by inexperienced designers and programmers because it is difficult to find good documentation on the interface, initializing the interface can be a problem and the displays themselves are expensive.

PIN DIAGRAM:

IRRIGATION SYSTEM SOLAR USING ENERGY

Pins 1 2 3 4 5 6 7 - 14 Ground Vcc Contrast Voltage "R/S" _Instruction/Register Select

Description

"R/W" _Read/Write LCD Registers "E" Clock Data I/O Pins

IRRIGATION SYSTEM SOLAR USING ENERGY


PIN DESCRIPTION:

As you would probably guess from this description, the interface is a parallel bus, allowing simple and fast reading/writing of data to and from the LCD.

Above is the quite simple schematic pin diagram. The LCD panel's Enable and Register Select is connected to the Control Port. The Control Port is an open collector / open drain output. While Pins 1 2 3 4 5 6 Ground Vcc Contrast Voltage "R/S" _Instruction/Register Select "R/W" _Read/Write LCD Registers "E" Clock Description

7 - 14 Data I/O Pins most Parallel Ports have internal pull-up resistors, there are a few which don't. Therefore by incorporating the two 10K external pull up resistors, the circuit is more portable for a wider range of computers, some of which may have no internal pull up resistors. We make no effort to place the Data bus into reverse direction. Therefore we hard wire the R/W line of the LCD panel, into write mode. This will cause no bus conflicts on the data lines. As a result we cannot read back the LCD's internal Busy Flag, which tells us if the LCD has accepted and finished processing the last instruction. This problem is overcome by inserting known delays into our program. The 10k Potentiometer controls the contrast of the LCD panel. Nothing fancy here. You can use a bench power supply set to 5v or use a onboard +5 regulator.

The 2 line x 16 character LCD modules are available from a wide range of manufacturers and should all be compatible with the HD44780. The diagram to the right, shows the pin numbers for these devices. When viewed from the front, the left pin is pin 14 and the right pin is pin 1.

LCDs can be added quite easily to an application and use as few as three digital output pins for control. As for cost, LCDs can be often pulled out of old devices or found in surplus stores for

IRRIGATION SYSTEM SOLAR USING ENERGY


less than a dollar. The most common connector used for the 44780-based LCDs is 14 pins in a row, with pin centers 0.100" apart.

As you would probably guess from this description, the interface is a parallel bus, allowing simple and fast reading/writing of data to and from the LCD. This waveform will write an ASCII Byte out to the LCD's screen. The ASCII code to be displayed is eight bits long and is sent to the LCD either four or eight bits at a time. If four-bit mode is used, two "nibbles" of data (Sent high four bits and then low four bits with an "E" Clock pulse with each nibble) are sent to make up a full eight-bit transfer. The "E" Clock is used to initiate the data transfer within the LCD. Sending parallel data, as either four or eight bits are the two primary modes of operation. While there are secondary considerations and modes, deciding how to send the data to the LCD is most critical decision to be made for an LCD interface application. Eight-bit mode is best used when speed is required in an application and at least ten I/O pins are available. Four-bit mode requires a minimum of six bits. To wire a microcontroller to an LCD in four-bit mode, just the top four bits (DB4-7) are written to. The "R/S" bit is used to select whether data or an instruction is being transferred between the microcontroller and the LCD. If the Bit is set, then the byte at the current LCD "Cursor" Position can be read or written. When the Bit is reset, either an instruction is being sent to the LCD or the execution status of the last

IRRIGATION SYSTEM SOLAR USING ENERGY


instruction is read back (whether or not it has completed). The different instructions available for use with the 44780 are shown in the table below: R/S R/W D7 D6 D5 D4 D3 D2 D1 D0 Instruction/Description 4 0 0 0 0 0 0 0 0 0 1 1 5 0 0 0 0 0 0 0 0 1 0 1 14 13 12 11 10 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 8 0 1 7 Pins 1 Clear Display * Return Cursor and LCD to Home Position

1 ID S Set Cursor Move Direction D C B Enable Display/Cursor * Move Cursor/Shift Display * Set Interface Length *

1 SC RL *

1 DL N F

1 A A A A A A Move Cursor into CGRAM * * * * * * Poll the "Busy Flag" Write a Character to the Display at the Current Cursor Position Read the Character on the Display at the Current Cursor Position

1 A A A A A A A Move Cursor to Display BF *

D D D D D D D D D D D D D D D D

"*" - Not Used/Ignored. This bit can be either "1" or "0" Set Cursor Move Direction: ID - Increment the Cursor After Each Byte Written to Display if Set S - Shift Display when Byte Written to Display Enable Display/Cursor D - Turn Display On (1)/Off (0) C - Turn Cursor On (1)/Off (0) B - Cursor Blink On (1)/Off (0) Move Cursor/Shift Display SC - Display Shift On (1)/Off (0) RL - Direction of Shift Right (1)/Left (0) Set Interface Length DL - Set Data Interface Length 8(1)/4(0) N - Number of Display Lines 1(0)/2(1) F - Character Font 5x10(1)/5x7(0)

IRRIGATION SYSTEM SOLAR USING ENERGY


Poll the "Busy Flag" BF - This bit is set while the LCD is processing Move Cursor to CGRAM/Display A - Address Read/Write ASCII to the Display D - Data

Reading Data back is best used in applications, which required data to be moved back and forth on the LCD (such as in applications which scroll data between lines). The "Busy Flag" can be polled to determine when the last instruction that has been sent has completed processing. This simplifies the application because when data is read back, the microcontroller I/O pins have to be alternated between input and output modes. For most applications, there really is no reason to read from the LCD. As well as making my application software simpler, it also frees up a microcontroller pin for other uses. Different LCDs execute instructions at different rates. In terms of options, it is seen that a 5x10 LCD display. This means that the "F" bit in the "Set Interface Instruction" should always be reset (equal to "0"). Before you can send commands or data to the LCD module, the Module must be initialized. For eight-bit mode, this is done using the following series of operations: 1. 2. 3. 4. 5. Wait more than 15 msecs after power is applied. Write 0x030 to LCD and wait 5 msecs for the instruction to complete Write 0x030 to LCD and wait 160 usecs for instruction to complete Write 0x030 AGAIN to LCD and wait 160 usecs or Poll the Busy Flag Set the Operating Characteristics of the LCD o Write "Set Interface Length" o Write 0x010 to turn off the Display o Write 0x001 to Clear the Display o Write "Set Cursor Move Direction" Setting Cursor Behavior Bits o Write "Enable Display/Cursor" & enable Display and Optional Cursor

In describing how the LCD should be initialized in four bit mode, will specify writing to the LCD in terms of nibbles. This is because initially, just single nibbles are sent (and not two, which make up a byte and a full instruction). As mentioned above, when a byte is sent, the high nibble

IRRIGATION SYSTEM SOLAR USING ENERGY


is sent before the low nibble and the "E" pin is toggled each time four bits is sent to the LCD. To initialize in four bit mode: 1. Wait more than 15 msecs after power is applied. 2. Write 0x03 to LCD and wait 5 msecs for the instruction to complete 3. Write 0x03 to LCD and wait 160 usecs for instruction to complete 4. Write 0x03 AGAIN to LCD and wait 160 usecs (or poll the Busy Flag) 5. Set the Operating Characteristics of the LCD Write 0x02 to the LCD to Enable Four Bit Mode All following instruction/Data Writes require two nibble writes.
o o o o o

Write "Set Interface Length" Write 0x01/0x00 to turn off the Display Write 0x00/0x01 to Clear the Display Write "Set Cursor Move Direction" Setting Cursor Behavior Bits Write "Enable Display/Cursor" & enable Display and Optional Cursor

Once the initialization is complete, the LCD can be written to with data or instructions as required. Each character to display is written like the control bytes, except that the "R/S" line is set. During initialization, by setting the "S/C" bit during the "Move Cursor/Shift Display" command, after each character is sent to the LCD, the cursor built into the LCD will increment to the next position (either right or left). Normally, the "S/C" bit is set (equal to "1") along with the "R/L" bit in the "Move Cursor/Shift Display" command for characters to be written from left to right (as with a "Teletype" video display). The "Ninth Character" is the position of the Ninth character on the first line. Most LCD displays have a 44780 and support chip to control the operation of the LCD. The 44780 is responsible for the external interface and provides sufficient control lines for sixteen characters on the LCD. The support chip enhances the I/O of the 44780 to support up to 128 characters on an LCD. From the table above, it should be noted that the first two entries ("8x1", "16x1") only have the 44780 and not the support chip. This is why the ninth character in the 16x1 does

IRRIGATION SYSTEM SOLAR USING ENERGY


not "appear" at address 8 and shows up at the address that is common for a two line LCD. It includes the 40 characters by 4 line ("40x4") LCD because it is quite common. Normally, the LCD is wired as two 40x2 displays. The actual connector is normally sixteen bits wide with all the fourteen connections of the 44780 in common, except for the "E" (Strobe) pins. The "E" strobes are used to address between the areas of the display used by the two devices. The actual pin outs and character addresses for this type of display can vary between manufacturers and display part numbers. Note that when using any kind of multiple 44780 LCD display, you should probably only display one 44780's Cursor at a time. Cursors for the 44780 can be turned on as a simple underscore at any time using the "Enable Display/Cursor" LCD instruction and setting the "C" bit. don't recommend using the "B" ("Block Mode") bit as this causes a flashing full character square to be displayed and it really isn't that attractive. The LCD can be thought of as a "Teletype" display because in normal operation, after a character has been sent to the LCD, the internal "Cursor" is moved one character to the right. The "Clear Display" and "Return Cursor and LCD to Home Position" instructions are used to reset the Cursor's position to the top right character on the display. To move the Cursor, the "Move Cursor to Display" instruction is used. For this instruction, bit 7 of the instruction byte is set with the remaining seven bits used as the address of the character on the LCD the cursor is to move to. These seven bits provide 128 addresses, which matches the maximum number of LCD character addresses available. The table above should be used to determine the address of a character offset on a particular line of an LCD display. The Character Set available in the 44780 is basically ASCII. Basically because some characters do not follow the ASCII convention fully (probably the most significant difference is 0x05B or "\" is not available). The ASCII Control Characters (0x008 to 0x01F) do not respond as control characters and may display funny (Japanese) characters. The LCD Character Set shown below is courtesy of Peer One hand and his excellent.

IRRIGATION SYSTEM SOLAR USING ENERGY

Eight programmable characters are available and use codes 0x000 to 0x007. They are programmed by pointing the LCD's "Cursor" to the Character Generator RAM ("CGRAM") Area at eight times the character address. The next eight characters written to the RAM are each line of the programmable character, starting at the top. We like to represent this as eight squares by five as is shown in the diagram to the right. Above diagram, noted that most displays were 7 pixels by 5 for each character, so the extra row may be confusing. Each LCD character is actually eight pixels high, with the bottom row normally used for the underscore cursor. The bottom row can be used for graphic characters, although if you are going to use a visible underscore cursor and have it at the character (i.e., set the line to 0x000).

Using this box, we can draw in the pixels that define your special character and then use the bits to determine what the actual data codes are. .

IRRIGATION SYSTEM SOLAR USING ENERGY

The user defined character line information is saved in the LCD's "CGRAM" area. These sixtyfour bytes of memory is accessed using the "Move Cursor into CGRAM" instruction in a similar manner to that of moving the cursor to a specific address in the memory with one important difference. This difference is that each character starts at eight times it's character value. This means that user definable character 0 has it's data starting at address 0 of the CGRAM, character 1 starts at address 8, character 2 starts at address 0x010 (16) and so on. To get a specific line within the user definable character, its offset from the top (the top line has an offset of 0) is added to the starting address. In most applications, characters are written to all at one time with character 0 first. In this case, the instruction 0x040 is written to the LCD followed by all the user-defined characters. A special note for Wirz Electronics "SLI-OEM" users. When the new characters are defined, it is a good idea to make sure that the upper three bits are set in the user defined character byte. When the "Move Cursor into CGRAM" instruction is received, the SLI-OEM goes into a special mode where the character row counter is not updated when a new character is received. This mode is turned off when a new instruction is sent to the SLI-OEM or an ASCII "Backspace", "Carriage Return", "Line Feed" or "Form Feed" character is received. Since all these characters are valid LCD user defined character line definitions, you will find that the SLI-OEM is not interpreting

IRRIGATION SYSTEM SOLAR USING ENERGY


the data correctly. If I was making the "Man" symbol above for displaying on the SLI-OEM, I would use the byte 0x0EE for the first line instead of 0x00E. The last aspect of the LCD to discuss is how to specify a contrast voltage to the Display. I typically use a potentiometer wired as a voltage divider. This will provide an easily variable voltage between Ground and Vcc, which will be used to specify the contrast (or "darkness") of the characters on the LCD screen. You may find that different LCDs work differently with lower voltages providing darker characters in some and higher voltages do the same thing in others. There are a variety of different ways of wiring up an LCD. Above, I noted that the 44780 could interface with four or eight bits. To simplify the demands in microcontrollers, a shift register is often used (as is shown in the diagram below) to reduce the number of I/O pins to three.

This can be further reduced by using the circuit shown below in which the serial data is combined with the contents of the shift register to produce the "E" strobe at the appropriate interval. This circuit "ANDs" (using the 1K resistor and IN914 diode) the output of the sixth "D-Flip Flop" of the 74LS174 and the "Data" bit from the device writing to the

LCD to form the "E" Strobe. This method requires one less pin than the three wire interface and a few more instructions of code.

IRRIGATION SYSTEM SOLAR USING ENERGY

Figure 1. Initial design for the solar seeker. Our initial design was quite simple, we had 5V on one end of the photocell group and ground on the other end. If the same amount of light fell on both photocells the middle voltage would be 2.5V. In the second stage, we had a comparator that compared the photocell group middle voltage to 2.5V. If the photocell voltage was higher than 2.5V, meaning more light falls on the left photocell, the comparator would output 1 and then in the following step the H-bridge would force the servo to turn to the photocell group to the left, aiming to equalize the amount of incident light falling on both photocells. Essentially, we were on the right track but we had some technical problems in our design 1- As it is, the servo motors would always turn full force! this meant that even if the photocells received slightly different amounts of light, the comparator would output a 1 or 0 and turn the motor as fast as it can. The situation is analogous to a soccer player trying to dribble the ball in a straight line but who is only allowed to kick the ball with full force. 2- The comparator typically outputs about 3.5V, but we would like to be able to have higher voltages around 12. In order to solve problem 1, we used pulse width modulation, and for the second problem we used two buffers. PULSE WIDTH MODULATION So how does the pulse width modulator help us? In the previous setup, we used 2.5V only, now if we compare to a high frequency triangle wave, the output of the motor will be high for some fraction of

IRRIGATION SYSTEM SOLAR USING ENERGY


time and low rest of the time. Effectively, this allows us to drive the motor with low voltages as well as high voltages.

Figure 2. Pulse width modulation. As seen in Figure 2, the triangle wave results in the output voltage being high for some portion of the period and low for the rest. Analog input A causes the output to be low most of the time, this approximately corresponds to a voltage output of around 1V. Analog input B results in a 50% duty cycle that corresponds to a mean voltage output of 2.5V. Now our analogous soccer player is able to have little touches on the ball to keep it in line. BUFFERS We would ideally like to have a voltage output of 12 Volts for the H-bridge, however the TTL logic high output is about 3.5V. In order to achieve 12V we used buffers. Figure 3 shows our final design. the open-collector invertor is the 7406 and the buffer is the 7407.

A solar panel (also solar module, photovoltaic module or photovoltaic panel) is a packaged, connected assembly ofphotovoltaic cells. The solar panel can be used as a component of a larger photovoltaic system to generate and supply electricity in commercial and residential applications. Because a single solar panel can produce only a limited amount of power, many installations contain several panels. A photovoltaic system typically includes an array of solar panels, an inverter, and sometimes a battery and interconnection wiring.

IRRIGATION SYSTEM SOLAR USING ENERGY

[edit]Theory

and construction

See also: Solar cell

Polycrystalline PV cells connected in a solar panel.

IRRIGATION SYSTEM SOLAR USING ENERGY


Solar panels use light energy (photons) from the sun to generate electricity through the photovoltaic effect. The structural (load carrying) member of a module can either be the top layer or the back layer. The majority of modules use wafer-based crystalline silicon cells or thin-film cells based on cadmium telluride or silicon. The conducting wires that take the current off the panels may contain silver, copper or other non-magnetic conductive transition metals. The cells must be connected electrically to one another and to the rest of the system. Cells must also be protected from mechanical damage and moisture. Most solar panels are rigid, but semi-flexible ones are available, based on thin-film cells. Electrical connections are made in series to achieve a desired output voltage and/or in parallel to provide a desired current capability. Separate diodes may be needed to avoid reverse currents, in case of partial or total shading, and at night. The p-n junctions of mono-crystalline silicon cells may have adequate reverse current characteristics that these are not necessary. Reverse currents waste power and can also lead to overheating of shaded cells. Solar cells become less efficient at higher temperatures and installers try to provide good ventilation behind solar panels.[1] Some recent solar panel designs include concentrators in which light is focused by lenses or mirrors onto an array of smaller cells. This enables the use of cells with a high cost per unit area (such as gallium arsenide) in a cost-effective way.[citation needed] Depending on construction, photovoltaic panels can produce electricity from a range of frequencies of light, but usually cannot cover the entire solar range (specifically, ultraviolet, infrared and low or diffused light). Hence much of the incident sunlight energy is wasted by solar panels, and they can give far higher efficiencies if illuminated with monochromatic light. Therefore, another design concept is to split the light into different wavelength ranges and direct the beams onto different cells tuned to those ranges. [2] This has been projected to be capable of raising efficiency by 50%. Currently the best achieved sunlight conversion rate (solar panel efficiency) is around 21% in commercial products,[3] typically lower than the efficiencies of their cells in isolation. The energy density of a solar panel is the efficiency described in terms of peak power output per unit of surface area, commonly expressed in units of watts per square foot (W/ft2). The most efficient mass-produced solar panels have energy density values of greater than 13 W/ft2 (140 W/m2). [edit]Crystalline Main article: Solar cell Most solar modules are currently produced from silicon photovoltaic cells. These are typically categorized as monocrystalline or polycrystalline modules. [edit]Thin-film

silicon modules

modules

Main articles: Thin film solar cell, Third generation solar cell, and Low-cost photovoltaic cell Third generation solar cells are advanced thin-film cells. They produce high-efficiency conversion at low cost.

IRRIGATION SYSTEM SOLAR USING ENERGY


[edit]Rigid

thin-film modules

In rigid thin film modules, the cell and the module are manufactured in the same production line. The cell is created on a glass substrate or superstrate, and the electrical connections are created in situ, a so called "monolithic integration". The substrate or superstrate is laminated with an encapsulant to a front or back sheet, usually another sheet of glass. The main cell technologies in this category are CdTe, or a-Si, or a-Si+uc-Si tandem, or CIGS (or variant). Amorphous silicon has a sunlight conversion rate of 6-12%. [edit]Flexible

thin-film modules

Flexible thin film cells and modules are created on the same production line by depositing the photoactive layer and other necessary layers on a flexible substrate. If the substrate is an insulator (e.g. polyester or polyimide film) then monolithic integration can be used. If it is a conductor then another technique for electrical connection must be used. The cells are assembled into modules by laminating them to a transparent colourless fluoropolymer on the front side (typically ETFE or FEP) and a polymer suitable for bonding to the final substrate on the other side. The only commercially available (in MW quantities) flexible module uses amorphous silicon triple junction (from Unisolar). So-called inverted metamorphic (IMM) multijunction solar cells made on compound-semiconductor technology are just becoming commercialized in July 2008. The University of Michigan'ssolar car that won the North American Solar Challenge in July 2008 used IMM thin-film flexible solar cells. The requirements for residential and commercial are different in that the residential needs are simple and can be packaged so that as solar cell technology progresses, the other base line equipment such as the battery, inverter and voltage sensing transfer switch still need to be compacted and unitized for residential use. Commercial use, depending on the size of the service will be limited in the photovoltaic cell arena, and more complex parabolic reflectors and solar concentrators are becoming the dominant technology. The global flexible and thin-film photovoltaic (PV) market, despite caution in the overall PV industry, is expected to experience a CAGR of over 35% to 2019, surpassing 32 GW according to a major new study by IntertechPira.[4] [edit]Module

embedded electronics

See also: Solar micro-inverter Several companies have begun embedding electronics into PV modules. This enables performing maximum power point tracking (MPPT) for each module individually, and the measurement of performance data for monitoring and fault detection at module level. Some of these solutions make use of power optimizers, a DC-to-DC converter technology developed to maximize the power harvest from solar photovoltaic systems. As of about 2010, such electronics can also compensate for shading effects, wherein a shadow falling across a section of a panel causes the electrical output of one or more strings of cells in the panel to fall to zero, but not having the output of the entire panel fall to zero.

IRRIGATION SYSTEM SOLAR USING ENERGY


[edit]Module

performance and lifetime

Module performance is generally rated under standard test conditions (STC): irradiance of 1,000 W/m, solar spectrum of AM 1.5 and module temperature at 25C. Electrical characteristics include nominal power (PMAX, measured in W), open circuit voltage (VOC), short circuit current (ISC, measured in amperes), maximum power voltage (VMPP),maximum power current (IMPP), peak power, kWp, and module efficiency (%). Nominal voltage refers to the voltage of the battery that the module is best suited to charge; this is a leftover term from the days when solar panels were used only to charge batteries. The actual voltage output of the panel changes as lighting, temperature and load conditions change, so there is never one specific voltage at which the panel operates. Nominal voltage allows users, at a glance, to make sure the panel is compatible with a given system. Open circuit voltage or VOC is the maximum voltage that the panel can produce when not connected to an electrical circuit or system. VOC can be measured with a meter directly on an illuminated panel's terminals or on its disconnected cable.[5] The peak power rating, kWp, is the maximum output according under standard test conditions (not the maximum possible output). Solar panels must withstand heat, cold, rain and hail for many years. Many crystalline silicon module manufacturers offer a warranty that guarantees electrical production for 10 years at 90% of rated power output and 25 years at 80%.[6] [edit]Production

The "solar tree", a symbol of Gleisdorf,Austria

In 2010, 15.9 GW of solar PV system installations were completed, with solar PV pricing survey and market research company PVinsights reporting growth of 117.8% in solar PV installation on a year-on-

IRRIGATION SYSTEM SOLAR USING ENERGY


year basis. With over 100% year-on-year growth in PV system installation, PV module makers dramatically increased their shipments of solar panels in 2010. They actively expanded their capacity and turned themselves into gigawatt GW players. According to PVinsights, five of the top ten PV module companies in 2010 are GW players. Suntech, First Solar, Sharp, Yingli and Trina Solar are GW producers now, and most of them doubled their shipments in 2010. [7] [edit]Top

ten producers

The top ten solar panel producers (by MW shipments) in 2010 were: [7] 1. Suntech 2. First Solar 3. Sharp Solar 4. Yingli 5. Trina Solar 6. Canadian Solar 7. Hanwha Solarone 8. Sunpower 9. Renewable Energy Corporation 10. Solarworld

Price
See also: Grid parity Average pricing information divides in three pricing categories: those buying small quantities (modules of all sizes in the kilowatt range annually), mid-range buyers (typically up to 10 MWpannually), and large quantity buyers (self explanatoryand with access to the lowest prices). Over the long termand only in the long-termthere is clearly a systematic reduction in the price of cells and modules. For example in 1998 it was estimated that the quantity cost per watt was about $4.50, which was 33 times lower than the cost in 1970 of $150.[8][9] Following to RMI, Balance-of-System (BoS) elements, this is, non-module cost of non-microinverter solar panels (as wiring, converters, racking systems and various components) make up about half of the total costs of installations. Also, standardizing technologies could encourage greater adoption of solar panels and, in turn, economies of scale.[citation needed] [edit]Mounting [edit]Trackers Solar trackers increase the amount of energy produced per panel at a cost of mechanical complexity and need for maintenance. They sense the direction of the Sun and tilt the panels as needed for maximum exposure to the light. [edit]Fixed

systems

racks

Fixed racks hold panels stationary as the sun moves across the sky. The fixed rack sets the angle at which the panel is held. Tilt angles equivalent to an installation's latitude are common.

IRRIGATION SYSTEM SOLAR USING ENERGY


[edit]Ground

mounted

Ground mounted solar power systems consist of solar panels held in place by racks or frames that are attached to ground based mounting supports. Ground based mounting supports include: Pole mounts, which are driven directly into the ground or embedded in concrete. Foundation mounts, such as concrete slabs or poured footings Ballasted footing mounts, such as concrete or steel bases that use weight to secure the solar panel system in position and do not require ground penetration. This type of mounting system allows for decommissioning or relocation of solar panel systems with no ground excavation.

[edit]Roof

mounted

Roof mounted solar power systems consist of solar panels held in place by racks or frames attached to roof based mounting supports. Roof based mounting supports include: Pole mounts, which are attached directly to the roof structure and may use additional rails for attaching the panel racking or frames. Ballasted footing mounts, such as concrete or steel bases that use weight to secure the panel system in position and do not require through penetration. This mounting method allows for decommissioning or relocation of solar panel systems with no adverse effect on the roof structure.

A ground mounted solar panel A roof mounted solar panel system installation using precast concrete ballasted footings. system installed using flat roof precast concrete ballasted footings.

Technicians installing photovoltaic panels on a roof mounted rack.

A roof mounted solar panel system installed on a sloped roof using pole mounts and rails.

Figure 3. Modified design for the solar seeker.

IRRIGATION SYSTEM SOLAR USING ENERGY

ABOUT SOFTWARE Our projects completed on schedule. Keil development tools for the 8051 Microcontroller Architecture support every level of software developer from the professional applications engineer to the student just learning about embedded software development. The industry-standard Keil C Compilers, Macro Assemblers, Debuggers, Real-time Kernels, Singleboard Computers, and Emulators support all 8051 derivatives and help you get. SIMULATION The Vision Simulator allows you to debug programs using only your PC using simulation drivers provided by Keil and various third-party developers. A good simulation environment, like Vision, does much more than simply simulate the instruction set of a microcontroller it simulates your entire target system including interrupts, start up code, onchip peripherals, external signals, and I/O. This software is used for execution of microcontroller programs. Keil development tools for the MC architecture support every level of software developer from the professional applications engineer to the student just learning about embedded software development. The industry-standard keil C compilers, macro assemblers, debuggers, real, time Kernels, Single-board computers and emulators support all microcontroller derivatives and help you to get more projects completed on schedule. The keil software development tools are designed to solve the complex Problems facing embedded software developers. When starting a new project, simply select the microcontroller you the device database and the vision IDE sets all compiler, assembler, linker, and memory options for you. Numerous example programs are included to help you get started with the most popular embedded avr devices. The keil Vision debugger accurately simulates on-chip peripherals (PC,CAN,UART,SPI,Interrupts,I/Oports,A/D converter, D/A converter and PWM modules)of your avr device. Simulation helps you understand h/w configurations and avoids time wasted on setup problems. Additionally, with simulation, you can write and test applications before target h/w is available. When you are ready to begin testing your s/w application with target h/w,use the MON51, MON390, MONADI, or flash MON51 target monitors, the ISD51 In-System Debugger, or the ULINK USB-JTAG adapter to download and test program code on your target system Click on the Keil uVision Icon on DeskTop The following fig will appear

IRRIGATION SYSTEM SOLAR USING ENERGY

1.

Click on the Project menu from the title bar Then Click on New Project

2.

Save the Project by typing suitable project name with no extension in u r own folder sited in either C:\ or D:\

IRRIGATION SYSTEM SOLAR USING ENERGY

Then Click on Save button above.

3. 4.

Select the component for u r project. i.e. Atmel Click on the + Symbol beside of Atmel

5.

Select AT89C52 as shown below

IRRIGATION SYSTEM SOLAR USING ENERGY

6. 7.

Then Click on OK The Following fig will appear

8. 9. 10.

Then Click either YES or NOmostly NO Now your project is ready to USE Now double click on the Target1, you would get another option Source group 1 as shown in next page.

IRRIGATION SYSTEM SOLAR USING ENERGY

11.

Click on the file option from menu bar and select new

12.

The next screen will be as shown in next page, and just maximize it by double clicking on its blue boarder.

IRRIGATION SYSTEM SOLAR USING ENERGY

13. 14.

Now start writing program in either in C or ASM For a program written in Assembly, then save it with extension . asm and for C based program save it with extension .C

15.

Now right click on Source group 1 and click on Add files to Group Source

IRRIGATION SYSTEM SOLAR USING ENERGY

16.

Now you will get another window, on which by default C files will appear.

17. 18. 19.

Now select as per your file extension given while saving the file Click only one time on option ADD Now Press function key F7 to compile. Any error will appear if so happen.

IRRIGATION SYSTEM SOLAR USING ENERGY

20. 21.

If the file contains no error, then press Control+F5 simultaneously. The new window is as follows

22. 23.

Then Click OK Now Click on the Peripherals from menu bar, and check your required port as shown in fig below

IRRIGATION SYSTEM SOLAR USING ENERGY

24.

Drag the port a side and click in the program file.

25.

Now keep Pressing function key F11 slowly and observe. You are running your program successfully

Vous aimerez peut-être aussi