irrigation system doc

Upload: madhu-sudhan

Post on 14-Apr-2018

217 views

Category:

Documents


2 download

TRANSCRIPT

  • 7/27/2019 Irrigation System Doc

    1/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    ABSTRACT

    Embedded systems are designed to do some specific task, rather than be a general-

    purpose 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.

  • 7/27/2019 Irrigation System Doc

    2/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    BLOCK DIAGRAM:

    Technical Specifications:

    1. MICRO CONTROLLER AT89S51

    2. MAX 232

    3. GSM MODEM

    4. DC MOTER

  • 7/27/2019 Irrigation System Doc

    3/100

    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 systems typically

    comprises the hardware, embedded RTOS, device drivers, communication stacks and embedded

    application software.

  • 7/27/2019 Irrigation System Doc

    4/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    Fig:1.1 parts of an embedded system

    Apart from the common computer applications there are many applications, whichdo not need high performances.

    Embedded Product development Life Cycle:-

    Understand userrequirements

    Choose optimumelectronic chip

    HLL/ALL

    Algorithm

    Coding/EditingCompiling/Assembling

    Debugging

    Testing

    Simulator

    S/W

    PCB Layout design

    Assemblingcomponents

    Testing

    H/W

    ICE (In CircuitEmulator)

    Embedded Product

    S/W Side H/W Side

    Download

  • 7/27/2019 Irrigation System Doc

    5/100

    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 cannotusually 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 almostalways 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.

  • 7/27/2019 Irrigation System Doc

    6/100

    Processor

    Memory

    Inputs Outputs

    IRRIGATION SYSTEM SOLAR USING ENERGY

    Fig:1.3 design considerations of embedded systems

    Other common design requirement includes

    Processing power

    MemoryDevelopment 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. Otherimportant 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 amountof 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.

  • 7/27/2019 Irrigation System Doc

    7/100

    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 - Automobile brakes

    Washing Machines - Digital Camera

    Toys - Home telemetry

    Air Conditioners - Fax Machines

    Automobiles - MPEG Decodes

    Pagers - Modems

    MP3 Players - 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.

  • 7/27/2019 Irrigation System Doc

    8/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    Reactive and real-time

    Continually reacts to changes in the systems environment

    EMBEDDED SYSTEM CLASSIFICATION

    Autonomous Embedded Systems: These systems function in standalone mode Where the

    response times are not critical. The input signals originating from transducers Convert a

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

    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

  • 7/27/2019 Irrigation System Doc

    9/100

    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 takesinput 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 generatedby 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

  • 7/27/2019 Irrigation System Doc

    10/100

    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 8051-

    compatible devices manufactured by more than 20 independent manufacturers

    including Atmel, Infineon Technologies (formerly Siemens AG), Maxim IntegratedProducts (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 power-

    hungry than their NMOS predecessors. This made them more suitable for battery-powered devic

    Important features and applications

    It provides many functions (CPU,RAM, ROM, I/O, interrupt logic,timer, etc.) in a

    singlepackage

    8-bit ALU, Accumulator and 8-bit Registers; hence it is an 8-bitmicrocontroller

    8-bit data bus- It can access 8 bits of data in one operation

    16-bit address bus - It can access 216 memory locations - 64KB (65536 locations) each of

    RAM and ROM

    On-chip RAM - 128bytes (data memory) On-chip ROM - 4 kByte (program memory)

    Fourbyte 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 aboolean processing engine

    which allowsbit-levelboolean logic operations to be carried out directly and efficiently oninternal registersand 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

    interruptcontext on a stack.

    http://en.wikipedia.org/wiki/Central_processing_unithttp://en.wikipedia.org/wiki/Random_access_memoryhttp://en.wikipedia.org/wiki/Random_access_memoryhttp://en.wikipedia.org/wiki/Read-only_memoryhttp://en.wikipedia.org/wiki/Input/outputhttp://en.wikipedia.org/wiki/Interrupthttp://en.wikipedia.org/wiki/Timerhttp://en.wikipedia.org/wiki/Timerhttp://en.wikipedia.org/wiki/Integrated_circuit_packaginghttp://en.wikipedia.org/wiki/8-bithttp://en.wikipedia.org/wiki/Microcontrollerhttp://en.wikipedia.org/wiki/Microcontrollerhttp://en.wikipedia.org/wiki/Data_bushttp://en.wikipedia.org/wiki/Data_bushttp://en.wikipedia.org/wiki/Address_bushttp://en.wikipedia.org/wiki/Kilobytehttp://en.wikipedia.org/wiki/Kilobytehttp://en.wikipedia.org/wiki/Byteshttp://en.wikipedia.org/wiki/Bytehttp://en.wikipedia.org/wiki/Input/outputhttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Timerhttp://en.wikipedia.org/wiki/Interrupthttp://en.wikipedia.org/wiki/Power_managementhttp://en.wikipedia.org/wiki/Boolean_datatypehttp://en.wikipedia.org/wiki/Bithttp://en.wikipedia.org/wiki/Boolean_logichttp://en.wikipedia.org/wiki/Processor_registershttp://en.wikipedia.org/wiki/Processor_registershttp://en.wikipedia.org/wiki/Interrupt_latencyhttp://en.wikipedia.org/wiki/Context_switchhttp://en.wikipedia.org/wiki/Context_switchhttp://en.wikipedia.org/wiki/Central_processing_unithttp://en.wikipedia.org/wiki/Random_access_memoryhttp://en.wikipedia.org/wiki/Read-only_memoryhttp://en.wikipedia.org/wiki/Input/outputhttp://en.wikipedia.org/wiki/Interrupthttp://en.wikipedia.org/wiki/Timerhttp://en.wikipedia.org/wiki/Integrated_circuit_packaginghttp://en.wikipedia.org/wiki/8-bithttp://en.wikipedia.org/wiki/Microcontrollerhttp://en.wikipedia.org/wiki/Data_bushttp://en.wikipedia.org/wiki/Address_bushttp://en.wikipedia.org/wiki/Kilobytehttp://en.wikipedia.org/wiki/Byteshttp://en.wikipedia.org/wiki/Bytehttp://en.wikipedia.org/wiki/Input/outputhttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Timerhttp://en.wikipedia.org/wiki/Interrupthttp://en.wikipedia.org/wiki/Power_managementhttp://en.wikipedia.org/wiki/Boolean_datatypehttp://en.wikipedia.org/wiki/Bithttp://en.wikipedia.org/wiki/Boolean_logichttp://en.wikipedia.org/wiki/Processor_registershttp://en.wikipedia.org/wiki/Interrupt_latencyhttp://en.wikipedia.org/wiki/Context_switch
  • 7/27/2019 Irrigation System Doc

    11/100

  • 7/27/2019 Irrigation System Doc

    12/100

    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 accessedby 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 varioushigh-level programming languagecompilers 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/ObjectPascal, PL/M and Modula-2 are available for the 8051, but they are less widely used than C

    andassembly.

    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

    http://en.wikipedia.org/wiki/High-level_programming_languagehttp://en.wikipedia.org/wiki/High-level_programming_languagehttp://en.wikipedia.org/wiki/High-level_programming_languagehttp://en.wikipedia.org/wiki/8051_compilerhttp://en.wikipedia.org/wiki/C_(programming_language)http://en.wikipedia.org/wiki/Small_Device_C_Compilerhttp://en.wikipedia.org/wiki/Forth_(programming_language)http://en.wikipedia.org/wiki/BASIC_programming_languagehttp://en.wikipedia.org/wiki/Pascal_programming_languagehttp://en.wikipedia.org/wiki/Object_Pascalhttp://en.wikipedia.org/wiki/Object_Pascalhttp://en.wikipedia.org/wiki/PL/Mhttp://en.wikipedia.org/wiki/Modula-2http://en.wikipedia.org/wiki/Assembly_languagehttp://en.wikipedia.org/wiki/Assembly_languagehttp://en.wikipedia.org/wiki/High-level_programming_languagehttp://en.wikipedia.org/wiki/8051_compilerhttp://en.wikipedia.org/wiki/C_(programming_language)http://en.wikipedia.org/wiki/Small_Device_C_Compilerhttp://en.wikipedia.org/wiki/Forth_(programming_language)http://en.wikipedia.org/wiki/BASIC_programming_languagehttp://en.wikipedia.org/wiki/Pascal_programming_languagehttp://en.wikipedia.org/wiki/Object_Pascalhttp://en.wikipedia.org/wiki/Object_Pascalhttp://en.wikipedia.org/wiki/PL/Mhttp://en.wikipedia.org/wiki/Modula-2http://en.wikipedia.org/wiki/Assembly_language
  • 7/27/2019 Irrigation System Doc

    13/100

    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 canbe written with high-level language.

    Related processors

    Fig:1.4 processor

    Intel 8031 processors

    http://en.wikipedia.org/wiki/Small_Device_C_Compilerhttp://en.wikipedia.org/wiki/Small_Device_C_Compilerhttp://en.wikipedia.org/wiki/High-level_languagehttp://en.wikipedia.org/wiki/File:INTEL8031AH.pnghttp://en.wikipedia.org/wiki/File:INTEL8031AH.pnghttp://en.wikipedia.org/wiki/Small_Device_C_Compilerhttp://en.wikipedia.org/wiki/High-level_language
  • 7/27/2019 Irrigation System Doc

    14/100

    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 internalprogram memory (ROM). To use this chip, externalROM 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 discontinuedits 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 bymanipulating the values of the 8051's Special Function Registers (SFRs).

    SFRs are accessed as if they were normal Internal RAM. The only difference is thatInternal RAM is from address 00h through 7Fh whereas SFR registers exist in the addressrange of 80h through FFh.

    Each SFR has an address (80h through FFh) and a name. The following chart provides agraphical presentation of the 8051's SFRs, their names, and their address.

    http://en.wikipedia.org/wiki/Intel_8048http://en.wikipedia.org/wiki/Intel_8048http://en.wikipedia.org/wiki/IBM_PChttp://en.wikipedia.org/wiki/IBM_PChttp://en.wikipedia.org/wiki/Read-only_memoryhttp://en.wikipedia.org/wiki/Read-only_memoryhttp://en.wikipedia.org/wiki/Read-only_memoryhttp://www.embedded.com/shared/printableArticle.jhtml?articleID=188500905http://www.embedded.com/shared/printableArticle.jhtml?articleID=188500905http://www.embedded.com/shared/printableArticle.jhtml?articleID=188500905http://en.wikipedia.org/wiki/Intel_8048http://en.wikipedia.org/wiki/IBM_PChttp://en.wikipedia.org/wiki/Read-only_memoryhttp://en.wikipedia.org/wiki/Read-only_memoryhttp://www.embedded.com/shared/printableArticle.jhtml?articleID=188500905http://www.embedded.com/shared/printableArticle.jhtml?articleID=188500905
  • 7/27/2019 Irrigation System Doc

    15/100

    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 possibleaddresses, there are only 21 SFRs in a standard 8051. All other addresses in the SFRrange (80h through FFh) are considered invalid. Writing to or reading from theseregisters may produce undefined values or behavior.

    Programming Tip: It is recommended that you not read or write to SFR addressesthat have not been assigned to an SFR. Doing so may provoke undefined behaviorand may cause your program to be incompatible with other 8051-derivatives thatuse the given SFR for some other purpose.

    SFR Types

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

  • 7/27/2019 Irrigation System Doc

    16/100

    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 SFRsin green.

    The SFRs with yellow backgrouns are SFRs which in some way control the operation orthe 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 butobviously the 8051 cannot operate without them. For example, once the serial port hasbeen configured using SCON, the program may read or write to the serial port usingthe SBUF register.

    Programming Tip: The SFRs whose names appear in red in the chart above areSFRs that may be accessed via bit operations (i.e., usingthe SETB and CLR instructions). The other SFRs cannot be accessed using bitoperations. As you can see, all SFRs that whose addresses are divisible by 8 can beaccessed with bit operations.

    SFR Descriptions

    This section will endeavor to quickly overview each of the standard SFRs found in theabove SFR chart map. It is not the intention of this section to fully explain thefunctionality of each SFR--this information will be covered in separate chapters of thetutorial. 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 thisSFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 0 ispin P0.0, bit 7 is pin P0.7. Writing a value of 1 to a bit of this SFR will send a high levelon 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 storedin an external ROM or EPROM chip or if you are using external RAM chips) youmay not use P0 or P2. This is because the 8051 uses ports P0 and P2 to address theexternal memory. Thus if you are using external RAM or code memory you mayonly use ports P1 and P3 for your own use.

    SP (Stack Pointer, Address 81h): This is the stack pointer of the microcontroller. ThisSFR indicates where the next value to be taken from the stack will be read from inInternal RAM. If you push a value onto the stack, the value will be written to the addressof SP + 1. That is to say, if SP holds the value 07h, a PUSH instruction will push thevalue onto the stack at address 08h. This SFR is modified by all instructions whichmodify 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 thestack will start at 08h and start expanding upward in internal RAM. Since alternateregister banks 1, 2, and 3 as well as the user bit variables occupy internal RAMfrom addresses 08h through 2Fh, it is necessary to initialize SP in your program tosome other value if you will be using the alternate register banks and/or bitmemory. It's not a bad idea to initialize SP to 2Fh as the first instruction of every

  • 7/27/2019 Irrigation System Doc

    17/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    one of your programs unless you are 100% sure you will not be using the registerbanks and bit variables.

    DPL/DPH (Data Pointer Low/High, Addresses 82h/83h): The SFRs DPL and DPHwork together to represent a 16-bit value called theData 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 toFFFFh (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. Forexample, 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 instructionto "increment DPTR." When you execute this instruction, the two bytes areoperated upon as a 16-bit value. However, there is no instruction that decrementsDPTR. If you wish to decrement the value of DPTR, you must write your owncode to do so.

    PCON (Power Control, Addresses 87h): The Power Control SFR is used to control the8051's power control modes. Certain operation modes of the 8051 allow the 8051 to gointo a type of "sleep" mode which requires much less power. These modes of operationare controlled through PCON. Additionally, one of the bits in PCON is used to double theeffective baud rate of the 8051's serial port.

    TCON (Timer Control, Addresses 88h, Bit-Addressable): The Timer Control SFR isused to configure and modify the way in which the 8051's two timers operate. This SFRcontrols whether each of the two timers is running or stopped and contains a flag toindicate that each timer has overflowed. Additionally, some non-timer related bits arelocated in the TCON SFR. These bits are used to configure the way in which the externalinterrupts 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 themode of operation of each of the two timers. Using this SFR your program may configureeach timer to be a 16-bit timer, an 8-bit autoreload timer, a 13-bit timer, or two separatetimers. Additionally, you may configure the timers to only count when an external pin isactivated 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 theTMOD SFR; however, these timers always count up. What is configurable is how andwhen 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 theTMOD SFR; however, these timers always count up. What is configurable is how andwhen they increment in value.

    P1 (Port 1, Address 90h, Bit-Addressable): This is input/output port 1. Each bit of thisSFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 1 ispin P1.0, bit 7 is pin P1.7. Writing a value of 1 to a bit of this SFR will send a high levelon the corresponding I/O pin whereas a value of 0 will bring it to a low level.

  • 7/27/2019 Irrigation System Doc

    18/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    SCON (Serial Control, Addresses 98h, Bit-Addressable): The Serial Control SFR isused to configure the behavior of the 8051's on-board serial port. This SFR controls thebaud rate of the serial port, whether the serial port is activated to receive data, and alsocontains 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 generallynecessary to initialize the following SFRs: SCON, TCON, and TMOD. This isbecause SCON controls the serial port. However, in most cases the program willwish to use one of the timers to establish the serial port's baud rate. In this case, itis necessary to configure timer 1 by initializing TCON and TMOD.

    SBUF (Serial Control, Addresses 99h): The Serial Buffer SFR is used to send andreceive data via the on-board serial port. Any value written to SBUF will be sent out theserial port's TXD pin. Likewise, any value which the 8051 receives via the serial port'sRXD pin will be delivered to the user program via SBUF. In other words, SBUF servesas 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 ispin P2.0, bit 7 is pin P2.7. Writing a value of 1 to a bit of this SFR will send a high levelon 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 yourhardware uses external RAM or external code memory (i.e., your program is storedin an external ROM or EPROM chip or if you are using external RAM chips) youmay not use P0 or P2. This is because the 8051 uses ports P0 and P2 to address theexternal memory. Thus if you are using external RAM or code memory you mayonly use ports P1 and P3 for your own use.

    IE (Interrupt Enable, Addresses A8h): The Interrupt Enable SFR is used to enable anddisable 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 anindividual interrupt is enabled by setting a lower bit.

    P3 (Port 3, Address B0h, Bit-Addressable): This is input/output port 3. Each bit of thisSFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 3 ispin P3.0, bit 7 is pin P3.7. Writing a value of 1 to a bit of this SFR will send a high levelon 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 isused to specify the relative priority of each interrupt. On the 8051, an interrupt may eitherbe of low (0) priority or high (1) priority. An interrupt may only interrupt interrupts oflower 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 thesystem, even if another interrupt is currently executing. However, if a serial interrupt isexecuting no other interrupt will be able to interrupt the serial interrupt routine since theserial interrupt routine has the highest priority.

    PSW (Program Status Word, Addresses D0h, Bit-Addressable): The Program StatusWord is used to store a number of important bits that are set and cleared by 8051instructions. The PSW SFR contains the carry flag, the auxiliary carry flag, the overflow

  • 7/27/2019 Irrigation System Doc

    19/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    flag, and the parity flag. Additionally, the PSW register contains the register bank selectflags 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 ideato 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 routinedoes not guarantee that PSW is the same upon exit as it was upon entry, yourprogram is bound to behave rather erradically and unpredictably--and it will betricky to debug since the behavior will tend not to make any sense.

    ACC (Accumulator, Addresses E0h, Bit-Addressable): The Accumulator is one of themost-used SFRs on the 8051 since it is involved in so many instructions. TheAccumulator resides as an SFR at E0h, which means the instruction MOV A,#20h isreally the same as MOV E0h,#20h. However, it is a good idea to use the first methodsince 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 twoinstructions: the multiply and divide operations.

    Other SFRs

    The chart above is a summary of all the SFRs that exist in a standard 8051. All derivativemicrocontrollers of the 8051 must support these basic SFRs in order to maintaincompatability with the underlying MSCS51 standard.

    A common practice when semiconductor firms wish to develop a new 8051 derivative isto 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 meansthat any program that runs on a standard 8051 should run without modification on theDS80C320. 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 doesnot, there must be some way to control and configure these new features. This isaccomplished by adding additional SFRs to those listed here. For example, since theDS80C320 supports two serial ports (as opposed to just one on the 8051), the SFRsSBUF2 and SCON2 have been added. In addition to all the SFRs listed above, theDS80C320 also recognizes these two new SFRs as valid and uses their values todetermine the mode of operation of the secondary serial port. Obviously, these new SFRshave been assigned to SFR addresses that were unused in the original 8051. In thismanner, new 8051 derivative chips may be developed which will run existing 8051programs.

    COMPONENT DESCRIPTION

    MICROCONTROLLER

  • 7/27/2019 Irrigation System Doc

    20/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    Microcontrollers are "embedded" inside some other device (often a consumerproduct) so that they can control the features or actions of the product.Another name for amicrocontroller, therefore, is "embedded controller."Microcontrollers are dedicated to one taskand 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 dedicatedinput device and often (but not always) has a small LED or LCD display for output. Amicrocontroller also takes input from the device it is controlling and controls the device bysending signals to different components in the device. For example, the microcontroller inside aTV takes input from the rem ote co nt rol and displays output on the TV screen. The controllercontrols the channel selector, the speaker system and certain adjustments on the picture tubeelectronics such as tint and brightness. The engi ne co ntr oll er in a car takes input from sensorssuch 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 with8Kbytes of in-system programmable flash on a monolithic chip, the Atmel AT89S52 is apowerful microcontroller which provides a highly-flexible and cost-effective solution to manyembedded control applications flash memory. The device is manufactured using Atmels high-density non volatile memory technology and is compatible with the industry standard 80C51instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammedin-system or by a conventional non volatile memory programmer. By combining a versatile 8-bitCPU 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, andclock 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 theCPU while allowing the RAM, timer/counters, serial port, and interrupt system to continuefunctioning. The Power-down mode saves the RAM contents but freezes the oscillator, disablingall 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

  • 7/27/2019 Irrigation System Doc

    21/100

    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

  • 7/27/2019 Irrigation System Doc

    22/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    pin diagram of micro controller

    BLOCKDIAGRAM

  • 7/27/2019 Irrigation System Doc

    23/100

    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 eigh

    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

  • 7/27/2019 Irrigation System Doc

    24/100

    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 pull

    ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source

    current (IIL) because of the internal pull-ups. Port 1 also receives the low-order address bytes during

    Flash programming and verification.

    Port 2

    Port 2 is a 8-bit bi-directional I/O port with internal pull-ups. The Port 2 outputbuffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled highby the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externallybeing 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 fromexternal program memory and during accesses to external data16-bit addresses(MOVX@DPTR).In this application, it uses strong memory that uses internal pull-ups whenemitting 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

    verificationPort 3

    Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 outputbuffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled highby the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally beingpulled low will source current (IIL) because of the pull-ups. Port 3 also serves the functions ofvarious special features of the AT89C51 as listed below:

    Port Pin Alternate Functions

    P3.0 RXD (serial input port)P3.1 TXD (serial output port)P3.2 INT0 (external interrupt 0)P3.3 INT1 (external interrupt 1)P3.4 T0 (timer 0 external input)P3.5 T1 (timer 1 external input)P3.6 WR (external data memory Write strobe)

    P3.7 RD (external data memory read strobe)

  • 7/27/2019 Irrigation System Doc

    25/100

    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 thedevice.

    ALE/PROG

    Address Latch Enable output pulse for latching the low byte of the address duringaccesses to external memory. This pin is also the program pulse input (PROG) during Flashprogramming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillatorfrequency, and may be used for external timing or clocking purposes. Note, however, that oneALE pulse is skipped during each access to external Data Memory. If desired, ALE operationcan be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only duringa MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. Program StoreEnable is the read strobe to external program memory. When the AT89S51 is executing codefrom external program memory, PSEN is activated twice each machine cycle, except that twoPSEN 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 fetchcode 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 strappedto VCC for internal program executions.

    XTAL1

    Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2

  • 7/27/2019 Irrigation System Doc

    26/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    Output from the inverting oscillator amplifierOSCILLATOR CHARACTERISTICS

    XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifierwhich 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 unconnectedwhile XTAL1 is driven as shown in Figure 2. There are no requirements on the duty cycle of theexternal clock signal, since the input to the internal clocking circuitry is through a divide-by-twoflip-flop, but minimum and maximum voltage high and low time specifications must beobserved.

    Connections of oscillator

    AT89S52: TYPES OF MEMORY

  • 7/27/2019 Irrigation System Doc

    27/100

    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 externalEPROM.EXTERNAL RAM

    Is RAM memory that resides off-chip. This is often in the form of standard static RAM or flashRAM.

    CODE MEMORYCode 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 befound on-chip, either burned into the microcontroller as ROM or EPROM. Code may also bestored completely off-chip in an external ROM or, more commonly, an external EPROM. FlashRAM is also another popular method of storing a program. Various combinations of thesememory types may also be used that is to say, it is possible to have 4K of code memory on-chipand 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, or16k. 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 muchROM/EPROM space the chip has.

  • 7/27/2019 Irrigation System Doc

    28/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    External RAM

    As an obvious opposite of Internal RAM, the 89S52 also supports what is calledExternal 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 alsoslower. For example, to increment an Internal RAM location by 1 requires only 1 instruction and1 instruction cycle. To increment a 1-byte value stored in External RAM requires 4 instructionsand 7 instruction cycles. In this case, external memory is 7 times slower! What External RAMloses 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.

  • 7/27/2019 Irrigation System Doc

    29/100

    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 bybroken down into a series of blocks, each of which performs a particular function. A d.c powersupply which maintains the output voltage constant irrespective of a.c mains fluctuations or loadvariations is known as Regulated D.C Power Supply

    For example a 5V regulated power supply system as shown below:

    Block diagram of power supply

    TransformerTransformers 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 magneticcore. 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 transferringpower through electromagnetic induction between circuits at the same frequency. To the left arelinks to pages o this site that are about various kinds of transformers. A Transformer'soutput(neglecting losses due to resistance or other manufacturing and physical factors) will bepredictably computed by the general formula:

    V2/V1=N2/N1.And transformer can also be defined asA transformer is an electrical device which is used to convert electrical power from oneElectrical circuit to another without change in frequency.

    Transformers convert AC electricity from one voltage to another with little loss ofpower. 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 are1. Step up Transformer2. Step down Transformer

  • 7/27/2019 Irrigation System Doc

    30/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    Step up transformer

    step up transformer

    Transformers only work with alternating current. Using direct current will create amagnetic field in the core but it will not be a changing magnetic field and so no voltage will beinduced in the secondary coil.

    Using a step up transformer to increase the voltage does not give you something fornothing. As the voltage goes up, the current goes down by the same proportion. The powerequation shows that the overall power remains the same.

    P=V x I Power = Voltage x CurrentIn 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 heatis then lost to the environment, it is wasted energy.

    Electricity is first produced at the power plants. Electricity is then sent to step-uptransformers where low-voltage electricity is changed to high voltage to facilitate the transfer ofpower from the power plant to the customer. Voltage must be increased so that the electriccurrent has the "push" it needs to efficiently travel long distances.

    From the step-up transformer, transmission lines carry the high voltage electric current longdistances through thick wires mounted on tall towers that keep the transmission lines high abovethe 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 lasttime at smaller pole-top transformers to utilization voltages, typically 120 and 240 volts, to makethe power safe to use in our homes.Step down transformer

  • 7/27/2019 Irrigation System Doc

    31/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    step down transformer

    Step down transformers are designed to reduce electrical voltage. Their primary voltageis greater than their secondary voltage. This kind of transformer "steps down" the voltage appliedto it. For instance, a step down transformer is needed to use a 110v product in a country with a220v supply.

    Step down transformers convert electrical voltage from one level or phaseconfiguration usually down to a lower level. They can include features for electrical isolation,power distribution, and control and instrumentation applications. Step down transformerstypically rely on the principle of magnetic induction between coils to convert voltage and/orcurrent levels.

    Step down transformers are made from two or more coils of insulated wire woundaround a core made of iron. When voltage is applied to one coil (frequently called the primary orinput) it magnetizes the iron core, which induces a voltage in the other coil, (frequently called thesecondary or output). The turns ratio of the two sets of windings determines the amount ofvoltage transformation.

    An example of this would be: 100 turns on the primary and 50 turns on the secondary, a ratio of2 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. Notethat if the input were 440 volts then the output would be 220 volts. The ratio between input andoutput voltage will stay constant. Transformers should not be operated at voltages higher thanthe nameplate rating, but may be operated at lower voltages than rated. Because of this it ispossible to do some non-standard applications using standard transformers.

    Single phase step down transformers 1 kva and larger may also be reverse connected to step-down or step-up voltages. (Note: single phase step up or step down transformers sized less than 1KVA should not be reverse connected because the secondary windings have additional turns to

  • 7/27/2019 Irrigation System Doc

    32/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    overcome a voltage drop when the load is applied. If reverse connected, the output voltage willbe less than desired.)

    Step-up transformers increase in output voltage, step-down transformers decrease inoutput voltage. Most power supplies use a step-down transformer to reduce the dangerously highmains voltage to a safer low voltage. The input coil is called the primary and the output coil iscalled the secondary. There is no electrical connection between the two coils; instead they arelinked by an alternating magnetic field created in the soft-iron core of the transformer. The twolines in the middle of the circuit symbol represent the core. Transformers waste very littlepower so the power out is (almost) equal to the power in. Note that as voltage is stepped downcurrent 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 itsprimary (input) coil which is connected to the high voltage mains supply, and a small number ofturns 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=VPX IPVp = primary (input) voltage

    Np = number of turns on primary coil

    Ip = primary (input) current

  • 7/27/2019 Irrigation System Doc

    33/100

    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 rectifieris the most important and it produces full-wave varying DC. A full-waverectifier can also be made from just two diodes if a centre-tap transformer is used, but thismethod is rarely used now that diodes are cheaper. Asingle diode can be used as a rectifier but itonly 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 specialpackages containing the four diodes required. It is called a full-wave rectifier because it uses allthe AC wave (both positive and negative sections). 1.4V is used up in the bridge rectifier becauseeach diode uses 0.7V when conducting and there are always two diodes conducting, as shown inthe diagram below. Bridge rectifiers are rated by the maximum current they can pass and themaximum reverse voltage they can withstand (this must be at least three times thesupply RMS voltage so the rectifier can withstand the peak voltages). Please see the Diodespage

    for more details, including pictures of bridge rectifiers.

    Fig:3.14 Bridge rectifier

    Alternate pairs of diodes conduct, changing overthe connections so the alternating directions ofAC are converted to the one direction of DC

    Output:

    full-wave

    varying

    DC

    http://www.kpsec.freeuk.com/powersup.htm#bridgerectifierhttp://www.kpsec.freeuk.com/powersup.htm#singlediodehttp://www.kpsec.freeuk.com/powersup.htm#singlediodehttp://www.kpsec.freeuk.com/acdc.htm#rmshttp://www.kpsec.freeuk.com/components/diode.htm#bridgehttp://www.kpsec.freeuk.com/components/diode.htm#bridgehttp://www.kpsec.freeuk.com/powersup.htm#bridgerectifierhttp://www.kpsec.freeuk.com/powersup.htm#singlediodehttp://www.kpsec.freeuk.com/acdc.htm#rmshttp://www.kpsec.freeuk.com/components/diode.htm#bridge
  • 7/27/2019 Irrigation System Doc

    34/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    Operation

    During positive half cycle of secondary, the diodes D2 and D3 are in forward biasedwhile D1 and D4 are in reverse biased as shown in the fig(b). The current flowdirection is shown in the fig (b) with dotted arrows.

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

    (using allthe ACwave)

    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 gapswhen the AC is negative. It is hard to smooth this sufficiently well to supply electronic circuitsunless they require a very small current so the smoothing capacitor does not significantlydischarge during the gaps. Please see theDiodes page for some examples of rectifier diodes.

    http://www.kpsec.freeuk.com/components/diode.htm#rectifierhttp://www.kpsec.freeuk.com/components/diode.htm#rectifierhttp://www.kpsec.freeuk.com/components/diode.htm#rectifier
  • 7/27/2019 Irrigation System Doc

    35/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    Fig:3.17 Single diode rectifier

    Output:

    half-

    wave

    varying

    DC

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

    Comparison of rectifier circuits

    Parameter

    Type of Rectifier

    Half wave Full wave BridgeNumber of diodes

    1

    24

    PIV of diodes Vm

    2Vm Vm

    D.C output voltage

    Vm/

    2Vm/

    2Vm/

  • 7/27/2019 Irrigation System Doc

    36/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    Vdc,atno-load

    0.318Vm0.636Vm 0.636Vm

    Ripple factor

    1.21

    0.482

    0.482RippleFrequency

    f 2f

    2fRectificationEfficiency

    0.406

    0.812

    0.812 Transformer

    UtilizationFactor(TUF)

    0.287 0.693 0.812

    RMS voltage Vrms Vm/2 Vm/2 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 moreadvantages than the other two rectifiers. So, in our project we are using full wave bridgerectifier circuit.

    Filter or smoothening circuit

    Smoothing is performed by a large valueelectrolytic capacitorconnected acrossthe DC supply to act as a reservoir, supplying current to the output when the varyingDC voltage from the rectifier is falling. The diagram shows the unsmoothed varyingDC (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 peakvalue (1.4 RMS value). For example 6V RMS AC is rectified to full wave DC ofabout 4.6V RMS (1.4V is lost in the bridge rectifier), with smoothing this increases toalmost 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,

    http://www.kpsec.freeuk.com/components/capac.htm#polarisedhttp://www.kpsec.freeuk.com/components/capac.htm#polarisedhttp://www.kpsec.freeuk.com/acdc.htm#rmshttp://www.kpsec.freeuk.com/components/capac.htm#polarisedhttp://www.kpsec.freeuk.com/acdc.htm#rms
  • 7/27/2019 Irrigation System Doc

    37/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    giving a small ripple voltage. For many circuits a ripple which is 10% of the supplyvoltage is satisfactory and the equation below gives the required value for thesmoothing 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 butallows 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 convertsit 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 maybe good enough for a basic battery charger, although some types of rechargeablebatteries still won't like it. In any case, it is nowhere near good enough for mostelectronic 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,afilteris any circuit that will remove some parts of a signal or power source, whileallowing other parts to continue on without significant hinderance. In a power

    supply, the filter must remove or drastically reduce the ac variations while stillmaking 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 somecombination. Each such combination has both advantages and disadvantages, andits own range of practical application. We will examine a number of common filtercircuits on this page.

    A Single Capacitor

  • 7/27/2019 Irrigation System Doc

    38/100

    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 theleft, the capacitor will charge to the peak voltage each half-cycle, and then willdischarge more slowly through the load while the rectified voltage drops back tozero before beginning the next half-cycle. Thus, the capacitor helps to fill in thegaps 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 thenormal exponential decay of any capacitor discharging through a load resistor. Theextent to which the capacitor voltage drops depends on the capacitance of thecapacitor and the amount of current drawn by the load; these two factorseffectively 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 portionof the waveform corresponds to the portion of the input cycle where the rectifierprovides current to the load, while the red portion shows when the capacitorprovides current to the load. As you can see, the output voltage, while not pure dc,has much less variation (orripple, as it is called) than the unfiltered output of therectifier.

    A half-wave rectifier with a capacitor filter will only recharge the capacitor onevery other peak shown here, so the capacitor will discharge considerably morebetween input pulses. Nevertheless, if the output voltage from the filter can be kepthigh enough at all times, the capacitor filter is sufficient for many kinds of loads,when followed by a suitable regulator circuit.

    RC Filters

  • 7/27/2019 Irrigation System Doc

    39/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    RC filters

    In order to reduce the ripple still more without losing too much of the dc output, weneed to extend the filter circuit a bit. The circuit to the right shows one way to dothis. This circuit does cause some dc loss in the resistor, but if the required loadcurrent is low, this is an acceptable loss.To see how this circuit reduces ripple voltagemore than it reduces the dc output voltage, consider a load circuit that draws 10 mAat 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 inthat 100 resistor. for a load current of 10 mA (0.01 A), the resistor will drop100 0.01 = 1 volt. Therefore, the dc output from the rectifier must be 21 volts, andthe dc loss in the filter resistor amounts to 1/21, or about 4.76% of the rectifieroutput. This is generally quite acceptable.

    On the other hand, the ripple voltage (in the USA) exists mostly at a frequency of120 Hz (there are higher-frequency components, but they will be attenuated evenmore than the 120 Hz component). At this frequency, each capacitor has a reactanceof 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 ripplereduction, although it doesn't remove the ripple entirely.

    If the amount of ripple is still too much for the particular load circuit, additionalfiltering or a regulator circuit will be required.

    LC Filters

  • 7/27/2019 Irrigation System Doc

    40/100

    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 reducethe ripple even more without a lot of dc resistance, we can replace the resistor withan inductor as shown in the circuit diagram to the right.

    In this circuit, the two capacitors store energy as before, and attempt tomaintain a constant output voltage between input peaks from the rectifier. At thesame time, the inductor stores energy in its magnetic field, and releases energy asneeded in its attempt to maintain a constant current through itself. This provides yetanother 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 bemade 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 opencircuits at dc, so they do not reduce the dc output voltage. However, at the basicripple 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 ripplecomponent (to less than 0.2%) while leaving the desired dc output nearly alone.This configuration may provide sufficiently pure dc for some applications, withoutthe need for any following regulator at all.

    The drawback of this approach is that a 10 Henry inductor is as large as somepower 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 LCfilter, provided the ripple reduction is sufficient and the power loss in the resistoris not excessive.

    Capacitive filter

    The simple capacitor filter is the most basic type of power supply filter. The use of thisfilter is very limited. It is sometimes used on extremely high-voltage, low-current

  • 7/27/2019 Irrigation System Doc

    41/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    power supplies for cathode-ray and similar electron tubes that require very little loadcurrent from the supply. This filter is also used in circuits where the power-supplyripple frequency is not critical and can be relatively high.

    The simple capacitor filter shown in figure 3-20 consists of a single-filter element. Thiscapacitor (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 dischargetime must be long to eliminate ripple action when using this filter. In other words, thecapacitor must charge up fast with preferably no discharge at all. Better filtering alsoresults when the frequency is high; therefore, the full-wave rectifier output is easier tofilter 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 circuitswithout filters in figure 3-21 to those with filters in figure 3-22. The output waveformsin figure 3-21 represent the unfiltered outputs of the half-wave and full-wave rectifiercircuits. Current pulses flow through the load resistance (RL) each time a diode

    conducts. The dashed line indicates the average value of output voltage. For the half-wave rectifier, Eavg is less than half the peak output voltage (or approximately 0.318 ofthe peak output voltage). For the full-wave rectifier, Eavg is approximately 0.637. Thisvalue is still much less than the applied voltage. With no capacitor connected across theoutput 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 acapacitor is connected across the output (in parallel with RL), the average value ofoutput voltage (Eavg) is increased due to the filtering action of capacitor C1.

  • 7/27/2019 Irrigation System Doc

    42/100

    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 thuspresents 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 lowresistance 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, thecapacitor charges rapidly and almost reaches the peak value of the rectified voltagewithin the first few cycles. The capacitor attempts to charge to the peak value of therectified voltage anytime a diode is conducting, and tends to retain its charge when therectifier output falls to zero. (The capacitor cannot discharge immediately). Thecapacitor slowly discharges through the load resistance (RL) during the time the rectifier

  • 7/27/2019 Irrigation System Doc

    43/100

    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% suchhigh percentages of ripples is not acceptable for most of the applications. Ripples canbe removed by one of the following methods of filtering.(a) A capacitor, in parallel to the load, provides an easier by pass for the ripplesvoltage though it due to low impedance. At ripple frequency and leave the d.c.toappears the load.(b) An inductor, in series with the load, prevents the passage of the ripple current (dueto high impedance at ripple frequency) while allowing the d.c (due to low resistance tod.c)(c) Various combinations of capacitor and inductor, such as L-section filter sectionfilter, 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 andanother with full wave rectifierFiltering is performed by a large value electrolytic capacitor connected across the DCsupply to act as a reservoir, supplying current to the output when the varying DCvoltage from the rectifier is falling. The capacitor charges quickly near the peak of thevarying DC, and then discharges as it supplies current to the output. Filteringsignificantly increases the average DC voltage to almost the peak value (1.4 RMSvalue).

    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 isplaced to reduce ripples and to improve the DC component.

  • 7/27/2019 Irrigation System Doc

    44/100

    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 self-

    contained fixed linear voltage regulatorintegrated circuits. The 78xx family is a very

    popular choice for many electronic circuits which require a regulated power supply, dueto their ease of use and relative cheapness. When specifying individual ICs within this

    family, thexx 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 of79xx 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 largerTO3 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 ofcurrent (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 circuitswhich 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

    http://en.wikipedia.org/wiki/Linear_regulatorhttp://en.wikipedia.org/wiki/Linear_regulatorhttp://en.wikipedia.org/wiki/Integrated_circuitshttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/TO220http://en.wikipedia.org/wiki/TO220http://en.wikipedia.org/wiki/TO3http://en.wikipedia.org/wiki/TO3http://en.wikipedia.org/wiki/Amperehttp://en.wikipedia.org/wiki/Electric_currenthttp://en.wikipedia.org/wiki/Electric_currenthttp://en.wikipedia.org/wiki/File:7800_IC_regulatorsa.jpghttp://en.wikipedia.org/wiki/File:7800_IC_regulatorsa.jpghttp://en.wikipedia.org/wiki/Linear_regulatorhttp://en.wikipedia.org/wiki/Integrated_circuitshttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/TO220http://en.wikipedia.org/wiki/TO3http://en.wikipedia.org/wiki/Amperehttp://en.wikipedia.org/wiki/Electric_current
  • 7/27/2019 Irrigation System Doc

    45/100

    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 substantialengineering 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 regulatordesign, 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 heatsinkmust 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 thanthe 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

    http://en.wikipedia.org/wiki/Switching_power_supplyhttp://en.wikipedia.org/wiki/Switching_power_supplyhttp://en.wikipedia.org/wiki/Switching_power_supplyhttp://en.wikipedia.org/wiki/Linear_regulatorhttp://en.wikipedia.org/wiki/Linear_regulatorhttp://en.wikipedia.org/wiki/Heatsinkhttp://en.wikipedia.org/wiki/Heatsinkhttp://en.wikipedia.org/wiki/Switching_power_supplyhttp://en.wikipedia.org/wiki/Switching_power_supplyhttp://en.wikipedia.org/wiki/Linear_regulatorhttp://en.wikipedia.org/wiki/Heatsink
  • 7/27/2019 Irrigation System Doc

    46/100

    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 regulatordesigns, and is not a linear regulatorlike other 78xx

    devices. Likewise, the 7803SR from Datel is actually a full switching power

    http://en.wikipedia.org/wiki/National_Semiconductorhttp://en.wikipedia.org/wiki/Datelhttp://en.wikipedia.org/wiki/Transistor-transistor_logichttp://en.wikipedia.org/wiki/Switching_regulatorhttp://en.wikipedia.org/wiki/Linear_regulatorhttp://en.wikipedia.org/wiki/Switching_power_supplyhttp://en.wikipedia.org/wiki/Switching_power_supplyhttp://en.wikipedia.org/wiki/National_Semiconductorhttp://en.wikipedia.org/wiki/Fairchild_Semiconductorhttp://en.wikipedia.org/wiki/Datelhttp://en.wikipedia.org/wiki/Transistor-transistor_logichttp://en.wikipedia.org/wiki/Switching_regulatorhttp://en.wikipedia.org/wiki/Linear_regulatorhttp://en.wikipedia.org/wiki/Switching_power_supplyhttp://en.wikipedia.org/wiki/Switching_power_supply
  • 7/27/2019 Irrigation System Doc

    47/100

    IRRIGATION SYSTEM SOLAR USING ENERGY

    supply module (designed as a drop-in replacement for 78xx chips), and not actually a

    linear regulatorlike the 78xx ICs.

    LM317 A similarlinear 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 voltageregulators are available, mainly for use in dual supplies. Most regulators include someautomatic protection from excessive current ('overload protection') and overheating('thermal protection'). Many of the fixed voltage regulator ICs has 3 leads and look likepower transistors, such as the 7805 +5V 1A regulator shown on the right. The LM7805is simple to use. You simply connect the positive lead of your unregulated DC powersupply (anything from 9VDC to 24VDC) to the Input pin, connect the negative lead tothe 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 threeterminals. The LM78XX offer several fixed output voltages making them useful in

    wide range of applications. When used as a zener diode/resistor combinationreplacement, the LM78XX usually results in an effective output impedanceimprovement of two orders of magnitude, lower quiescent current. The LM78XX isavailable in the TO-252, TO-220 & TO-263packages,Features

    Output Current of 1.5A Output Voltage Tolerance of 5% Internal thermal overload protection

    http://en.wikipedia.org/wiki/LM317http://en.wikipedia.org/wiki/DC_to_DC_converterhttp://en.wikipedia.org/wiki/DC_to_DC_converterhttp://en.wikipedia.org/wiki/LM317http://en.wikipedia.org/wiki/DC_to_DC_converter
  • 7/27/2019 Irrigation System Doc

    48/100

    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 ACmains electricity to a suitable low voltage supply for electronics circuits andother devices. A RPS (Regulated Power Supply) is the Power Supply withRectification, Filtering and Regulation being done on the AC mains to get a Regulatedpower supply for Microcontroller and for the other devices being interfaced to it.

    A power supply can by broken down into a series ofblocks, each of which performs a particular function. A d.cpower supply which maintains the output voltage constantirrespective of a.c mains fluctuations or load variations isknown as Regulated D.C Power SupplyWe are connected+5v dc supply to 40th pin of controller and ground to the20th pin of controller.

    LIGHT EMITTING DIODES (LEDS)

    Fig3.27.Circuit symbol

    FUNCTION

  • 7/27/2019 Irrigation