Anda di halaman 1dari 28

INDEX

Introduction Circuit Diagram Circuit Description Component Description PCB Layout Description of Discrete Component Soldering

-1-

Introduction

-2-

INTRODUCTION
The main purpose of this project is to develop an automatic irrigation system which switches the "pump motor ON and OFF on sensing the moisture content of the soil. As we know that the use of -.proper method of irrigation is very important in the field of agriculture. The main advantage of using this technique is to decrease the human intervention and still make certain appropriate irrigation systems. Here in this project we are using an 8051 series AT89S52 microcontroller which is programmed to receive the input signal of varying moisture circumstance of the soil through the sensing arrangement. This operation is" obtained by configuring an op-amp as a comparator which acts as interface between the sensing arrangement and the microcontroller. Once the controller receives this signal, it generates an output that drives a relay for operating the water pump. An LCD display is also interfaced to the microcontroller to display status of the soil and water pump. The sensing arrangement is made by using two stiff metallic rods inserted into the field at a distance. Connections from the metallic rods are interfaced to the control unit.

-3-

Circuit Diagram

-4-

CIRCUIT DIAGRAM

-5-

Circuit Description

-6-

CIRCUIT DESCRIPTION
Microcontroller (AT89Sxx) The full circuit of the automatic irrigation SYS is shown in circuit diagrammed. The brain of the system is the Atmel AT89S52 micro controller (U1). The micro controller examines incoming signals on Port PO and controls the outputs over port P2. The microcontroller output is not sufficient to drive the Relay, so Relay driver Transistor is required for Relay Controlling & operation. AT89S52 MCU is one of the 8051-based micro controllers from ATMEL.

MCU Cock Clock signal for the micro controller provided by crystal Y1 (11.0592 MHZ) and two 33PF (C2, C3) capacitors hanging off it ensure correct loading for the crystal, so that it starts reliably.

MCU Reset (Power on reset is provided by R2 and C1. The 89S52 micro controller has an active high reset signal

Soil Moisture Sensor The inverting input of a comparator is given to a fixed voltage through the regulated power supply and the non inverting input of the comparator is pulled down and is also given to moisture sensing arrangement at sensing terminal. When

-7-

the soil is dry, the soil resistance between the positive supply and the non inverting input is high resulting in voltage to the non-inverting input less than the inverting input making comparator output going logic low. This command is given to controller. In this condition the output of the controller is logic high that switches ON a relay driving transistor due to which the relay is switched on and the pump motor is in ON condition. Thus water flow is started.

Relay Interface A single pole dabble throw (SPOT) relay is connected to port P27 (pin 28) of the micro controller through a driver transistor (Q1). The relay requires 12 volts at a current of around 100 ma, which cannot provided by the micro controller. So the driver transistor is added. I The relay is used to operate the external Water pump, solenoid valve or any other electrical device ETC.

LCD Interface The dot-matrix liquid crystal display controller and driver LSI displays alphanumeric, characters, and symbols. It can be configured to drive a dot-matrix liquid crystal display under the control of a 4 or 8-bit microprocessor. Since all the functions such as display RAM, character generator, and liquid crystal driver, required for driving a dot-matrix liquid crystal display are internally provided on one chip, a minima system can be interfaced with this controller/driver. A single HD44780U can display up to two 8-character lines (16 x2).

-8-

Data transfer between the MCU and the LCD module will occur in the 4-bit mode. The R/W pin (5) of the LCD module is permanently grounded as there won't be any data read from the LCD module. P1.0 - P1.5 serves the 4-bit data lines (D4D7, pins 11-14) of the LCD module. Control lines, RS and E, are connected to P1.4 and P1.5. Thus, altogether 6 I/O pins of the microcontrollers are used by the LCD module. The contrast adjustment is done with a 20K preset (potentiometer) as shown below. If your LCD module has backlight LED, use a 22Q resistance in series with the pin 15 or 16 to limit the current through the LED. The detail of the circuit diagram is shown below.

HOW to Connect Load with Relay When the project is working and according to its load, it could happen an incorrect operating of the output. If it is the case, you have to install a circuit between 2 relay's contacts used for the connection. See the drawing map.

The output of the projects is controlled by a relay, allowing any load until 230V AC / 3 Amp. as maximum consumption. The relay has 3 output terminals the normally open at quiescent (NO), the normally closed at quiescent (NC) and the common. The operating of this mechanism is the same as a switch with two (2) terminals NO and common, if you wish that the output will be activated during the timer, or between the NC and the common to obtain the reverse operating. In the drawing, you could appreciate the typical connection for a devices operating at 12 VDC and to operate at 230 VAC.

-9-

Power Supply The power supply circuit. It's based on 3 terminal voltage regulators, which provide the required regulated +5V and unregulated +12V. Power is deliver initially from standard 12V AC/DC adapter or 12V_500ma Transformer. This is fed to bridge rectifier (Diode D2 - 5) the output of which is then filtered using 1000uf electrolytic capacitor and fed to U3 (voltage regulator).

-10-

Component Description

-11-

COMPONENT DESCRIPTION
The AT89xxx is a low-power, high-performance CMOS 8-bit microcomputer with 4K / 8K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel's high-density nonvolatile Marjory technology and is compatible with the industry-standard MCS-51 instruction set and pin out The on-chip Flash allows the program memory to be reprogrammed insystem or by a conventional nonvolatile memory programmer.

Features Compatible with MCS-51 Products 4K / 8K Bytes of In-System Reprogram able Flash Memory Fully Static Operation: 0 Hz to 24 MHz Three-level Program Memory Lock 128 x 8-bit Internal RAM 32 Programmable I/O Lines

-12-

Two 16-bit Timer/Counters. Six Interrupt Sources Programmable Serial Channel Low-power Idle and Power-down Modes 8-bit

Crystal oscillator A crystal oscillator is an electronic circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters/receivers?

LM78G5 (3 TERMINAL VOLTAGE REGULATER) This is used to make the stable voltage of +5V for circuits. The LM7805 is three terminal positive regulators are available in the TO-220 - oackage and with several fixed output voltages, making them useful in a wide range of application.

-13-

Operational amplifier (LM358) An Operational amplifier ("op-amp") is a DC-coupled high-gain electronic voltage amplifier with a differential input and, usually, a single-ended output. An op-amp produces an output voltage that is typically hundreds of thousands times larger than the voltage difference between its input terminals.

Control pins The control pin RS determines if the data transfer between the LCD module and an external microcontroller are actual character data or command/status. When the microcontroller needs to send commands to LCD or to read the LCD status, it must be pulled flow. Similarly, this must be pulled high if character data is to be sent to and from the LCD module.

-14-

C] Power supply pins Most of the LCD module as per data sheets recommend +5V DC. Supply for operation, some LCDs may work well for a wider range (3.0 to 5.5 V)

D] Data pins Pins 7 to 14 are data lines (DO-D7). Data transfer to and from the display can be achieved either in 8-"bit or 4-bit model the 8-bit mode.

-15-

PCB Layout

-16-

PCB LAYOUT

-17-

Description of Discrete Component

-18-

DESCRIPTION OF DISCRETE COMPONENT


Resistance A resistor or resistance is an electronic component which, as the name suggests, resists the flow of electrical current. For a fixed applied voltage, the higher the value of resistor, the more it will resist the flow of current, i.e. less current will flow. This relationship is proportion; and linear within normal working limits and forms the basis of the most common calculation in electronics, namely Ohms Law. Ohms law is shown below V=I x R Where V= voltage in volts, I= current in amps and R= rsistance in ohms

Capacitor: Capacitor (also referred to as a condenser) is a device that stores energy in the electric field created between a pair of conductors on which equal but opposite electric charges have been placed. Typical designs consist of two electrodes or plates, each of which stores an opposite charge. These two plates are conductive and are separated by an insulator or dielectric. The charge is stored at the surface of the plates, at the boundary with the dielectric. Because each plate stores an equal but opposite charge, the total charge in the device is always zero. The electrons in the molecules shift toward the positively charged left plate. The molecules then create a leftward electric field that partially annuls the field created

-19-

by the plates. (The air gap is shown for clarity; in a real capacitor, the dielectric is in direct contact with the plates.) When electric charge accumulates on the plates, an electric field is created in the region between the plates that is proportional/to the amount of accumulated charge. This electric field creates a potential difference V = E-d across the plates of this simple parallel-plate capacitor Since the farad is a very large unit, values of capacitors are usually expressed in microfarads (uF), nanofarads (nF) or picofarads (pF). The capacitance is proportional to the surface area of the conducting plate and inversely proportional to the distance between the plates. It is also proportional to the permittivity of the dielectric (that is, no conducting) substance that separates the plates.

Diode: A diode is a two-terminal semiconductor (rectifying) device that exhibits a nonlinear current-voltage characteristic. The function of a diode is to allow current in one direction and to block current in the opposite direction. The terminals of a diode are called the anode and cathode. There are two kinds of semiconductor diodes: a P-N junction diode, which forms an electrical barrier at the interface between N- and P-type semiconductor layers, and a Schottky diode, whose barrier is formed between metal and semiconductor regions. Depending on the selection of impurities (often called dopants) added, semiconductor material of two electrically-different types can be created one that is

-20-

electron-rich (called N-type), or one that is electron-poor (called P-type). Most of the "magic" of semiconductor devices occurs at the boundary between P-type and N-type semiconductor material ~ such a boundary is called a P-N junction.

Semiconductors are crystals that, in their pure state, are resistive (that is. their electrical properties lie between those of conductors and insulators) but when the proper impurities are added (this process i called doping) in trace amounts (often measured in parts per billion) display interesting and useful properties.

VOLTAGE REGULATOR
The 78xx Series of Regulators : There are many types of regulator 1C and each type will have different pin-outs and will need to be connected up slightly differently. The 78xx series ICs are the most common regulator in use. There are seven regulators in the 78xx series, and each can pass up to 1A to any connected circuit. There are also regulators with similar type numbers that can pass a higher or lower current, as shown in the table below. In addition, variable regulators are available, as are regulators that can provide negative regulation voltages for circuits that require them.
-21-

PCB Design and Fabrication The Printed Circuit Board (PCB) design starts right from the selection of laminates. The two main types of base laminates are epoxy glass and phenolic paper Phenolic paper. Phenolic paper laminates are generally used for simple circuits. Though it is very cheap and can be easily drilled, phenolic paper has poor electrical characteristics and it absorb more moisture in comparison with epoxy glass. Epoxy glass has higher mechanical strength also. The important property that has to be considered for selecting the PCB substrate are the dielectric strength, insulation resistance, water absorption property, coefficient of thermal expansion, shear strength hardness, dimensional stability etc.

-22-

Proper selection of the substrate material goes a long way in getting a reliable service from the circuit.

Size of PCB (3x 4) The size of the PCB should also be properly selected. When the board is very big, trouble shooting it becomes more time - consuming, resulting in a higher machine downtime. Also, a fig PCB as a space in the stores implies that a good amount of money is simply blocked. On other hand the smaller PCB means more number of connectors and a more complicated back pane. Set of points to be considered when designing a PCB are The size of the PCB and the base laminate should properly selected. The PCB line pattern should be analyzed to find out whether any further simplification is possible so that the number of jumpers on the board can be reduced still further. Before deciding on the line pattern the circuit should be studied properly and divided into separate blocks for easy signal from one corner to another corner of the PCB and using a logic gate within the existing 1C, it would be better to put an additional 1C and cut the signal track length. The track resistance, capacitance, inductance etc. Should be properly

analyzed with a view to avoid track heating, voltage drop, signal delay etc.

-23-

Signal lines should be routed, as far as possible, such that there is less of cross talk between the tracks. Critical signal lines should be properly shielded. Provision should be made for fixing heat sinks for the hot components and they should be separated from the head sensitive components.

Though PCB design is very simple for normal circuits, for the high complexity circuits the design of PCB should be given almost as much importance as the circuit design itself in order to get required system reliability.

-24-

Soldering

-25-

HOW TO SOLDER
First a few safety precautions: Never touch the element or tip of the soldering iron when ON. They are very hot (about 400C) and will give a nasty burn. Take great care to avoid touching the mains flex with the tip of the iron. The iron should have a heatproof flex for extra protection. An ordinary plastic flex will melt immediately if touched by a hot iron and there is a serious risk of burns and electric shock. Always return the soldering iron to its stand when not in use. Never put it down on the workbench, even for a moment! Work in a well-ventilated area. The smoke formed as we melt solder is mostly from the flux and quite irritating. Avoid breathing it by keeping you head to the side of, not above, your work. Wash your hands after using solder. Solder contains lead which is a poisonous metal.

How to start soldering: Hold the soldering iron like a pen, near the base of the handle. Imagine you are going to write your name! Remember to never touch the hot element or tip. Touch the soldering iron onto the joint to be made. Make sure it touches both the component lead and the track. Hold the tip there for a few seconds and. Feed a little solder onto the joint.

-26-

It should flow smoothly onto the lead and track to form a volcano shape as shown in the diagram. Apply the solder to the joint, not the iron. Remove the solder, then the iron, while keeping the joint still. Allow the joint a few seconds to cool before you move the circuit board. Inspect the joint closely. It should look shiny and have a Volcano1 shape. If not, you will need to reheat it and feed in a little more solder. This time ensure that both the lead and track are heated fully before applying solder. It is very tempting to start soldering components onto the circuit board straight away, but please take time to identify all the parts first. You are much less likely to make a mistake if you do this. 1. Stick all the components onto a sheet of paper using sticky tape. 2. Identify each component and write its name or value beside it. 3. Add the code (Rl, R2, Cl etc.) if necessary. Many projects from books and magazines label the components with codes (Rl, R2, Cl, Dl etc.) and you should use the project's parts list to find these codes if they are given. 4. Resistor values can be found using the resistor colour code which is explained on our Resistors page. You can print out and make your own Resistor Colour Code Calculator to help you. 5. Capacitor values can be difficult to find because there are many types with different labeling systems! The various systems are explained on our Capacitors page, 6. Some components require special care when soldering. Many must be placed the correct way round and a few are easily damaged by the heat from soldering. Hence necessary precautions is needed while soldering.

-27-

What is solder? Solder is an alloy (mixture) of tin and lead, typically 60% tin and 40% lead. It melts at a temperature of about 200C. Coating a surface with solder is called 'tinning' because of the tin content of solder. Lead is poisonous and you should always wash your hands after using solder. Solder for electronics use contains tiny cores of flux, like the wires inside a mains flex. The flux is corrosive, like an acid, and it cleans the metal surfaces as the solder melts. This is why you must melt the solder actually on the joint, not on the iron tip. Without flux most joints would fail because metals quickly oxidise and the solder itself will not flow properly onto a dirty, oxidised, metal surface. The best size of solder for electronics is 22swg (swg = standard wire gauge).

-28-

Anda mungkin juga menyukai