Tech Search

Custom Search

Wednesday, September 26, 2007

MICROCONTROLLER BASED WATER PURIFIER

MICROCONTROLLER BASED WATER PURIFIER

ABSTRACT

Water is one of the nature’s most simple substances. Human body Consists of 65% of water. One may live without food for more than a Month, but it is impossible water for more than a day. On average we consume 2.5 liters of water a day. Unfortunately, the water we consume can be polluted. Polluted water may look clean and even taste okay, but may contain germs and other impurities that cause water borne diseases. This is why it is extremely important to ensure that these impurities are removed before such water can be used safely for consumption. Water provides an ideal environment for growth of microbial contamination the abundant supply of nutrients available in the water help Bacteria and Viruses, to grow, live, reproduce and die. The microbial contamination causes diseases like Gastric-enteritis, Diarrhea, Dysentery, Jaundice, Cholera, Polio, in fact over 80% of all human diseases is water borne. For many years various techniques have been used to provide microbial control in water for industrial and domestic use.



CHAPTER 1
INTRODUCTION

1.1 IMPORTANCE OF SAFE DRINKING WATER
Water one of nature’s most simple substances. The human body consists of 65% of water. One may live without food for more than a month, but it is impossible to survive without water for more than a day. On average we consume 2.5 liters of water a day. Unfortunately, the water we consume can be polluted. Polluted water may look clean and even taste okay, but many contain germs and other impurities that cause water borne disease.
This is why it is extremely important to ensure that these impurities are removed before such water can be used safely for consumption. Water provides an ideal environment for growth of microbial contamination. The abundant supply of nutrients available in the water help bacteria and viruses, to grow live reproduce and die.
The microbial contamination causes diseases like Gastro-enteritis, Diarrhea, Dysentery, Jaundice, Cholera, and Polio, in fact over 80% of all human diseases are water borne. Water provides an ideal environment for growth of microbial contamination. The abundant supply of nutrients available in the water help bacteria and viruses, to grow live reproduce and die.
For many years various techniques have been used to provide microbial control in water for industrial and domestic use. The technique and their disadvantages as follows.



1.2 METHODS OF PURIFICATION & DISADVANTAGES OF IT

1.2.1 Boiling
It is effective against cysts bacteria and spores only if the water is boiled at 1200C for 20 minutes in wet heat (steam) at atmospheric pressure. Recontamination can take place after 8 hours of cooling. Since water never brought to a rolling boil, most harmful pathogens get away unscathed. Hence even tea cannot be considered safe to drink and boiling is also an expensive and time-consuming process.

1.2.2 Filtration
Filters remove visible dirt particles. They merely trap Bacteria, but do not destroy them in fact sometimes if not cleaned regularly the filter may serve as a breeding ground for bacteria. And Viruses are too minute to be trapped by these candle filters.

1.2.3 Chemical Treatment

1.2.3.1 Chlorine
Though chlorine continues to be the most commonly used sterilizing agent because of its germicidal properties and low cost, it is being viewed with suspicion due to the discovery that excessively chlorinated water can lead to formation of many homogenate compounds like trihalmethane (THMS) and chlorophenols which are carcinogenic in nature. If the chlorine concentration falls below the required concentration, it will defeat the purpose for which it was employed. *Carcinogenic cancer causing.

1.2.3.2 Iodine
Iodine is a suspect chemical, as one does not know its effect on human body over long periods of time. Iodine in excess is considered toxic. It is harmful it is given to people with thyroid hyperactivity.

1.2.3.3 Alum
It is not germicidal in nature and only has ability to help settle suspended physicals particles. It also has the ability to irritate the throat.

1.2.3.4 Potassium permanganate
It is poisonous if taken in excess and should not be used for domestic use. It colors the water to a pinkish tinge.

1.2.4 Tap Attachments

1.2.4.1 Filters
They can be of two types, the tap attachments or the ceramic filter types. Both of these have a pore size of 10-15 microns. The sizes of certain virus and bacteria are between 0.01 to 1 microns and hence though filters can remove only physical particles, they are totally ineffective against microorganisms. These types of filters actually acts as excellent breeding grounds for microbial growth as they are most ventilated surfaces where physical particles are trapped and begin to delay.

1.2.4.2 Ultra Violet Radiation
Ultra Violet rays are an effective technique but it just inactivates Bacteria and Viruses. Hence poses potential hazards. The other drawbacks of the systems are
Ø A certain volume of water requires a minimum exposure time to the UV radiation.
Ø Dosage of the UV radiation also dependent on the flow rate and the total exposure time.
Ø Storing of water not recommended – U/V rays would not kill spores. This is the reason why generally the manufactures recommend that water should be consumed as soon as it comes out of the unit. So water purified by this method cannot be stored at all.
Ø Direct Exposure of UV may cause health hazards.
Ø The Ultra Violet tube has a definite life and has to be replaced.
Ø U/V has no effect recorded on Viruses.
Ø The unit is installed in such a way that there is a polypro prefilter and there is also an activated carbon filter fixed before the water enters the unit. The unit cannot operate without a prefilter, as there is a turbidity control, which ensures that the unit does not work even the water is slightly turbid.
Ø Another fact to be considered is that the UV rays inactivate bacteria by working on their DNA and slops the reproductive process of the Bacteria. Bacteria has a total life of 20 minutes and after it gets it gets hit by UV rays it passes through dark area the bacteria can be reactivated but cannot reproduce. This process only inactivates bacteria but cannot destroy it.
Ø The unit does not effectively work with hard water. There is that a protective glass jacket is used around the UV tube and another glass tube is fitted around the jacket. Water flows in between these glass in between these two tubes then a white coating forms on the outside of the glass jacket there by preventing penetration of UV rays into water to be purified. This reduces the effectiveness of the unit and some times unit does disinfect at all. To make the unit effective at all times the glass jacket has to be cleaned regularly which makes the method maintenance prone. Also when the tube has top be cleaned cannot be ascertained as it depends on the quality of water.

1.2.5 Oxidization
Oxidation is the combination of a substance with oxygen. Oxidation means a substance undergoes a chemical change resulting in a different Substance. Odors and pollutants are broken down into harmless, odorless compounds such as carbon dioxide, water vapour and oxygen.

1.3 OZONIZED PURIFICATION VS OTHERS

1.3.1 Ozonized Purification Vs UV-Purification
Maintenance cost of UV based purifiers is normally high; Since the UV lamp frequently needs to be replaced and requires regular cleaning of Quartz glass used in UV chamber. The disinfections of viruses & Spores are Excellent in Ozone based water purifiers but which is poor in UV based purifiers.

1.3.2. Ozoniztion Vs Biocides
Ozone is not irritating to humans, in quantities required to purify water. It leaves no by products expect pure oxygen. The oxidation power of Ozone is three times more than chlorine. Chlorine at normal level does not destroy cysts of amoeba where as Ozone destroys it.
Table 1.1 shows the comparison methods of various water purification methods. From this it will be clear that the ozonization method of water purification is the better one, since most of the comparison description shows that the ozonization method water purification is the better approach. It also is clear that it is also economically efficient since the cost for the purification of water is low when compared to the other methods of purification of water.







1.4 DETAILS OF OZONE

1.4.1 Definition
Ozone is a tri atomic allotrope of oxygen formed by the recombination of oxygen atoms. The un reacted Ozone also decomposes to form oxygen making it environment friendly, often called the environment friendly or the green chemical of the future. Ozone is allotropic oxygen. Ecologically the most acceptable disinfections agent for water. Ozone effectively destroys Bacteria, Virus and water borne parasites. And is also capable of destroying bad odor and color in water, which other organic compounds create.
Ozone is second only to fluorine as a powerful oxidant and it is a most powerful water disinfectant. Ozone destroys Bacteria and virus much faster than chlorine by rupturing cell walls and oxidizing the nucleic acids like DNA and RNA. Ozone destroys bacteria in seconds while chlorine and other biocides take 30 minutes to several hours for the same result. Ozone also functions as clarifying agent to polish the water and improve quality. The Ozonized water will be free from the microorganisms and rich in oxygen.

1.4.2 Formation
In the stratosphere, OZONE is formed by the sun’s ultraviolet light. Exciting oxygen molecules to a higher energy level to produce unstable oxygen atoms can also produce OZONE. A small percentage of these single atoms combine with other oxygen molecules to form ozone,
O+O2 = O3. Ozone thus formed is very unstable with a half; if of about 20 minutes in water and 10 hours in air before the unreacted molecules decompose to oxygen. Due to this unstable nature, Ozone must be generated on site.

1.4.3 Properties
Ozone is pH neutral. It has no effect on the taste of water.
Ø The system uses tiny amounts to be effective. Ozone is very gentle to humans and equipment.
Ø Ozone will not explode.
Ø Ozone is not a fire hazard.
Ø In the dose required for excellent purification, Ozone does not produce harmful fumes.
Ø Ozone will not damage plumbing fittings or pipes.

1.4.4 Applications Of Ozone
Ø Potable Water
Ø Bottled Water
Ø Cooling tower Water Treatment
Ø Swimming pools and spas
Ø Ultra Pure water
Ø Industrial process water
Ø Odor removal
Ø Effluent treatment
Ø Fish Farming
Ø Ozone Therapy
Ø Air purification


1.4.5 Effects
Ø The Ozone layer in the atmosphere protects the earth from deadly radiation
Ø Ozone destroys bacteria, Viruses mold and mildew.
Ø Ozone eliminates spores, cysts, yeast, fungus and smoke.
Ø Ozone oxidizes iron, sulfur, manganese and hydrogen sulfate.
Ø Ozone eliminates oils, odors and other contaminants in water.
Ø Ozone keeps water, fresh and sparkling.

1.4.6 Biological action in water
Ozone destroys Bacteria & Virus by rupturing cell walls and oxidizing the nucleic acids like DNA and RNA. Ozone destroys Bacteria in seconds while chlorine and other biocides take 30 minutes to several hours for the same result Ozone diffuses cell walls, and then oxidizes the bacteria’s enzymes.
Ozone molecule is a very powerful oxidizer and sanitizer. It destroys anything it comes in contact with, faster and more effectively than anything else available, and when the sanitation is complete, or if Ozone finds nothing to oxidize, it returns to molecular oxygen (2 atoms).

1.4.7 Benefits
Ø Ozone is generated “onsite” and is introduced into the water or air automatically
Ø Ozone does not have to be purchased or stored.
Ø Ozone does not affect the pH balance of water, thus minimizing pH adjustments.
Ø Ozone helps reduce total dissolved solids in water so that the water does not have to be changed as often.
Ø Ozone eliminates much of the routine maintenance because it does such an effective job keeping the water or air clean.


1.4.8 Effect on environment
Ø Ozone leaves no chemical by-products in water.
Ø Ozone leaves no chemical taste or smell.
Ø Ozone will not burn eyes or make them red or irritated.
Ø Ozone will not discolor or damage hair or clothing.
Ø Ozone adds no contaminants or by-products to water.
Ø Ozone rids water and air of unhealthy microorganisms.
Ø Ozone is NOT a carcinogen.


CHAPTER 2
OZONIZATION PROCESS

2..1 GENERAL
In this chapter, the explanation about the ozonization process is described in a short manner. The schematic representation of the process is given in the following section at the fig (2.) 1). before that the component description is given in the following section.

2.2 COMPONENTS DESCRIPTION

2.2.1 Air Drier Bottle
Air Drier Bottle adds longevity to the Ozone G-generator by absorbing moisture From atmospheric air. The bottle is filled with Silica Gel and the color of the material is Dark Blue, which will fade when it absorbs moisture from atmospheric air. So Silica Gel needs to be regenerated after the life time (Programmed by Micro Controller)

2.2.2 Ozone Generator
Here Ozone is produced by expressing oxygen to high voltage discharge. When air (O2) flows through Ozone generator, which contains two electrodes separated, by a thin gap at low current and high voltage electric discharge say 4KV, oxygen is ionized with characteristic bluish glow like lightning. This kind of Ozone discharge generator is called corona discharge generator. As the air drawn through the chamber by four equally shared electrons, the molecular excitation of oxygen molecules into oxygen atoms takes place. Some of these atoms then equally react with oxygen molecules to form Ozone. The Ozone thus produced is very unstable and converts itself into more stable oxygen.


















Fig2.1 Structure of ozone generator

2.2.3 Pump Assembly
Pump assembly is used to shuffle the water stored in the tank with Ozone. And also used to discharge the water from the tank after the disinfections process. For this a 12V Dc Motor is used and covered with an ABS material.



2.2.4 Injector
Here the Ozone from the Ozone generator is injected through a thin capillary tube into water disinfections process. (Water recycled from tank).

2.2.5 Solenoid Valve
Two-way valve is a mechanical device in which one way is used to recycle the water from tank during disinfections process and the other way is used to draw water from the storage tank after disinfections process.
When a Nylon plunger is pressed one way is closed and other way opens, when plunger is released one way opens and the other way closes.











Fig 2.1. Schematic representation of the process



2.3 PROCESS EXPLANATION
The air which comes into the air drier gets dried up and the dried air goes out of the air drier bottle and get into the ozone generator, As the air drawn through the chamber by four equally shared electrons, the molecular excitation of oxygen molecules into oxygen atoms takes place. Some of these atoms then equally react with oxygen molecules to form Ozone.
The Ozone thus produced is very unstable and converts itself into more stable oxygen. Is injected into the injector. In the mean time, the water from the underground is pulled up by the pump, which is used to shuffle the water stored in the tank with Ozone.
And also used to discharge the water from the tank after the disinfections process. And that water is passed across the two way valve, which one way is used to recycle the water from tank during disinfecting process and the other way is used to draw water from the storage tank after disinfections process and it is opened in such a direction, which supports for a closed loop purification.
The water from the two-way valve is pushed forward into the injector and thus ozone gas gets mixed with the water and thus the cell walls of all the microbes get detached.
This process is continued for 3 minutes and after that the solenoid valve is opened at the other side and so the purified water comes out of the other side and ready for drinking purpose.
After rupturing the cell walls of all the microbes, the ozone gas gets converted to oxygen by anionic action. Ands, it is safe for drinking and bathing purpose.


2.3.1 Process Automization
To make this process automatic one, microcontroller is established which controls the three-solenoid valves and the 12V DC motor, which has been explained in the following chapters.










CHAPTER 3 MICROCONTROLLER

3.1 THE 89C51 ARCHITECTURE
The 89C51 consists of:
Ø Eight-bit CPU with registers A (the accumulator) and B
Ø Program Counter (PC)
Ø Data Pointer (DPTR)
Ø Flags and the Program Status Word (PSW)
Ø Eight-bit stack pointer (SP)
Ø Flash Rom
Ø RAM of 256bytes (128bytes general purpose)
Ø Four register banks, each containing eight registers
Ø Thirty-two input / output pins arranged as four 8-bit ports
Ø P0-P3
Ø Two 16-bit timer /counter: T0 and T1
Ø Full duplex serial data receiver / transmitter; SBUF
Ø Interrupts
Ø Oscillator and clock circuits

3.1.1 CPU Registers
The 89C51 contain 34 general-purpose, in working, registers. Two of these, registers A and B hold results of many instructions, particularly for arithmetical and logical operations. The other 32 are arranged as part of internal RAM in four banks, Bank0-Bank3, of eight registers each. The A and B registers are also called as CPU registers.


3.1.2 The “A” (Accumulator) Register
The A (accumulator) register is the most versatile of the two CPU registers and is used for many applications, including addition, subtraction, integer multiplications. It can hold an 8-bit (1-byte) value and is the most versatile register in the 89C51. The register is also used for all data transfers between the 89C51 and any external memory. More than half of the 89C51’s instructions manipulate or use the accumulator in some way.

3.1.3 The “B” Register
The B register is used with the A register for multiplication and division operations and has no other function other than as a location where data may be stored. The “B” register is only used by two 89C51 instructions: MUL AB and DIV AB Aside from the MUL and DIV instructions, the “B” register is often used as yet another temporary storage register much like a ninth “R” register. The “B” register is very similar to the Accumulator in the sense that it may hold an 8-bit (byte) value. Thus, if you want to quickly and easily multiply or divide “A” by another number in “B” and make use of these two instructions.
While doing multiplication the higher order byte of the result is stored in “B” register and lower order of the result is stored in accumulator and for division the quotient is stored in accumulator and the remainder is stored in “B” register.
Other than Multiplication and division functions, user can directly move the data from accumulator and direct data to “B” register. The instructions are MOV B, A
MOV B, #XXH (XX is nothing but hex data)
MOV A, B

3.1.4 Program Counter
The 89C51 contain two 16 bit registers: the program counters (PC) and the data pointer (DPTR). Each is used to hold the address of a word in memory.
Program instruction bytes are fetched from locations in memory that are addressed by the PC. Program ROM may be on the chip at addresses 000h to Fifth, external for address that exceed FFFh, or totally external for all address from 0000h to FFFFh. The PC is automatically incremented after every instruction byte is fetched and may also be altered by certain instructions. The PC is the only register that does not have an internal address.
The program counter (PC) is a 2-byte address that tells the 8951 where the next instruction to execute is found in memory. When the 8951 are initialized PC always starts at 0000h and is incremented each time an instruction is executed. It is important to note that PC isn’t always incremented by one since some.
Instructions require 2 or 3 bytes the PC will be incremented by 2 or 3 in these cases. There is no way to modify it value. The program counter is special in that. That is to say, you cannot do something like PC=2430h. On the other hand, if you execute LJMP 2340h you’ve effectively accomplished the same thing.
It is also interesting to note that while you may change the value of PC (by executing a jump instruction, etc.) there is no way to read the value of PC. That is to say, there is no way to ask the 8951 “What address are you about to execute?”

3.1.5 Data Pointer (Dptr)
The DPTR register is made up of two 8 bit registers, named DPH and DPL, which are used to furnish memory addresses for internal and external code access and external data access. The DPTR is under the control of program instructions name; DPH and DPL are each assigned an address. The data pointer is the 89C51’s only user accessible 16 bit (2 byte) register. DPTR, as the name suggests, is used to point to address something like HL register pair in 8085 microprocessor. It is used by a number of commands that allow the 8951 to access external memory and internal memory.
While DPTR is most often used to point to data in external memory, many programmers often take advantages of the fact that it’s the only true 16-bit register available. It is often used to store 2 byte values that have nothing to do with memory locations.

3.1.6 Program Status Word (PSW)
Flags are 1 bit registers provided to store the results of certain program instructions. Other instructions can test the condition of the flags and make decisions based on the flag states. In order that the flags may be conveniently addressed, they are grouped inside the program status word (PSW) and the power control (PCON) registers.
The 8951 have four math flags that respond automatically to the outcomes of math operations and three general-purpose user flags that can be set or cleared to 0 by the programmer as desired. The math flags include Carry (CY), Auxiliary Carry (AC), Overflow (OV), and Parity (P). User flag is named F0; this general purpose flags that may be used by the programmer to record some event in the program. Register bank selection may be done by the use of RS0 and RS1. Note that all of the flags can be set and cleared by the programmer at will. The math flags, however, are also affected by math operations.
The PSW contains the math flags, user program flag F0, and the register select bits RS0, RS1 that identify which of the four general purpose register banks is currently in use by the program.

3.1.7 The Stack And The Stack Pointer
The stack refers to an area of internal RAM that is used in conjunction with certain opcodes to store and retrieve data quickly. The 8-bit Stack Pointer (SP) register is used by the 8951 to hold an internal RAM addresses that is called the top of the stack. The address held in the SP register is the location in internal RAM where the last byte of data was stored by a stack operation.
When data is to be placed on the stack, the SP increments before storing data on the stack so that the stack grows up as data is stored. As data is retrieved from the stack, the byte is read from the stack, and then the SP decrements to point the next available byte of stored data.
The stack is limited in height to the size of the internal RAM. The stack has the potential (if the programmer is not careful to limit is growth) to over write valuable data in the register banks, bit addressable RAM, and general purpose (scratchpad) RAM areas. The programmer is responsible for making sure the stack does not grow beyond predefined bounds.
The stack is normally placed high in internal RAM, by an appropriate choice of the number placed in the SP register, to avoid conflict with the register, bit and scratchpad internal RAM areas.
The stack pointer, like all registers except DPTR and PC, may hold an 8 bit (1 byte) value. The stack pointer is used to indicate where the next value to be removed from the stack should be taken from.
When you push a value onto the stack, the 89C51 first increments the value of SP and then stores the value at the resulting memory location.

3.1.8 Flash Rom
4Kbyte ROM is available in the microcontroller. It can be erased and reprogrammed. If the available memory is not enough for program we can interface the external ROM with this IC, it has 16-address line, so maximum of (2^16) i.e. 64 bytes of ROM can be interfaced with this microcontroller. Both internal and external ROM cannot be used simultaneously. For external accessing of ROM a pin is provided in microcontroller itself is i.e. pin number 31. EA should be high to use internal ROM, low to use external ROM.
3.1.9 RAM
Internal 256 bytes of RAM are available for the user. These 256 bytes of RAM can be used along with the external RAM. Externally we can connect 64 Kbytes of RAM with microcontroller. In internal RAM first 128 bytes are used as special function register (SFR). These SFRs are used as control registers for timer, serial port, etc.



3.1.9 Register Banks
89C51 use 8 “R” registers, which are used in many of its instructions. These “R” registers are numbered from 0 through 7 (R0, R1, R2, R3, R4, R5, R6 and R7). These registers are generally used to assist in manipulating values and moving data from one memory location to another. For example, to add the value of R4 to the Accumulator, we would execute the following instruction:
ADD A, R4
Thus if the accumulator (A) contained the value 3 and R4 contained the value 3, the Accumulator would contain the value 6 after this instruction was executed. The “R” register is really part of internal RAM.
ADD A, 04h
The instruction adds the value found in Internal RAM address 04h to the value of the Accumulator, leaving the result in the Accumulator. Since R4 is really Internal RAM 04h, the above instruction effectively accomplished the same thing.
The 89C51 has four register banks. When the 89C51 is first booted up, register bank 0 (address 00h through 07h) is used by default. However, our program may instruct the 89C51 to use one of the alternate register banks: I.e., banks 1, 2, or 3. In this case, R4 will no longer be the same as Internal RAM address 04h. For example, if our program instructs the 89C51 to use register bank 3, “R” register R4 will now be synchronous with Internal RAM address 1Ch.
The concept of register banks adds a great level of flexibility to the controller, especially when dealing with interrupts. The register banks really reside in the first 32 bytes of Internal RAM. Register banks can be selected with the help of RS0, RS1 bits in the program status word (PSW).

3.1.10 Thirty-Two Input/Output Pins
All four ports in the 89C51 are bi-directional each contains a latch, an output driver and input buffer. The output drivers of port 0and port 2, and the input buffers of port 0 are used in access to external memory. In this application port 0 is used as a lower byte of the external memory address multiplexed with data bus and port 2 is used as a higher byte of the external memory address when address is sixteen bits wide.
P0 (Port 0, SFR 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 e.g., bit 0 of port 0 is pin P0 i.e. pin no. 39 in microcontroller bit 7 is pin P0.7 i.e., pin no. 32 in the IC. 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.

3.1.11 Interrupts
An interrupt is a special feature, which allows the 89C51 to provide the illusion of “multi-stacking,” although in reality the 89C51 is only doing one thing at a time. The word “interrupt” can often be substituted with the word “event”.
An interrupt is triggered whenever a corresponding event occurs. When the event occurs, the 89C51 temporarily puts “on hold” the normal execution of the program and executes a special selection of code referred to as an interrupt handler. The interrupt handler performs whatever special functions are required to handle the event and then returns control to the 89C51 at which point program execution continues as if it had never been interrupted.
The topic of interrupts is somewhat tricky and very important. For now, suffice to say that interrupts can cause program flow to change.
A computer program has only two ways to determine the conditions that exist in internal external circuits. One method uses software instructions that jump to subroutines on the states of flags and port pins. The second method responds to hardware signals, called interrupts that force the program to call a subroutine. Software techniques use up processor time only when action by the program is needed. Most applications of microcontrollers involve responding to events quickly enough control the environment that generates the events (generically termed real-time programming). Interrupts are often the only way in which real-time programming can be done successfully.
Interrupts may be generated by internal chip operations or provided by external sources. Any interrupt can cause the 89C51 to perform a hardware call to an interrupt, handling subroutine that is located at a predetermined (by the 89C51 designers) absolute address in program memory.
Five interrupts are provided in the 89C51. Three of these are generated automatically by internal operations: Timer flag 0, Timer flag 1, and the serial port interrupt (RI or TI). Two interrupts are triggered by external signals provided by circuitry that is connected to pins INT0 and INT1 (port pins p3.2 and p3.3).
After the interrupt has been handled by the interrupt subroutine, which is placed by the programmer at the interrupt location in program memory, the interrupt program must resume operation at the instruction where the interrupt took place. Program resumption is done by storing the interrupted PC address on the stack in RAM before changing the PC to the interrupt address in ROM. The PC address will be restored from the stack after an RETI instruction is executed at the end of the interrupt subroutine.

3.1.12 Oscillator and clock circuit
This Microcontroller is working in a speed of maximum of 24MHZ. This microcontroller is available with inbuilt oscillator: just we have to connect the crystal to its terminal.

3.1.13 Serial Ports
The serial port is full duplex which means it can transmit and receive simultaneously. It is also received buffered, which means it can begin receiving a second byte before a previously received byte has been read from the receive register. The serial port receive and transmit registers are both accessed as special function register SBUF. Writing to SBUF loads the transmit register and reading SBUF access a physically separate receive register.
SCON (serial control, Address-98h, bit-addressable):
The serial control SFR is used to configure the behavior of the 89C51’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.
To use the 89C51’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, Address-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 out the serial port’s TXD pin. Likewise, any value, which the 89C51 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.

3.1.14 Serial Data Input/Output
3.1.15 Computers must able to communicate with other computers in modern multiprocessor distributed systems. One cost-effective way to communication is to send and receive data bits serially. The 89C51 has a serial data communication circuit that uses register SBUF to hold data. Register SCON controls data communication, register PCON controls data rates and pins RXD (P3.0) and TXD (P3.1) connect to the serial data network. SBUF is physically 2 registers. One is writing only and is used to hold data to be transmitted out of the 89C51 via TXD. The other is read only and holds received data from external sources via RXD. Both mutually exclusive registers use address 99h.
There are four programmable modes for serial data communication that are chosen by setting SMX bits in SCONThe serial buffer SFR is used to send and receive data via the on-board serial port. Any value written to SBUF will be out the serial port’s TXD pin. Likewise, any value, which the 89C51 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










The pin details of 89C51 are given in the previous page. Fig 3.1,which will depict the necessary action of the micro controller in the process. The micro controller 89C51 will control 3 solenoid valves, ozone generator & the12V DC motor to a p [erect level, so the water get purified to the nominal amount.
The following algorithm will teach us about how the microcontroller is performing the actions to control 3 solenoid valves, ozone generator, and 12-V dc motor. The next comes is the flower chart which will also depict about the same.

3.2 ALGORITHM
Step 1: Check for low level in storage tank. If low level ON storage tank, check for processing tank low level otherwise kept process OFF.
Step 2: If low level ON processing tank open inlet valve.
Step 3: Check for high level ON storage tank. Stop inflow water.
Step 4: Motor ON. Check for proper motor operation any fault go for error display.
Step 5: After 15 second ON ozone generator for 3 minutes.
Step 6: check for low level ON storage tank. If condition true, open outlet valve.
Step 7: Check for high level if condition satisfied close solenoid valve.
Step 8: Go to step1.
Step 9: Stop.


CHAPTER 4
LEVEL SENSOR

4.1 GENERAL
Level sensor is a level detector, which detects the water level and gives the Signal on to the microcontroller, which will take necessary steps to control The three-solenoid valves, Ozone generator and the pump. It is made of steel and it ions of three-component structure. One steel rod is taken as “HIGH” And the other is taken as “LOW” and the smallest one is taken as “common”.

4.2 STRUCTURE OF LEVEL SENSOR
The figure 4.1in the next page depicts the structure of level sensor. It consists of air bottle drier, ozone generator, solenoid valve and the three level sensors.
The level sensor consists of three terminals. One of them is depicted as ‘LOW’ which is the longest and the next one is depicted as ‘COMMON’ which is shorter and the remaining 0one is depicted as ‘HIGH’ which is the shortest. Of all. When the water level is below the ‘LOW’ LEVEL it is considered as ‘OPEN’ and the water get into the solenoid valve. And when the water touches the ‘HIGH’ point IT IS CONSIDERED AS ‘CLOSE’ and the water will not flow through the solenoid valve.
There are two sets of LEVEL SENSORS in the project. One is placed in the process tank and the remaining one is placed in the normal water tank. The level sensor, which is placed in the PROCESS TANK, is depicted as LEVEL SENSOR1And the other one is taken as LEVEL SENSOR2 and this placed in the normal water tank.











Fig 4.2 Circuit diagram of level sensor




3 CIRCUIT DESCRIPTION
The circuit shown in fig 4.2. Get two kinds of input signals from level sensor.One kind of signal is “LOW” and the other one is “HIGH”.”HIGH” signal is got when the water level is in the saturation point of the tank and the “LOW” signal is got when the water level in the tank is at the bottom point. When the water is at the intermediate point no signal is got from the level sensor.
The diode D1, D2, D3 provides sharp signals to the circuit, and also it provides the one-way path to the circuit. The capacitor C1, C2, C3 that is of 100pf blocks the DC component of the signal and the capacitor C4, C5, C6 boost the voltage about 10% of the input voltage.
The circuit shown in the figure 4.2 acts as a comparator circuit. It compares the signal with the reference signal and gives regarding output signal ton the micro controller. There are two level sensors, so that there are two sets of input signal.
These signals are get isolated from each other. The comparator used in this circuit is HCF40106BE. The details about the HCF40106BE. are given in the APPENDICES.
The Whole project operation depends on the signals given by the level sensor.Level sensor provides secured operation of the project. The input signals from the micro controller is from the 12,13,14,16 pin of the 89C51 and the output signals from the level sensor to the microcontroller 6,7,9 Pin of the micro controller. The resistors of value 100-kilo ohm to 1 mega ohm are used in the input section and the resistors of value 1 mega ohm are used in the output section to control the high current value. The Whole project operation depends on the signals given by the level sensor. Level sensor provides secured operation of the project.





CHAPTER 5 POWER SUPPLY SECTION

5.1 GENERAL
The power supply section supplies the respective type of voltage with accurate magnitude to various components of the project. It consists of step down transformer which gives the about of 12 v &110 v ac. and this is converted to DC voltage and given to respective components. Let us see it in the elaborate manner.

5.2 DESCRIPTION
The figure in the next page shows the circuit diagram of power supply section.The main components of the power section are step down transformer, three relays of 12 V.
Three relays control the operation of three solenoid valves. The three relays get the control signals from the micro controller. The relays are of electromagnetic relays. The capacitor C blocks the DC component of the circuit. The diode D1, D2, D3 gets converts 12V AC to 12V DC and it is Given to the Three relays R1, R2, R3. Here three transistor t1, t2, t3 are used which is used in the common emitter configuration.
The micro controller signals are passed in serious manner to the base of these transistors. The 12V dc is given in a serious manner to the emitter of the transistors and when the microcontroller signals are passed on to the base of the transistors, the 12 V dc is passed on to the solenoid valves and the solenoid valve get opened and thus the water flows from the overhead tank to the processing tank. When the water reaches the ultimate point of the tank, the level sensor circuit Gives the signal to the microcontroller .




CHAPTER 6
ULTIMATE OPERATION OF THE PROJECT

6.1 GENERAL
In this section, we have explained about the main PCB layout, micro controller circuit, the initialization table, tested comparison table, and the overall ultimate operation of the project.

6.2 PROCESS EXPLANATION
Initially, as the power is switched on, a evolutionary sound will take place and the micro controller will give a signal to the relay1 which will pass 230 v dc to the solenoid valve 1 and thus 6the solenoid valve1 get opened, and thus the water get filled up in the process tank from the overhead tank. When the water touches the common point of the level sensor 1 the micro controller switch off the signal which is been given to the relay1, and thus the relay1 get opened and so the solenoid valve1 get closed and thus the flow of water is stopped now, the micro controller will give the signal to the switching ckt1&relay2and thus the 12v dc is given to the motor and so the water get started to circulate through the injector and solenoid valve2. The time taken by the water to reach the injector’s 3 seconds. So the micro controller will pass the signal to the switching ckt2.after 3 seconds. And thus 110 v dc is given to the lot where it is converted t6o 4000 v dc and passes on to the ozone generator and thus the ozone gas get produced and this will flow into the injector. The ozone gas is produced and gets circulated for about 3 minutes.
As the 4000v dc is passed across the ozone generator, o 2 is spited into o & o and by cationic action, it is jointed to o3 and this gas is passed on to the injector.
As the ozone gas get passed into the water, the cell walls of the microbes are ruptured and thus the water get purified with in 3 minutes of time. After 3 minutes of time, micro controller will withdraw its signal, which is given to the switching ckt2. & To the relay2.and so the ozone gas will not be produced and the solenoid valve2 get closed.
Then micrcontroller will give the signal to the relay3 and the solenoid valve 3 gets opened and so the gat moved to the normal water tank, which is available for drinking purpose. When the water level touches the common point of level sensor2, micro controller will withdraw the signal given to the switching ckt1. And thus the motor gets stopped, and the water flow is stopped. The normal water tank is nitrated with the hot water tank at the bottom. So the same level of water is been maintained in the two tanks.
When the water level in the normal water tank is lowered, the level sensor cut get opened, and so the micro controller, will pass on the signal to the switching ckt1, and the motor get started and the water again started to flow from the processing water tank to the normal water tank, and when the water in the processing tank get lowered from the common point, the level sensor cut get opened and the micro controller will pass the signal to the relay1 and thus the solenoid valve 2 get opened and again the process will continued from the initial stage
6.3 COMPONENTS EXPLANATION

6.3.1 Air Drier Bottle
Air drier bottle adds longevity to the ozone generator by absorbing moisture from the atmospheric air. The bottle is filled with silica gel and the color of the material is dark blue, which will fade when it absorbs moisture from 6the atmospheric air. So, silica gel needs to be regenerated after the lifetime.



6.3.2 Ozone generator
Here, expressing oxygen to high voltage discharge produces ozone. When, air flows through ozone generator which contains two electrodes separated by a thin gap at low current and high voltage electric discharge say 4 kV, oxygen is ionized with characteristic bluish glow like lighning.this kind of ozone generator is called carona discharge generator. As the air drawn through the chamber, diatomic oxygen, which is a molecular compound of two oxygen atoms held together by four equally shared electrons, the molecular exciting of oxygen molecules into oxygen take place. Some of these atoms then equally reac6t with oxygen molecules to form ozone. The ozone thus produced is very unstable and converts itself into m0ore stable oxygen.

6.3.3 Motor assembly
Motor assembly is used to shuffle the water stored in the tank with ozone. And also used to discharge the water from the tank after the disinfecting process. For this a 12-v DC motor is used and covered with an ABS material.

6.3.4 Injector
Here the ozone from the ozone generator is injected through a thin capillary tube into the water during disinfecting process. Water gets recycled from the tank.



6.3.5 Solenoid valve
It is a mechanical device in which one way is used to recycle the water from the tank during disinfecting process and the other way is used to draw from storage tank after disinfecting process. When the nylon plunger is pressed one way is closed and the other way opens, when plunger is released one way open and the other way closes.


6.4 BLOCK DIAGRAM DESCRIPTION
The figure 6.2 in next page shows the physical structure of the project. The section, which is provided in central part, is the main section of the project. Central processing unit is nothing but a microcontroller unit. This section controls the whole operation of this project. Other sections are power supply section, pump section, ozone generator section, and level sensor section. We have explained all the section in previous chapter. The circuit diagram & PCB layout of all PCB will be explained following section. Pump assembly uses 12v dc motor.
The condition of the pump will be checked before ON ozone geneator.for this operation 15-second time delay is provided. Any fault in pump assembly will stop the whole operation of the device. At normal operation the motor draw 100mA.
This current is considered as the reference signal for pump comparator. Any change in current will stop t5he whole operation. The circuit diagram & PCB layout of all PCB will be explained following section. Pump assembly uses 12v dc motor.



6.6 CIRCUIT OPERATION
Microcontrolleer gets signal from the level sensor .if the Level Sensor signal is “LOW”, it sends signals to the power supply section to ON the relay of solenoid valve 2.this causes the water inflow to the process tank. When the water level reaches “HIGH” the level sensor sends high signal to the micro controller, for this signal micro controller responds by sending signals to the relay of solenoid valve 1 and to the gate pulse generator of pump. When the gate pulse generator gets the signals from the micro controller it generate gate pulses to turn on Triac.when the Triad get turn on, the pump will be set into operation. The current drawn by the motor is compared with the motor is compared with the reference signal, the comparator the signal to the positive signal too the micro controller. If the pump is operated correctly. Otherwise it sends negative signal and the micro controller stops the whole operation. If the comparator signal is positive, micocontroller sends signals to gate pulse generator of Mosfet of LOT. When MOSFET is triggered ON the LOT get 110V input. And give 4000V output. This output igs given to ozone generator. Ozone generator will generate ozone and get mixed with the rotating water, which is in processing tank. After 3 minutes, the micro controller will stop the signal, which were given to the Mosfet of LOT. Then the micro controller will check the signal of level sensor weather the storage tank is high or not. If the storages tank is high the micro controller will; receive negative signal. Otherwise it will receive positive signal. If it receive positive signal it sends signals to relay of solenoid valve 3.otherwise send signals to the LED for the indication of final stage.microcontroller continuously check the input signal from the level sensor.

6.7 OZONISED MINERAL WATER
Ozone is a blue gas with a relative molar mass of 48 and molecular formula of O3.It converts back into oxygen after its oxidizing process. This makes it the most eco-friendly treatment known today. Ozone is the ultimate in disinfections. When drinking water is treated with chlorine (chlorine is a highly carcinogenic chemical), the residual chlorine in water is also consumed along with the water. On the water hand zone, having half the life of only about 20 minutes, unrelated ozone reduces to oxygen, leaving no trace of toxicity in water. The water is free from chlorine. Ozone reacts with impurities such as microorganisms including bacteria, virus, spores, mould, and fungi. As ozone destroys all micro of organisms and it removes disagreeable odors, the resultant water is absolutely safe, pure, fresh and healthy. Ozonised water is colorless and odourless. The advantage of the use of ozone in water is that it does not leave a dangerous chemical residue like many conventional treating chemicals.



6.8 INITIALISATION PROCEDURE
The system is initialized in two steps using six-pole dipswitch. The initialization method was shown in table 3.1 and 3.2.First step is to set the processing time and air drier capacity. Second step is to set the reprocessing interval, model and reprocessing time. This step is not effective during normal operation.

6.8.1 First step
1. Put the power OFF
2. Set Switch 1 ON
3. Set Switches 3 and 4 according to processing time

For 3 min. 3-OFF 4-OFF
For 4 min. 3-ON 4-OFF
For 5 min 3-OFF 4-ON
For 6 min 3-ON 4-ON
4. Set switches 5 and 6 to program air drier capacity
For 60 hrs. 5-ON 6-ON
For 70hrs. 5-OFF 6-ON
For 80hrs. 5-OFF 6-OFF
For 100hrs. 5-ON 6-OFF
5. After setting switches 3,4,5 and 6 as per, the requirement, put the power ‘ON’. In Two seconds ‘safe water’ green LED lights ON.
6. Put the power OFF.



6.8.2 Second step
1. Put the power OFF
2. Set switches 1 and 2 ON
3. Set switches 3 and 4 as per the required reprocessing interval
4. Set switches 5 and 6 to configure the model
a) For wd2, wd4 5-OFF 6-OFF
b) For lwd2, lwd3, lwd4 5-ON 6-OFF
At jumper j1 2 & 3 short
c) For m+wd2, m+wd3, m+wd4 5-ON 6-OFF
J1 2 & 3
d) For double tank models
At jumper j1 & 2short 5-OFF 6-ON
5.Now put the power OFF
6.All the six switches are put OFF
The initialization is over. Now the switches 3,4,5 and 6 are set again as per the required again as per the processing time and air drier capacity.


6.9 HEAT WATER SECTION
The fig 6.4.shows the functional block diagram of the heater sections. It consists of three sections. They are relay, thermostat, and heater. Get input from microcontroller. Microcontroller sends signals regarding the signals from level sensor. T protects the heater from heating of heater without water. So those, relay action is necessary to protect the heater from burning. The section with in dashed lines should be sinking in water. Thermostat is used to keep the temperature level at specified level. We can change the temperature level as per our required. Heater is supplied with separate power supply. The supply level is 230v ac.



CHAPTER 7
CONCLUSION
As all we know that water is the ultimate source of life, we made a project which gives pure water at all times .the project will be in good mode in the Salem zone only. When the project is placed out of the Salem zone, the purity of the water will be low as the underground water contents will from one place to other place. Particularly, it is designed to purify the Salem zone underground water. So, this project5 can be made usable at all places with Best efficiency, by establishing REVERSE OSMOSIS with this project. The overall cost of this project is Rs .7000 /- only.

Monday, September 24, 2007

MICRO CONTROLLER BASED AUTOMATED SOLAR VEHICLE

MICRO CONTROLLER BASED AUTOMATED SOLAR VEHICLE

ABSTRACT

During last two decades, Robotics applications have received increasing attention in manufacturing industries and transportation systems. In industries many applications have been proposed, however most of them are still under investigation or in the development stage. Most of the researches are based on the non-renewable sources to control the robot. Since non-renewable sources are in scarce today, as a different approach the project is based on control of robot using renewable sources, the renewable source is employed in this paper is solar energy.

Since solar energy is the most available energy at all times. This project MICRO CONTROLLER BASED AUTOMATED SOLAR VEHICLE is done for the transportation of loads in industries by employing mankind and also automatic process.

CHAPTER 1
INTRODUCTION


1.1 GENERAL
Robots have been increasingly used to develop more efficient schemes for the industrial operation, control and management. The applications are mainly for controllers; however there are also exist many other areas such as prediction, diagnosis, optimization and planning. In this paper how the vehicle is operated by mankind using solar energy is clearly explained and how the solar vehicle is operate automatically employing micro controller is also explained in clear cut manner. This paper reveals the usage of solar energy and robot for industrial purpose.

The mechanical design of the vehicle involves two front wheels and two back wheels. The driving force for this vehicle is obtained from the motor rotates the back wheel moves, which in turn drives the vehicle. The whole mechanical construction of our solar vehicle is made in plastic in order to reduce the weight.

CHAPTER 2
BLOCK DIAGRAM





2.1 SOLAR PANEL
The above block diagram fig (2.1) illustrates the blocks of our project. At first solar panel. A number of solar cell modules connected together to form an assembly called a solar panel. In this, a number of solar cells are connected in series or parallel to obtain a desired voltage and current rating respectively.

2.2 CHARGE CONTROLLER
The solar panel gives a DC output, this DC output is not always a constant, there is a variation in this output and cannot be given to the battery as it may reduce the life of the battery. So in order to get constant DC output and also to avoid the reverse flow of current to the panel the charge controller is connected. It also acts as a blocking diode which lets the array generated power flow only towards the battery or grid. With out the blocking diode the battery would discharge back through the solar array during times of no insulation.

2.3 MICRO CONTROLLER
Micro controller is an electronic chip that incorporates the software written for the specific task. The microprocessor, which has been combined with Read only Memory (ROM), Read Access Memory (RAM) and input, output facilities on a single chip, is commonly referred to as micro controller. The highest performance of Real Time Control (RTC) application have employed 16 and 32 bit microns together with interrupt handles chip, programmable timer chip, read access memory and read only memory to achieve what can now be achieved in a single of the art micro controller chip. In our project micro controller used for given the time delay and change the current direction of the DC motor.

2.4 ENERGY CONVERTER
The energy converter device, which we are using in our project, is DC series motor. The motor has high starting torque. The weight of the vehicle acts as load to the motor initially. So this leads to necessity of high starting torque which replaced other DC motors from DC series motor. Cutting of the supply unit does the braking system for the DC motor manually.

2.5 STORAGE DEVICE

Batteries are used for the storage of excess solar energy converted into electrical energy. To be economically attractive the storage of solar electrical requires a battery with a particular combination of properties such as low cost, long life, high reliability, high efficiency, low discharge, and minimum maintenance. In our project uses Lead-Acid battery for the storage of the electrical power. This type has longer life and higher efficiency in power systems.

CHAPTER 3
SOLAR PANEL

3.1 GENERAL
A number of solar cell modules connected together to form an assembly called as a solar panel. In this a number of solar cells are connected in series or parallel to obtain a desired voltage and current rating. When sunlight is incident on solar panel the solar radiation is converted to D.C electricity without thermodynamic form. This works on the principle of photovoltaic effect. This project incorporates the use of a flat plate solar collector for receiving the solar radiation. Photovoltaic conversion has been receiving greater priority nowadays since they are not dependent on fossil fuels and are non-polluting.

3.2 SOLAR COLLECTORS
A solar collector is a device designed to absorb incident solar radiation and to transfer the energy to a fluid passing in contact with it. Utilization of solar energy requires solar collectors. There are two general types.

Ø Flat plate collector
Ø Focusing collector
Solar collectors may be classified according to their collecting characteristics, the way in which they are mounted and the type of transfer fluid they employ.



3.3 CHARACTERISTICS OF SOLAR COLLECTORS
3.3.1 Collecting Characteristics
A non-concentrating or ‘flat-plate’ collector is one in which the absorbing surface for solar radiation is essentially flat with no means for concentrating the incoming solar radiation. A concentrating or ‘focusing collector is one which usually contains reflectors or employs other optical means to concentrate the energy falling on the aperture on to a heat exchanger of surface area smaller than the aperture.

3.3.2 Mounting
A collector can be mounted to remain stationary, be adjustable as to tilt angle to follow the change in solar declination or be designed to track the sun. Employing either an equatorial mounting or an altazimuth mounting, for the purpose of increasing the absorption of the daily solar irradiation does tracking.

3.3.3 Types of fluid
A collector will usually use either a liquid or a gas as the transfer fluid. The most common liquids are water or a water-ethylene glycol solution. The most common gas is air.

3.4 FLAT-PLATE COLLECTORS
Flat plate solar collector is used in out project. It may be divided into two main Classifications based on the type of heat transfer fluid used.
1) Liquid heating collectors
2) Air or Gas heating collectors


3.4.1 Liquid Heating Collector
It basically consists of a flat surface with high absorption for solar radiation, called the absorbing surface. Typically a metal plate, usually of copper, steel, or a aluminium material with tubing of copper in thermal contact with the plates, are the most commonly used materials. The absorber plate is usually made from a metal sheet 1 to 2 mm in thickness, while the tubes, which are also of metal, range in diameter from 1 to 1.5cm. They are soldered, brazed or clamped to the bottom of the absorber plate with the pitch ranging from 5 to 15cm. In some designs, the tubes are also in line and integral with the absorber plate.

3.4.2 Air Collector
Flat plate collector where an air stream is heated by the backside of the collector plate. Fins attached to the plate increase the contact surface. The backside of the collector is heavily insulated with mineral wool or some other material. The most favourable orientation, of a collector, for heating only, is facing due south at an inclination angle to the horizontal equal to the latitude plus 15 degree.

3.5 ADVANTAGES OF FLAT PLATE COLLECTORS
· No complicated tracking mechanisms are involved.
· Construction is relatively simple.
· They are easily manufactured.

3.6 FOCUSING COLLECTORS
Focusing collector is a device to collect solar energy with high intensity of solar radiation on the energy-absorbing surface. Such collectors use optical system in the form of reflectors or refractors

3.7 ADVANTAGES OF FOCUSING COLLECTORS
· Reflecting surfaces requires less material.
· The insolation intensity is greater than flat plate collector.
· The initial installation cost of the system can be regained.
· Little or no antifreeze is required.

3.8 DISADVANTAGES OF FOCUSING COLLECTORS
· Out of the beam and diffuse solar radiation, components, only beam component is collected in case of focusing collectors because diffuse component cannot be reflected and is thus lost.
· Costly orienting systems have to be used to track the sun.
· Additional requirements of maintenance particularly to retain the quality of reflecting surface against dirt, weather, oxidation etc.
· Additional optical losses.
· Non-uniform flux on the absorber whereas flux in flat-plate collectors is uniform.

3.9 ESTIMATION OF DIRECT AND DIFFUSED RADIATION
The solar radiation is not always constant. It varies in different columns. According to the clouds we have different solar radiation that is
Ø During days with no clouds
Ø During cloudy days

3.9.1 During Days with No Clouds
When solar radiation enters the atmosphere some of it is absorbed, some is scattered and the rest penetrates the atmosphere. The penetrated rays are called direct radiation while that part of the scattered rays that reach the earth is called diffused radiation. The term diffused radiation means the relatively short wavelength radiation coming from the sky and not from atmospheric thermal radiation, which has much longer wavelengths than the scattered sky radiation, which has much longer wavelengths than the scattered sky radiation. Both types of radiation are affected by the atmospheric ozone content, water vapour content, dust content and the solar altitude and other radiation depleting agents also affect them. Liu and Jordon found in 1960, that in dust free localities and with minimum water vapour content in the atmosphere the diffuse and the direct radiation varied with each other in a linear way and both of them are functions of the air mass. He have suggested the following formulae, for cloudless and dust free localities.
td =0.2710 –0.2939tD
td =0.3840 –0.4160tT
Where td Is the transmission coefficient for diffuse radiation
tD Is the ratio of direct radiation to extra terrestrial intensity of solar Radiation.

3.9.2 During cloudy days
Sharma and Pal proposed the following formula for the calculation of direct and diffuse solar radiation on horizontal surface

Where
H total solar radiation
a Solar altitude in degrees
CN clearance numbers
0.0 to 0.5 for cloudy and overcast atmosphere
0.5 to 0.7 for hazy atmosphere
0.7 to 1.1 for clear atmosphere
1.1 to 1.3 for very clear atmosphere
K & A are constants. It’s values are shown in table (3.1).


3.10 SOLAR RADIATION DATA
Measurements of solar radiation are important because of the increasing number of solar heating and cooling applications, and the need for accurate solar irradiation data to predict performance. Solar radiation data are available in several forms and should include the following in formations.
Ø Whether they are instantaneous measurement or values integrated over some period of time (usually hour or day)
Ø The time or time period of the measurements
Ø Whether the measurements are of beam, diffuse or total radiation, and the instrument used
Ø The receiving surface orientation (usually horizontal, it may be inclined at a fixed slope or normal)
Ø If averaged, the period over which they are averaged (e.g., monthly average of daily radiation)
The principal characteristics of the sun are
Ø Mass M= (1.991 + 0.002) * 1030 kg
Ø Radius R= (6.960 + 0.001) * 108 m
Ø Average density r= 1.410 + 0.002 g/cm3
Ø Temperature T= 5762 + 50o K
Ø Average solar energy = 5 KW/m2 per day

3.11 OPERATION OF SOLAR CELL
A solar cell consists of a semiconductor device that takes advantage of the Photovoltaic effect. The Photovoltaic effect can be described easily for p-n junction in a semiconductor. In an intrinsic semiconductor such as silicon, each one of the four valence electrons of the material atom is tied in a chemical bond, and there are no free electrons at absolute zero. If a piece of such a material is doped on one side by a five valence electron material, such as arsenic of phosphorus, there will be an excess of electrons in that side, becoming an n-type semi-conductor. The excess electrons will be practically free to move in the semi conductor lattice.








3.10 SOLAR RADIATION DATA
Measurements of solar radiation are important because of the increasing number of solar heating and cooling applications, and the need for accurate solar irradiation data to predict performance. Solar radiation data are available in several forms and should include the following in formations.
Ø Whether they are instantaneous measurement or values integrated over some period of time (usually hour or day)
Ø The time or time period of the measurements
Ø Whether the measurements are of beam, diffuse or total radiation, and the instrument used
Ø The receiving surface orientation (usually horizontal, it may be inclined at a fixed slope or normal)
Ø If averaged, the period over which they are averaged (e.g., monthly average of daily radiation)
The principal characteristics of the sun are
Ø Mass M= (1.991 + 0.002) * 1030 kg
Ø Radius R= (6.960 + 0.001) * 108 m
Ø Average density r= 1.410 + 0.002 g/cm3
Ø Temperature T= 5762 + 50o K
Ø Average solar energy = 5 KW/m2 per day

3.11 OPERATION OF SOLAR CELL
A solar cell consists of a semiconductor device that takes advantage of the Photovoltaic effect. The Photovoltaic effect can be described easily for p-n junction in a semiconductor. In an intrinsic semiconductor such as silicon, each one of the four valence electrons of the material atom is tied in a chemical bond, and there are no free electrons at absolute zero. If a piece of such a material is doped on one side by a five valence electron material, such as arsenic of phosphorus, there will be an excess of electrons in that side, becoming an n-type semi-conductor. The excess electrons will be practically free to move in the semi conductor lattice.








When the other side of the same piece is dopped by a three valence electron material, such as boron, there will be deficiency of electrons leading to a p-type semiconductor this is shown in fig (3.1). This deficiency is expressed in terms of excess of holes free to move in the lattice. Such a piece of semi conductor, with one side of the p type and other of the n-type is called a p-n junction. In this junction after the photons are absorbed, the free electrons of the n side will tend to flow to the p-side, and the holes of the p-side will tend to flow to the n-region to compensate for their respective deficiencies. This diffusion will create an electric field Ef from the n-region to the p-region. This field will increase until it reaches equilibrium for Ve, the sum of the diffusion potentials for holes and electrons.
If electrical contacts are made with the two semiconductor materials and the contacts are connected through an external electrical conductor, the free electrons will flow from the n-type material through the conductor to the p-type material. Here the free electrons will enter the holes and become bound electrons: thus both free electrons and holes will be removed. The flow of electrons through the external conductor constitutes an electric current, which will continue as long as more free electrons and holes are being formed by the solar radiation. This is the basis of Photovoltaic conversion that is, the conversion of solar energy into electrical energy. The combination of n-type and p-type semiconductors thus constitutes a Photo voltaic cell or solar cell. All such cells generate direct current, which can be converted into alternating current if desired.

3.12 APPLICATION OF SOLAR SYSTEM
· Water pumping
· Radio beacons for ship navigations at ports
· Community radio and television sets
· Cathodic protection of oil pipe lines
· Weather monitoring
· Railway signaling equipment
· Battery charging
· Street lighting
· Battery car




3.13 ADVANTAGES OF PHOTO VOLTAIC SOLAR ENERGY
CONVERSION
· Direct room temperature conversion of light to electricity through a simple solid-state device.
· Absence of moving parts.
· Ability to function unattended for long periods as evidence in space programmed.
· Modular nature in which desired currents, voltages and power levels can be achieved by mere integration.
· Maintenance cost is low as they are easy to operate.
· They do not create pollution.
· They have a long effective life.
· They are highly reliable.
· They consume no fuel to operate, as the sun’s energy is free.
· They have rapid response in output to input radiation changes; no long time constant is involved, as on thermal systems, before steady state is reached.
· They have wide power handling capabilities from microwatts when modules are combined into large area arrays. Solar cells can be used in combination with power conditioning circuitry to feed power into utility grid.
· They can be used with or without sun tracking, making possible a wide range of application possibilities.



3.14 DISADVANTGES
Following are the main disadvantages of photovoltaic solar energy conversion.
· Distributed nature of solar energy
· Absence of energy storage
· Relatively high capital cost.



CHAPTER 4
CHARGE CONTROLLER

4.1 GENERAL
The solar panel gives a D.C output, this D.C output is not always a constant, there is a variation in this output and cannot be given to the battery as it may reduce the life of the battery. So in order to get constant D.C output and also to avoid the reverse flow of current to the panel the charge controller is connected. A 24V D.C to the battery and also it acts as a blocking diode. Which lets the array generated power flow only towards the battery or grid. Without a blocking diode the battery would discharge back through the solar array during times of no insolation.

4.2 OPERATION OF CHARGE CONTROLLER
A charge controller when fully charged has a voltage of 14.5v. When a controller is being charged there is no LED indication. When the battery is over charged then the LED marked HIGH glows and this automatically stops further charging of the battery and thus stops the battery from getting over charged. When the battery is undercharged then the LED marked as LOW glows and the controller disconnects the battery from the load and thus prevents it from getting deeply discharged. To prevent the discharge of the discharge of the battery through SPV panel during overcast days a blocking diode is provided. The blocking diode is an ordinary diode only if its ford were biased thus it allows only one flow. Only from the DC panel to the battery if the charge tries to flow from battery to panel then it is reverse biased and hence does not conduct.

CHAPTER 5
BATTERIES

5.1 GENERAL
In isolated systems away from the grid, batteries are used for the storage of excess solar energy converted into electric energy. The only exceptions are isolated sunshine load such as irrigation pumps or drinking water supplies for storage. In fact for small units with output less than one kilowatt. Batteries seem to be the only technically and economically available storage means. Since both the photovoltaic systems and batteries are high in capital costs. It is necessary that the overall system to be optimized with respect to available energy and local demand pattern.
Ø Low cost
Ø Long life
Ø High reliability
Ø High overall efficiency
Ø Low discharge
Ø Minimum maintenance
· Ampere hour efficiency
· Watt hour efficiency
We use lead acid battery for storing the electrical energy from the solar panel. Lead acid cells are explained below.

5.2 LEAD ACID WET CELL
Where high values of load current are necessary, the lead acid cell is the type most commonly used. The electrolyte is a dilute solution of sulphuric acid (H2SO4). In the application of battery power to start the engine in an automobile, for example, the load current to the starter motor is typically 200 to 400A.
One cell has a nominal output of 2.1V, but lead acid cells are often used in a series combination of three for a 6V battery and six for a 12V battery. The lead acid cell type is a secondary cell or storage cell, which can be recharged. The charge and discharge can be repeated many times to restore the output voltage, as long as the cell is in good physical condition. However, heat with excessive charge and discharge currents shorten the useful life to about 3 to 5 years for an automobile battery. Of the different types of secondary cells, the lead acid type has the highest output voltage, which allows fewer for a specified battery voltage.

5.3 CONSTRUCTION
Inside a lead acid battery, the positive and negative electrodes consist of a group of plates welded to a connecting strap. The plates are immersed in the electrolyte, consisting of 8 parts of water to 3 parts of concentrated sulphuric acid. Each plate is a grid or framework, made of a lead-antimony alloy. This construction enables the active material, which is lead oxide, to be pasted into the grid. In manufacture of the cell, a forming charge produces the positive and negative electrodes. In the forming process, the active material in the positive plate is changed to lead peroxide (Pbo2). The negative electrode is spongy lead (Pb).
Automobiles batteries are usually shipped dry from the manufacturer. The electrolyte is put in at the time of installation, then the battery is charged to form the plates. With maintenance-free batteries, little or no water need be added in normal service. Some types are sealed, except for a pressure vent, without provision for adding water.
5.4 CHEMICAL ACTION
Sulphuric acid is combination of hydrogen and sulphate ions. When the cell discharges, lead peroxide from the positive electrode combines with H2 ions to form water and with sulfate ions also produces the sulfate. Therefore, the net result of discharge is to produce more water, which dilutes the electrolyte, and to form lead sulfate on the plates.
As the discharge continues, the sulfate fills the pores of the grids, retarding circulation of acid in the active material. Lead sulfate is the powder after seen on the outside terminals of old batteries. When the combination of weak electrolyte and sulfating on the plate lowers the output of the battery, charging is necessary.
On charge, the external D.C source reverses the current in the battery. The reversed direction of ions flows in the electrolyte result in a reversal of the chemical reactions. Now the lead sulfates on the positive plate reactive with the water and sulfate ions to produce lead peroxide and sulphuric acid. This action re-forms the positive plates and makes the electrolyte stronger by adding sulphuric acid. At the time, charging enables the lead sulfate on the negative plate to react with hydrogen ions; this also forms sulphuric acid while reforming lead on the negative electrode. As a result, the charging current can restore the cell to full output, with lead peroxide on the positive plates, spongy lead on the negative plate, and the required concentration of sulphuric acid in the electrolyte. The chemical equation for the lead-acid cell is
Charge
Pb+PbO2+2H2SO4 2PbSO4+2H2O

Discharge

On discharge, the Pb and PbO2combine with the so4 ions at the left side of equation to form lead sulfate (Pbso4) and water (H20) at the right of the equation. One battery consists of 3 cells, each have an output voltage of 2.1V, which are connected in series to get a voltage of 6V and the same 6V battery is connected in series, to get a 12V battery. They are placed in the waterproof iron casing box.

5.5 CHARGING THE LEAD ACID BATTERY
An external D.C voltage source is necessary to produce current in one direction. Also, the charging voltage must be more than the battery emf. Approximately 2.5 per cell are enough to over the cell emf so that the charging voltage can produce current opposite to the direction of discharge current.
Note that the reversal of current is obtained just by connecting the battery VB and charging source VG with + to + and – to -. The charging current is reversed because the battery effectively becomes a load resistance for VG when it higher than VB. A commercial charger for automobile batteries is essentially a D.C. power supply, rectifying input from the AC power line to provide D.C output for charging batteries.
Float charging refers to a method in which the charger and the battery are always connected to each other for supplying current to the load. The charger provides current for the load and current necessary to keep the battery fully charged. The battery here is an auxiliary source for D.C power.





CHAPTER 6
THE 8051 MICROCONTROLLER

6.1 GENERAL
Intel Corporation introduced 8051 micro controllers in the year 1981.It is an 8-bit micro controller with Harvard Architecture manufactured by advanced CMOS processes. It has 128 bytes of on chip RAM, 4k bytes of on chip ROM, two 16-bit timers/counters, four 8-bit ports of which one is a serial port, etc. There are 6 interrupt sources also.
Since this is an 8-bit micro controller, the CPU can work on only 8 bits of data at a time. Data larger than 8 bits has to be broken down to 8 bit pieces. Though it has an addressing capability of 64kbytes, only 4k bytes have been provided on chip.
8051 is available in different memory types, such as UV-EPROM, FLASH, and NV-RAM. The UV-EPROM version of 8051 is the 8751. This chip has only 4k bytes of on chip UV-EPROM. To use this chip for development requires access to a PROM burner, as well as a UV-EPROM inside the 8751 chips before you can program it again. It takes about 20 minutes to erase the 8751 before it can be programmed again. This led to introduce FLASH and NV-RAM version of 8051.
Philips Corporation’s P89c51Rd2 is a low-power, high performance CMOS 8-bit microcomputer with 4k bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Phillips high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pin out. 89C51 is used in place of 8751 to eliminate the waiting time needed to erase the chip and thereby speed up the development time the development system requires a ROM burner that supports flash memory. The entire contents of ROM should be erased in order to program it again; the PROM burner itself does this. The 89C51 Flash reliably stores memory contents even after 10,000 erase and program cycles. AT89C51 is a popular chip of this category from Philips Corporation.
Another popular version of 8051 is DS5000 chip from Dallas Semiconductor. The on chip ROM is in the form of NV-RAM. The read/write capability of NV-RAM allows the program to be loaded into the on chip ROM while in the system. This can be done via a serial port of a PC. Another advantage of NV-RAM is the ability to change the ROM contents one byte at a time. The entire ROM must be erased before programmed again in the case of UV-EPROM and flash memory.
There is also OTP (One Time Programmable) version of the 8051 available from different sources. Flash and NV-RAM version are typically used for product development. When a product is designed and finalized, the OTP version of the 8051 is used for mass production since it is much cheaper in terms of price per unit.
There are two other members in the 8051 families of micro controllers. They are the 8052 and the 8031. 8031 is often referred to as ROM-less 8051 since it has 0k bytes of on chip ROM. To use this chip we must add external ROM to it. The ROM containing the program attached to the 8031 can be as large as 64k bytes. For adding external ROM two ports are needed out of 4 ports, leaving only 2 ports for I/O operations. To solve this, external I/O ports like 8255 can be added to 8031.


6.2 GENERAL INSTRUCTION FOR PROJECT IN 8951

Four port (P0, P1, P2 & P3) are used for communicate the external world, entire ports are used for either input or output it is your choice. For simple application that is no interrupt, no serial communication don’t care about multifunctional pins.
Biasing voltage of the Micro controller is 5v. For that purpose IC7805regulator is connected to 40th pin and grounded by 20th pin.
User programming area is 4Kbyte from origin. Without any interrupt you can use entire 4Kbyte otherwise the interrupt area is segmented. Flash memory is not enough of your project you can add the external memory. The external and internal memory is desired by the 31st pin (EA) if 31st pin is high the internal program is executed otherwise the external program is executed.
Speed of operation is depends on clock frequency, which is external controlled. The interaction between micro controller speed and user is making by 18th & 19th pin (XTAL2 & XTAL1). The 2 pins are connected through the crystal oscillator and grounded by capacitors. The general rating of the crystal oscillator is 12MHZ and capacitor is 33PF.
Rest switch is connected to the 9th pin in 89C51.When you need rest the program just press the switch. No connection for simple without external memory interface circuit in 29th and 30th pin. Because for external memory interface the address latch is needed one, when ALE pin is high the address latched after one T cycle the data is transferred. Response of the ALE is connected to output enable in the latch IC’s. So simple application there is no need to utilities ALE pin features.


6.3 80C51 8-BIT FLASH MICRO CONTROLLER FAMILY
The P89C51RB2/RC2/RD2 device contains a non-volatile 16KB/32KB/64KB Flash program memories that are both parallel programmable and serial In-System and In-Application Programmable. In-System Programming (ISP) allows the user to download new code while the micro controller sits in the application
In-Application Programming (IAP) means that the micro controller fetches new program code and reprograms itself while in the system. This allows for remote programming over a modem link.
A default serial loader (boot loader) program in ROM allows serial In-System programming of the Flash memory via the UART without the need for a loader in the Flash code. For In-Application Programming, the user program erases and reprograms the Flash memory by use of standard routines contained in ROM. This device executes one machine cycle in 6 clock cycles, hence providing twice the speed of a conventional 80C51. An OTP configuration bit lets the user select conventional 12-clock timing if desired. This device is a single-chip 8-bit micro controller manufactured in advanced CMOS process and is a derivative of the 80C51 micro controller family. The instruction set is 100% compatible with the 80C51 instruction set.
The device also has four 8-bit I/O ports, three 16-bit timer/event counter, a multi-source, and four-priority-level, nested interrupt structure, an enhanced UART and on-chip oscillator and timing circuits. The added features of the P89C51RB2/RC2/RD2 makes it a powerful micro controller for application that require pulse width modulation, high-speed I/O and up/down counting capabilities such as motor control.

6.4 FEATURES
Ø 80C51 Central Processing Unit
Ø On-chip Flash Program Memory with In-System
Ø Programming (ISP) and In-Application Programming (IAP) Capability
Ø Boot ROM contains low level Flash Programming routines for downloading via the UART
Ø Can be programmed by the end-user application (IAP)
Ø Parallel programming with 87C51 compatible hardware Interface to programmer
Ø 6 clocks per machine cycle operation (standard)
Ø 12 clocks per machine cycle operation (optional)
Ø Speed up to 20 MHZ with 6 clocks cycles per machine cycle
Ø Speed up to 33 MHZ with 12 clocks per machine cycle
Ø Fully static operation
Ø RAM expandable externally to 64 Kbytes
Ø 4 level priority interrupt
Ø 7 interrupt sources
Ø Four 8-bit I/O ports
Ø Full-duplex enhanced UART
Ø Framing error detection
Ø Automatic address recognition
Ø Power control modes


6.5 IN-SYSTEM PROGRAMMING (ISP)

The In-System Programming (ISP) is performed without removing the micro controller from the system. The In-system Programming (ISP) facility consists of a series of internal hardware resources coupled with internal firmware to facilitate remote programming of the 89C51Rx+ through the serial port. This firmware is provided by Philips and embedded within each 89C51Rx+ device.
The Philips In-System Programming (ISP) facility has made in-circuit programming in an embedded application possible with a minimum of additional expense in components and circuit board area. The ISP function uses five pins: TxD, RxD, VSS, VCC, and VPP. Only a small connector needs to be available to interface your application to an external circuit in order to use this feature. The VPP supply should be adequately and VPP not allowed exceeding datasheet limits.


6.6 DIFFERENT TYPES OF MICRO CONTROLLER
There are two different types of micro controller that is
Ø Embedded Micro controllers
Ø External Memory Micro controllers

6.6.1 Embedded Micro controllers
When all the hardware required running the application is provided on the chip, it is referred to as an embedded micro controller. All that is typically required to operate the device is power, reset, and a clock. Digital I/O pins are provided to allow interfacing with external devices.
6.6.2 External Memory Micro controllers
Sometimes, the program memory is insufficient for an application or, during debug, a separate ROM would make the work easier. Some micro controllers allow the connection of external memory. An external memory micro controller seems to primarily differ from a microprocessor in the areas of built-in peripheral features. These features could include memory device selection, timers, interrupt controllers, DMA, and I/O devices like serial ports.

6.7 INTERRUPTS
Interrupts are defined as requests because they can be refused (or masked). If they are not refused, then when an interrupt request is acknowledged (either by you or a computer), a special set of events or routines are followed to handle the interrupt. Interrupts are usually lumped into the category of things that are best left alone until expert status is attained.
This is very unfortunate because interrupts can be very useful in applications, allowing the code to respond much more quickly to input stimulus, and can make the code simpler as well as shorter than an application “polling” the inputs and responding when a change is detected. All of these attributes make using interrupts attractive for working in devices like the 8051, which has a limited amount of control store and will run at a set speed.
These special routines are known as interrupt handlers or interrupt service routines and are located at a special location in memory. The mainline code does not resume executing until the interrupt has finished being service and the processor indicates that the originally executing function can resume.
There are three different ways that you could respond, each one analogous to how interrupts are handled in a computer system.
· Handling the interrupt is to ignore it
· Responding to the interrupts
· Handling an interrupt is to process as it comes in
When an interrupt request is acknowledged by a computer system, the following actions are taken to service the interrupt.
· Save the context register information
· Reset the hardware requesting the interrupt
· Reset the interrupt controller
· Process the interrupt
· Restore the context information
· Return to the previously executing code (the mainline)

6.8 TIMERS
One of the most critical functions required by all computer systems is a timer. Along with providing real-time information interrupts to the processor, timers used in micro controllers also provide a number of other tasks helpful in the operation of the application. A basic computer timer consists of a counter that can be read from or written to by the processor and is driven by some constant frequency source. A typical enhancement is to provide an interrupt request from an overflow. The counter’s clock source is typically either the micro controller’s clock or an external source.





Fig (6.1)
To measure pulse widths, an external control or gate input is used as shown in fig (6.1). It is to mask the clock source except when the pulse is active. When the gate becomes high, the counter’s clock source is allowed to increment the counter. When the pulse becomes inactive, the counter’s clock source is masked and an interrupt is requested to allow the application to read the counter value that is proportional to the width of the pulse. If the count overflows during the active pulse, the processor is also notified via an interrupt request, and it can increment a word counter used for sensing the pulse width. To determine the interval between overflows, the following formula is used:


Interval = (max count - reload) / clock frequency




Where
CountMax is the overflow value of the counter
ClockFreq is the frequency
The 8051 have two 8/16-bit timers that can run in four different modes.
Ø Mode 0
Ø Mode 1
Ø Mode 2
Ø Mode 3
The clock source can either be the instruction clock or an external source. The timer registers can be read from or written to at any time, including when the timer is running. An interrupt request can be generated by the timer hardware when the timer overflows. Each of the two-timer’s operation is controlled by 4 bits devoted to it in the timer mode (TMOD) register at address 089h. The gate bit is used as a secondary execution-control bit. If the gate bit is reset, the timer is enabled to run at any time. The timer run control (TRn) bits are located in the TCON register (at address 088h) along with the overflow interrupts request pins.
Timer mode 0 and mode 1 are similar with the timer being configured as either a 13-bit or 16-bit counter. When the timer reaches the limit of the count, the appropriate overflow flag is set, and the counter is reset back to zero. Modes 0 and 1 can also be used to time external events. This is done by setting the gate bit of the TMOD register so that the INTn pin enables and disables the timer running. The timer will run when the INTn pin is high.
For mode 1 (the 16-bit counter), a specific time delay can be created by loading TLn and THn with values derived from the formula:


Init value =TLn + (256 * THn)
It is important to note that, after the overflow flag is set, the timer is loaded with zero and continues counting. To allow asynchronous serial communications to run stably, a programmable interval mode has been provided in the 8051’s timer. This is known as mode 2. In this mode, when TLn overflows, it is reloaded with the value set in THn. The delays between overflows can be calculated from:


Mode 2 works like modes 0 and 1 with software Initvalue reloads, but provides a hardware based reload that does not have any of the cycle uncertainty of implementing the reloads in software. The overflow of Timer 1, when in mode 2, will continue to be passed to the serial port even if the TF1 bit in software. This helps make the serial ports “set and forget”.
Mode 3, TH0 timer uses the Timer1 enable (TR1) and overflow flag (TF1). Because of this translation of timer resources, if Timer0 is in mode 3, then Timer1 is enabled to run all the time except when it is input into mode3. When Timer1 is put into mode3, it will not run. The purpose of implementing mode3 this way in the two timers is to allow Timer1 to be used as the data-rate generator for the serial without requiring any additional resources.


6.9 INDUSTRIAL AUTOMATION
6.9.1 Automation
Automation is technology concerned with the application of mechanical, electronic and computer based systems to operate and control. This technology includes
Ø Automatic positioning
Ø Automatic material handling
Ø Computer systems for data collection and decision making
Ø Feed back control and computer process control
Our project is limited to the field of automatic material handling. In this type of automation an 89C51 micro controller controls the operation. It is capable of interpreting with our robot.

6.9.2 Need for automation
Ø Increase in accuracy and precision
Ø Decrease in safety
Ø Decrease in cost
Ø Decrease in labour force
The purpose of automation is accomplished by using a robot and sensors.

6.9.3 Types of automation
Automation is a technology that is concerned with the use of mechanical, electronics, computer-base systems in the operation and control of industrial automation according to the product variety and production volume. They are
Ø Fixed automation
Ø Programmable automation
Ø Flexible automation

6.9.3.1 Fixed automation
Fixed automation is used when the volume of production is very high and it is therefore appropriate to design specialized equipment to process the produces very efficiently and at high rates.

6.9.3.2 Programmable automation
Programmable automation is used when the volume of production is relatively low and there is variety of products to be made. In this case, the production equipment is designed to be adaptable to variations in the product configuration.

6.9.3.3 Flexible automation
The third category known as the flexible automation is between the fixed automation and the programmable automation. This is also known as “Flexible manufacturing automation” or computer-integrated manufacturing systems. This type of automation has some features of both the fixed automation and programmable automation.


CHAPTER 7 RELAY
7.1 GENERAL
Relays are electromagnetic switches used as protective devices, indicating devices and as transmitting devices. Protective relay protect good component from the effects of the circuit components that have failed. Transmission relay are used in communication systems. Indicating relay may be used to identify a component, which has failed. Transmission relay may be used to identify a component, which has failed.
The relay is one of the most widely used components in industrial electronic. In combination with transistors, electron tubes and other circuit’s elements, this electromagnetic device performs countless tasks. Relays are electro magnetically operated remote controlled switches with one or more sets of contacts. When energized, the relay operates to open or close its contacts or to open some contacts and close others. Contacts, which are opened and close others. Contacts, which are opened when energized, are called “Normally Open” (NO) or simply open contacts. Contacts, which are closed when energized, are called “Normally Closed” (NC) or simply open contacts. Normally open contacts are referred to as “a” contacts. Normally closed contacts are sometimes referred to as “b” contacts.
There are certain terms associated with relays. The relay is said to “pick up” when it is energized and trips, and this “pick up” value is the smallest value of the fluctuating current required to close “a” contact or open “b” contact “b” contact is said to “reset” or “dropout”.
Relay contacts are held in their normal position by either springs or by some gravity-activated mechanism. An adjustment or adjustments are usually provided to set the restraining force to cause the relay to operate within predetermined conditions.

7.2 OPERATION
Relay operate on one of the two different principles namely,
Ø Electromagnetic attraction
Ø Electromagnetic induction
In this project electromagnetic attraction type relays are used which may be either be AC or DC actuated consists of an electromagnet having a core and winding. The core, the armature and plunger are made of magnetic materials such as iron, silicon steel or perrnalloy (an alloy of nickel and steel). The movable contact is fixed on the armature. A spring, whose tension is adjustable, retains the armature closing the stationary and movable contact.
When the electric current is supplied, an electromagnet is formed, and armature is attracted to the core. If there is sufficient current to overcome the restraining force of the spring the relay contact close. The armature will be attracted whether the poles of the electromagnet adjacent to the armature is the north or south. The AC attraction type relay is different from a DC relay in manner that it has a shading ring, whereas the DC relay does not. The shading ring is a non-magnetic device, which is inserted in to a slot cut in the coil and minimizes the tendency of the relay contact to chatter under the influence of the alternation magnetic field.

7.3 AC OPERATION TYPE
For the operation of AC relays, the power source is almost always a commercial frequency (50 or 60Hz) with standard voltages 8,115, and 240VAC. Because of this, when the voltage is other than the standard voltage, the product is a special order item, and the factors of price, delivery, and stability of characteristics may create inconveniences. To the extent that it is possible, the standard voltages should be selected.
Also, in the AC type, shading coil resistance loss, magnetic circuit eddy current loss, and hysteresis loss exit, and because of lower coil efficiency, it is normal for the temperature rise to be greater than that for the DC type. Further more, because humming occurs when below the pick-up voltage and when above the rated voltage, care is required with regard to power source voltage fluctuations .For example, in the case of motor starting, if the power source voltage drops, and during the humming of the relay, if it reverts to the restored condition, the contacts suffer a burn damage and welding, with the occurrence of a false operation self-maintaining condition.
For the AC type, there is an inrush current during the operation time (for these paraded condition of the armature, the impedance is low and a current better than rated current flows; for the adhered condition of the armature, the impedance is high and the rated value of current flows), and because of this, for the case of several relays being used in parallel connection, it is necessary to give consideration to power consumption.

7.4 DC OPERATION TYPE
For the operation of DC relays, standards exist for power source voltage and current, with DC voltage standards set at 5, 6, 12, 24, 48, and 100V, but with regard to current, the values as expressed in Catalogs n milliamperes of pick-up current. However, because this value of pick-up current is nothing more than a guarantee of just barely moving the armature, the variation in energizing voltage and resistance values, and the increase in coil resistance due to temperature rise, must be given consideration for the worst possible condition of relay operation, scary to consider the current value as 1.5 to 2 times the pick-up current.
Also, because of the extensive use of relays as limit devices in place of meters for both voltage and current, and because of the gradual increase or decrease of current impressed on the coil causing possible delay in movement of the contacts, there is the possibility that the designated control capacity may not be satisfied. Thus it is necessary to exercise care. The DC type relay coil resistance varies due to ambient temperature as well as to its own heat generation to the extent of about 0.4%, and accordingly, if the temperature increases, because of the increase in pick-up and drop-out voltages, care is required.

7.5 ENERGIZING VOLTAGE OF AC COIL
In order to have stable operation of the relay, the energizing voltage should be basically within the range of +10%/-15%of the rated voltage. However, it is necessary that the waveform of the voltage impressed on the coil be a sine wave. There is no problem if the power source is commercially provided power, but when a stabilized AC power source is used, there is a waveform distortion due to that equipment, and there is the possibility of abnormal overheating.
By means of a shading coil for the AC coil, humming is stopped, but with a distorted waveform, that function is not displayed below shows an example of waveform distortion. If the power source for the relay operating circuit is connected to the same line as motors, solenoids, transformers, another loads, when these loads operate, the line voltage drops, and because of this the relay contacts suffer the effect of vibration and subsequent burn damage.
In particular, if a small type transformer is used and its capacity has no margin of safety, when there is long wiring, or in the case of household used or small sales shop use where the wiring is slender, it is necessary to take precautions because of the normal voltage fluctuations combined with these other factors. When trouble develops, a survey of the voltage situation should be made using a synchro scope or similar means, and the necessary counter-measures should be taken, and together with this determine whether a special relay with suitable excitation characteristics should be used, or make a change in the DC circuit in which a capacitor is inserted to absorb the voltage fluctuations. In particular, when a magnetic switch is being used, because the load becomes like that of a motor, depending upon the application, separation of the operating circuit and power circuit should be tried and investigated. Sine wave approximate keystone wave Waveform with an included CTR100V AC Switch 24V DC Relay coil.



7.6 RELAY DRIVE BY MEANS OF A TRANSISTOR

7.6.1 Connection method
The voltage impressed on the relay is always full rated voltage, and in the OFF time, the voltage is completely zero for avoidance of trouble






Collector connection (fig 7.1) is the most common connection, because operation is stable. Emitter connection (fig 7.2) when the circumstances make the use of this connection unavoidable, if the voltage is not completely impressed on the relay, the transistor does not conduct completely and operation is uncertain. Parallel connection (fig 7.3) when the power consumed by the complete circuit becomes large, consideration Of the relay voltage is necessary.

7.6.2 Counter measures for surge voltage of relay control transistor
If the coil current is suddenly interrupted, a sudden high voltage pulse is developed in the coil. If this voltage exceeds the voltage resistance of the transistor, the transistor will be degraded, and this will lead to damage. It is absolutely necessary to connect a diode in the circuit as a means of preventing damage from the counter emf. As suitable ratings for this diode, the current should be equivalent to the average rectified current to the coil, and the inverse blocking voltage should be about 3 times the value of the power source voltage.





CHAPTER 8
SAMPLE PROGRAM

MOV p1, #ooh
Mov p2, #00h
Mov p3, #ooh
Mov p0, #ooh
Setb p2.1
Clr p2.5
Acall delay
Setb p2.2
Mov R1, #17
Loop1 Mov R2, #FF
Loop2 acall delay
djnz R2, Loop2
djnz R1, Loop1
Mov p2, #00
Mov R2, #FF
Loop2 Acall delay 0023
djnz R2, Loop2
Setb p2.3
Acall delay
Setb p2.5
Mov R1, #17
Loop1 Mov R2, #FF
Loop2 acall delay
djnz R2, Loop2
djnz R1, Loop1
Mov p2, #00
Here: jump here
Delay:
Mov TMOD, #01
Mov TLO, #FD
Mov THO, #03
Setb TRO
Here:
JNB TFO here, 005B
Clr TRO
Clr TFO
RET





CHAPTER 9 CIRCUIT DIAGRAM



CIRCUIT DESCRIPTION
The photovoltaic cell in the solar panel produces electrical energy from sunlight with the help of photovoltaic effect. This energy is then stored in the lead-acid battery via charge controller. The solar panel gives a D.C output, this D.C output is not always a constant, there is a variation in this output and cannot be given to the battery as it may reduce the life of the battery. So in order to get constant D.C output and also to avoid the reverse flow of current to the panel the charge controller is connected and also it acts as a blocking diode. Which lets the array generated power flow only towards the battery or grid. Without a blocking diode the battery would discharge back through the solar array during times of no insolation. Hence the charge controller gives steady supply of 6V to the battery. The supply from the battery helps to run the D.C motor. The shaft of this motor is in turn connected to the shaft of the wheel. Based upon the motor rotation the wheel rotates either in forward or reverse direction. Thus by the operation of this D.C motor the solar vehicle operates.
In our project, we use 8051-microcontroller families. In this family, we use 89C51 because it has its specific importance over the other types of micro controller family. The stored energy in the battery helps to operate the micro controller chip 89C51. According to our program, this 8951 produces various pulses. This pulse is then given to ULN buffer. This micro controller chip has its control over the relay. The chip 89C51 has four ports. Each port has eight pins with it. To have its control over the relay we use the first four pins of the second port of the chip. The first pin of the second port of the chip 89C51 is connected to relay A, while that of second pin of this port is connected to relay B. This relay A & B are connected to the positive and negative direction of the D.C motor. The third pin of the second port is connected to the relay D, while that of fourth pin of this port is connected to relay C.
The various pulses produced by the micro controller chip operate the relay. The first pulse energizes relay A and B. Both this A and B relay helps in the forward direction of the solar vehicle in a predefined path. After traveling in this path the solar vehicle has it’s braking in the forward direction based upon the program stored in the micro controller chip.
After a certain time delay the opposite pulse ready to energies the relay C and D. Both this relay C and D helps in the reverse direction of the solar vehicle in the same predefined path. The vehicle as it’s braking the reverse direction same as that of the forward direction. Again after certain time delay the solar vehicle moves in the forward direction. Thus this forward and reverse process after certain time delay is continued.

CHAPTER 10

APPLICATIONS OF OUR PROJECT

· In Airport
· In Industry
· In Army
· In Railway Station
· In Library

CHAPTER 11

CONCLUSION
The world has seen great inventions right from small atoms to cursing missiles, rocket, and planes. But these inventions had indirectly affected the environment in one (or) more ways, apart from their glorious, unimaginable use to the environment. The pollutions of air were one of the most concern things in the world. Here the solar energy comes as a replacement for the other resources. Because of its non-pollution, simplicity, easy availability, less costs etc. Our vehicle, which is powered by solar energy, brings enormous amount of advantageous to the world. So we conclude that in the fast charging world where speed and accuracy remains a main concern apart from non-pollution of the environment, solar vehicle provides all the advantageous to create a clean, green and healthy environment. The next generation will have the atmosphere, which is free pollutants, and harmful substances, which make the world a joyous place to live.