learn music

37
IRRIGATION CONTROL BASED ON HUMIDITY MINI PROJECT REPORT submitted in partial fulfillment of the requirements for the award of the degree of Bachelor of Technology in ELECTRONICS AND COMMUNICATION ENGINEERING of MAHATMA GANDHI UNIVERSITY by SHARON FRANCIS(12012989) Department of Electronics and Communication Engineering Rajagiri School of Engineering and Technology Rajagiri Valley, Kakkanad, Kochi, 682039 2013

Upload: sharon-francis

Post on 06-Sep-2015

18 views

Category:

Documents


0 download

DESCRIPTION

Music

TRANSCRIPT

  • IRRIGATION CONTROL BASED ON

    HUMIDITY

    MINI PROJECT REPORT

    submitted in partial fulfillment of the requirements for the award ofthe degree of

    Bachelor of Technology

    in

    ELECTRONICS AND COMMUNICATIONENGINEERING

    of

    MAHATMA GANDHI UNIVERSITY

    by

    SHARON FRANCIS(12012989)

    Department of Electronics and Communication Engineering

    Rajagiri School of Engineering and Technology

    Rajagiri Valley, Kakkanad, Kochi, 682039 2013

  • Rajagiri Valley, Cochin - 682 039

    DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

    CERTIFICATE

    Certified that the mini project work titled IRRIGATION CONTROL BASEDON HUMIDITY is a bonafide report of the mini project done bySHARON FRANCIS (Uni. Reg. No:12012989) of sixth semester Electronicsand Communication Engineering in partial fulfillment of the require-ment for the award of degree of Bachelor of Technology in Electronicsand Communication of the Mahatma Gandhi University, Kottayam, dur-ing the academic year 2014-2015

    Project Guide Head of The Department

    Internal Examiner External Examiner

    Place: Kakkanad

    Date :

    i

  • ACKNOWLEDGEMENT

    We are grateful to the almighty God for his blessings and forhelping us complete this project successfully.

    We would like to thank Rev. Dr Antony Kariyil CMI, Director,RSET, Kakkanad and Dr A.Unnikrishnan, Principal for providingus all the necessary facilities including a very well furnished lab.Wewould also like to thank Mr. Jaison Jacob, HOD, Department ofElectronics and Communication for his constant and sincere effortsto help us bring out the best that we could.We are also grateful toour guide Ms.Maleeha Abdul Azeez, Asst. Professor, Department ofElectronics and Communication for her valuable and most helpfulguidance all through the course of the project.

    This acknowledgement would be incomplete without thankingMr.Sreekumar G., Mr. K Ramavarma, Mr. Abhishek Viswaku-mar, Asst. Professors, Department of Electronics and Communica-tion, RSET, Kakkanad for their constant encouragement and sup-port throughout the course of this project. We also thank otherteaching and non teaching staff of Department of Electronics andCommunication for helping us in some way or the other. Last butnot the least we thank all our classmates in S6 ECE for helpingus a lot with their valuable suggestions and for their whole heartedsupport.

    ii

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

  • ABSTRACT

    The purpose of this document is to help you build an automatedirrigation system which is controlled based on humidity. When hu-midity falls below a desired level, the motor is switched on and thesoil is watered. The system can also be controlled manually bysending an SMS(Short Message Service) to a given number. Start-ing with an overview of the project, this document provides a blockdiagram representing the different parts of the project, detailed de-scription of the hardware, the program, the circuit diagram and thePCB layout used.

    iii

    adminHighlight

  • Contents

    ACKNOWLEDGEMENT ii

    ABSTRACT iii

    1 Introduction 11.1 Objective . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Project Definition . . . . . . . . . . . . . . . . . . . . 11.3 Working Methodology . . . . . . . . . . . . . . . . . 2

    2 System Overview 32.1 Block Diagram . . . . . . . . . . . . . . . . . . . . . 32.2 Block Diagram Explanation . . . . . . . . . . . . . . 4

    2.2.1 PIC Microcontroller . . . . . . . . . . . . . . 42.2.2 GSM Module . . . . . . . . . . . . . . . . . . 42.2.3 DC Motor . . . . . . . . . . . . . . . . . . . . 42.2.4 LCD Display . . . . . . . . . . . . . . . . . . 42.2.5 Regulated power supply . . . . . . . . . . . . 5

    3 Hardware Implementation 63.1 Circuit Diagram . . . . . . . . . . . . . . . . . . . . . 6

    3.1.1 Power Supply circuit . . . . . . . . . . . . . . 63.1.2 Circuit Diagram . . . . . . . . . . . . . . . . . 7

    3.2 Components Description . . . . . . . . . . . . . . . . 83.2.1 PIC16F877A . . . . . . . . . . . . . . . . . . 83.2.2 IC7805 . . . . . . . . . . . . . . . . . . . . . . 83.2.3 DC MOTOR . . . . . . . . . . . . . . . . . . 83.2.4 L293D . . . . . . . . . . . . . . . . . . . . . . 93.2.5 LCD DISPLAY . . . . . . . . . . . . . . . . . 93.2.6 GSM MODULE . . . . . . . . . . . . . . . . . 103.2.7 MAX232 . . . . . . . . . . . . . . . . . . . . . 10

    3.3 Circuit Operation . . . . . . . . . . . . . . . . . . . . 10

    iv

  • 4 Software Implementation 124.1 Program . . . . . . . . . . . . . . . . . . . . . . . . . 124.2 Software Tools . . . . . . . . . . . . . . . . . . . . . . 21

    4.2.1 Proteus . . . . . . . . . . . . . . . . . . . . . 214.2.2 MPLAB . . . . . . . . . . . . . . . . . . . . . 214.2.3 DIPTRACE . . . . . . . . . . . . . . . . . . . 22

    5 PCB Design 235.1 PCB Technology . . . . . . . . . . . . . . . . . . . . 235.2 PCB Layout . . . . . . . . . . . . . . . . . . . . . . . 25

    5.2.1 Top Layer . . . . . . . . . . . . . . . . . . . . 255.2.2 Bottom Layer . . . . . . . . . . . . . . . . . . 26

    6 Implementation and Circuit Testing 27

    7 Applications 28

    8 Conclusion 29

    v

  • List of Figures

    2.1 Block Diagram . . . . . . . . . . . . . . . . . . . . . 3

    3.1 Power Supply Circuit Diagram . . . . . . . . . . . . . 63.2 Complete circuit Diagram . . . . . . . . . . . . . . . 7

    5.1 Top Layer . . . . . . . . . . . . . . . . . . . . . . . . 255.2 Bottom Layer . . . . . . . . . . . . . . . . . . . . . . 26

    vi

  • 1Introduction

    1.1 Objective

    Irrigation is the artificial application of water to the land or soil. Itis used to assist in the growing of agricultural crops, maintenanceof landscapes, and revegetation of disturbed soils in dry areas andduring periods of inadequate rainfall. Irrigation has been a centralfeature of agriculture for over 5000 years and the result of workof many cultures. Water shortage is becoming one of the biggestproblems in the world. Many different methods are developed forthe conservation of water. Water is a basic necessity for all livingbeings.

    Agriculture is one of the fields where water is required in tremen-dous quantities. But it also results in excess usage of water. Auto-matic irrigation systems are programmed to discharge precise amountsof water in targeted area, which promotes water conservation. Thusthe objective of this project is to design a low cost, efficient, smallscale irrigation system too prevent water loss and minimize the costof labour.

    1.2 Project Definition

    In this system water content in the soil is continuously measuredand is displayed to the customer through a LCD display. When themoisture content is less than the reference value the system auto-matically turns the motor on. The motor when turned on sprinkleswater from a water tank to the soil. When the moisture contentreaches the reference level, the motor is switched off. Along withthis, the system can be operated manually when an SMS in a speci-

    1

    adminHighlight

    adminHighlight

    adminHighlight

  • fied syntax is sent to a number.The logic is produced by the programwritten in Embedded C language using the software MPLAB. Theprogram written is then converted in HEX code after simulation andburned on to PIC microcontroller.

    1.3 Working Methodology

    The project consist of a main control unit which is the microcon-troller. Moisture detector system is made by using two iron nailskept in the soil, where the moisture content is to be measured. Thedetector is also connected to the microcontroller. It detects thevoltage variation which determines the moisture content in the soil.This variation is given to the Analog-to-Digital converter of the PICcontroller. The digital output decides the working of the motor. ThePIC controller is programmed to run the motor when the moisturecontent falls below a reference value. When the moisture contentreaches that particular value, the motor is turned off. The LCDdisplays the instantaneous value of soil moisture content and thestatus of the pump.

    The system also consists of a GSM module which allows manualoperation of the device. The PIC controller is programmed to anal-yse the SMS received by the GSM module and based on this, themotor is operated.

    2

    adminHighlight

    adminHighlight

    adminHighlight

  • 2System Overview

    2.1 Block Diagram

    Figure 2.1: Block Diagram

    3

  • 2.2 Block Diagram Explanation

    2.2.1 PIC Microcontroller

    The PIC microcontroller is the heart of the system. It is used tointerface different devices used in the circuit and is responsible forcontrolling and co-ordinating all the activities and functions. PICis a family of modified Harvard architecture microcontrollers. Itis made by Microchip Technology, derived from the PIC1650 origi-nally developed by General Instruments Microelectronics Division.The name PIC initially referred to Peripheral Interface Controller.PIC 16f877A is used in our circuit.

    2.2.2 GSM Module

    A GSM module can be interfaced to the serial port of the microcon-troller to send and receive message or to make a call . It is a spe-cialized type of modem that accepts a SIM card, and operates overa subscription to mobile operator, just like a mobile phone. Fromthe mobile operator perspective, a GSM module looks just like amobile phone. The GSM module used is SIMCOM 300 which usesSIM memory to store the number of system owner or housematesand distributor or to whoever the messages have to be forwarded.

    2.2.3 DC Motor

    A DC motor is used here for the mechanical operation of the pump.A DC motor in simple words is a device that converts direct current(electrical energy) into mechanical energy. Thus rotating the motorfor a given value of moisture content, according to the output fromthe PIC microcontroller, turns the pump ON. A driver IC has to beused in order to provide the necessary current to the motor.

    2.2.4 LCD Display

    As the system performs controlling and monitoring operations, itis primary requirement to put a display in the system which showsvarious message such as status of the pump, moisture content inthe soil and also displays the actions taken by microcontroller. Liq-uid Crystal Display (LCD) of 16X2 characters operating on +5Voltsupply and operated in 4-bit mode is implemented for the task of dis-playing required messages .Interfacing with PIC16F877A and shortcode of programming makes it very useful to make system more userfriendly.

    4

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

  • 2.2.5 Regulated power supply

    A regulated power supply is one that controls the output voltageor current to a specific value; the controlled value is held nearlyconstant despite variations in either load current or the voltage sup-plied by the power supplys energy source. A 7805 IC is used to getregulated power supply.

    5

    adminHighlight

  • 3Hardware Implementation

    3.1 Circuit Diagram

    3.1.1 Power Supply circuit

    Figure 3.1: Power Supply Circuit Diagram

    6

  • 3.1.2 Circuit Diagram

    Figure 3.2: Complete circuit Diagram

    7

  • 3.2 Components Description

    3.2.1 PIC16F877A

    The PIC16F877A is a RISC microcontroller. It is one of themost efficient microcontrollers which is the most suitable for theproject. PICs are popular and common with both industrial devel-opers and hobbyists alike due to their low cost, wide availability,large user base, extensive collection of application notes, availabil-ity of low cost or free development tools, and serial programmingand re-programming (It can be reprogrammed and erased up to10,000 times.) Therefore it is very good for new product develop-ment phase.

    HIGH PERFORMANCE RISC CPU:

    Only 35 single word instructions to learn All single cycle instructions except for program branches, which

    are two cycle

    Operating speed:DC 20 MHzDC 200 ns instruction cycle

    Up to 8K x 14 words of Flash Program Memory, Up to 368 x 8 bytes of Data Memory (RAM), Up to 256 x 8 bytes of EEPROM Data Memory Pinout compatible to other 28-pin or 40/44-pin PIC16CXXX

    and PIC16FXXX microcontrollers

    3.2.2 IC7805

    The regulator IC 7805,provides a regulated 5V positive supply atits third pin.The regulator IC converts unregulated DC current intoregulated DC current. It can also be used in circuits to get a lowDC voltage from a high DC voltage (for example we use 7805 to get5V from 12V).

    3.2.3 DC MOTOR

    A DC motor is one of the simplest component by which a rotorymotion can be achieved.Its operation is based on the principle of

    8

    adminHighlight

    adminHighlight

  • electromagnetism The Device is a monolithic integrated high volt-age, high current four channel driver designed to accept standardDTL or TTL logic levels and drive inductive loads (such as relayssolenoides, DC and stepping motors) and switching power transis-tors. To simplify use as two bridges each pair of channels is equippedwith an enable input. A separate supply input is provided for thelogic, allowing operation at a lower voltage and internal clamp diodesare included. This device is suitable for use in switching applicationsat frequencies up to 5 kHz.

    3.2.4 L293D

    L293D is a dualH-bridgemotor driver integrated circuit (IC).It is amonolithic integrated high voltage, high current four channel driverdesigned to accept standard DTL or TTL logic levels and driveinductive loads (such as relays solenoides, DC and stepping motors)and switching power transistors. A separate supply input is alsoprovided for the logic, allowing operation at a lower voltage andinternal clamp diodes are included. Motor drivers act as currentamplifiers since they take a low-current control signal and providea higher-current signal. This higher current signal is used to drivethe motors.Enable pins 1 and 9 (corresponding to the two motors)must be high for motors to start operating. When an enable inputis high, the associated driver gets enabled.

    3.2.5 LCD DISPLAY

    A liquid crystal display (LCD) is a electronic visual display that usesthe light modulating properties of liquid crystals. It is an electroni-cally modulated optical device made up of any number of segmentsfilled with liquid crystals and arrayed in front of a light source (back-light) or reflector to produce images in color or monochrome. Itslow electrical power consumption enables it to be used in battery-powered electronic equipment. They are used in a wide range ofapplications, including computer monitors, television, instrumentpanels, aircraft cockpit displays, signage, etc. They are usually moreenergy efficient, compact, lightweight, portable, less expensive, morereliable, and easier on the eyes. They are available in a wider rangeof screen sizes.

    9

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

  • 3.2.6 GSM MODULE

    GSM Module is used to establish communication between the mi-crocontroller and a GSM system.GSM is an architecture used for mo-bile communication in most of the countries.GSM module consistsof a GSM modem assembled together with power supply circuit andcommunication interfaces(like RS-232,USB etc) for computer.Themodem is soul of such modules.GSM module can collect some dataand send it to the central place using SMS or GSM data call

    3.2.7 MAX232

    The MAX232 is an integrated circuit that converts signals froman RS-232 serial port to signals suitable for use in TTL compatibledigital logic circuits. The drivers provide RS-232 voltage level out-puts (approx. 7.5 V) from a single + 5 V supply via on-chip chargepumps and external capacitors. This makes it useful for imple-menting RS-232 in devices that otherwise do not need any voltagesoutside the 0 V to + 5 V range, as power supply design does notneed to be made more complicated just for driving the RS-232 inthis case.

    3.3 Circuit Operation

    The circuit is powered by a 12V DC supply for the motor and a 5Vsupply for PIC, LCD, MAX232N, moisture detector and motor. The12V DC is provided as the input supply. The ripples in the resultingsupply if any is filtered or smoothened by means of a capacitor.Capacitor serves as a filter blocking any ac component of the rectifieroutput. This voltage is fed to regulator IC 7805, which provides aregulated 5V positive supply at its third pin. The regulated outputis given as VCC to the PIC16F877A, LCD etc. An LED is connectedin the circuit to detect the presence of power supply in the circuit.The PIC is given an external clock signal using a crystal of frequency11.0592 MHz. This explains the operation of the power supply andclock signal section.

    The moisture detectors are connected to the pin 2 of PIC. Thisis an analog input pin which can detect voltage and convert it to10 bit binary value corresponding to the input voltage between 0and 5V. The DC motor is also connected to the output port of thePIC through the driving IC L293D. The GSM module uses serialcommunication and is connected to the serial port (pins 25 and 26)

    10

    adminHighlight

    adminHighlight

    adminHighlight

  • of PIC. The GSM module uses RS232 logic for communication whilethe PIC uses TTL logic. A serial converter IC is used in betweenthem for the conversion between the two logics.

    When the circuit is powered on PIC constantly checks the outputof the moisture detector. When it produces a low voltage, ie whenthe water content of the soil is below a reference value, the motor isturned on and water is pumped. When the moisture detector outputis high, the PIC reads the input value at the analog pin and motoris switched off. The input to the analog pin is calibrated so as todisplay the water content and motor status on the LCD display.

    11

    adminHighlight

    adminHighlight

    adminHighlight

  • 4Software Implementation

    4.1 Program

    #inc lude#inc lude l cd . h#inc lude s e r i a l . h#inc lude p i c adc . h#d e f i n e IN1 RA3#d e f i n e IN2 RA5#d e f i n e EN RE0i n t i =0,t , dd=0,aa=0;

    char sms [ 2 ] ;

    void g sm in i t ( ){

    RCIE=0;CREN=0;

    u s a r t t x s t r i n g (AT ) ;u sa r t t r an sm i t (0X0D) ;u sa r t t r an sm i t (0X0A) ;de lay ( 2 ) ;u s a r t t x s t r i n g (AT+CMGF=1);u sa r t t r an sm i t (0X0D) ;u sa r t t r an sm i t (0X0A) ;de lay ( 2 ) ;u s a r t t x s t r i n g (AT+CNMI=2 ,2 ,0 ,0 ,0) ;u s a r t t r an sm i t (0X0D) ;u sa r t t r an sm i t (0X0A) ;

    12

  • delay ( 2 ) ;u s a r t t x s t r i n g (AT+CMGD=1);u sa r t t r an sm i t (0X0D) ;u sa r t t r an sm i t (0X0A) ;de lay ( 2 ) ;u s a r t t x s t r i n g (AT+CMGD=2);u sa r t t r an sm i t (0X0D) ;de lay ( 2 ) ;

    RCIE=1;CREN=1;}void main ( ){ADCON1=0x0E ;

    TRISD=0X00 ;TRISA0=1;TRISA3=0;TRISA5=0;TRISE0=0;TRISC=0X80 ;PORTB=0X00 ;PORTE=0X00 ;PORTA=0X00 ;PORTC=0X00 ;PORTD=0X00 ;EN=1;

    ADCON0=0X05 ;ADCON1=0X8E;GIE=1;PEIE=1;RCIE=1;RCIF=0;

    IN1=0;IN2=0;

    l c d i n i t ( ) ;u s a r t i n i t ( ) ;g sm in i t ( ) ;

    13

  • lcd command (0 x80 ) ;l c d d i s p l a y ( I r r i g a t i o n Based ) ;lcd command (0 xc0 ) ;l c d d i s p l a y ( On Humidity ) ;

    de lay (25000 ) ;lcd command (0 x01 ) ;

    whi l e (1 ){lcd command (0 x80 ) ;l c d d i s p l a y (DRYNESS =);t=Adc10 Cha ( 0 ) ;t=t / 2 . 0 4 8 ;

    // lcd command (0xCb ) ;lcd num ( t ) ;

    i f ( t=498&&t>=440){aa=1;RC1=1;lcd command (0xC0 ) ;l c d d i s p l a y ( Pump ON ) ;IN1=1;IN2=0;}e l s e {aa=0;}

    i f ( dd==1||aa==1){IN1=1;IN2=0;}

    i f ( ! dd && ! aa ){RC1=0;lcd command (0xC0 ) ;

    14

  • IN1=0;IN2=0;l c d d i s p l a y ( ) ;}

    i f ( i >1){i f ( sms [1]== Y ){dd=1;lcd command (0 x01 ) ;lcd command (0xC0 ) ;l c d d i s p l a y (Pump ON ) ;RC1=1;}e l s e i f ( sms [1]== N ){lcd command (0 x01 ) ;lcd command (0xC0 ) ;l c d d i s p l a y (Pump OFF ) ;RC1=0;IN1=0;IN2=0;dd=0;}sms [ 1 ] = \0 ; sms [ 0 ] = \0 ;i =0;}}}

    s t a t i c void i n t e r r u p t i s r ( ){

    i f (RCIF){

    RCIF = 0 ;sms [ i ]= u s a r t r e c e i v e ( ) ;i f ( sms [0 ]== ) i ++;e l s e i =0;

    }

    15

  • #inc lude l cd . h#d e f i n e RS RC2#d e f i n e E RC3

    void de lay ( i n t n){whi le (n);}

    void lcd command ( i n t a ){PORTD=a ;RS=0;//RW=0;E=1;de lay ( 1 0 0 ) ;E=0;}void l cd da ta ( char a ){PORTD=a ;RS=1;//RW=0;E=1;de lay ( 1 0 0 ) ;E=0;}void l c d d i s p l a y ( const char s ){whi le ( s ){l cd da ta ( s ) ;s++;

    }}

    void lcd num ( unsigned i n t x ){

    char a [ 1 0 ] ;i n t i =0;

    whi l e ( x ){

    a [ i ]=x%10;i ++;

    x= x /10 ;

    16

  • }a [ i ]= \0 ;i;

    whi l e ( i>=0){

    l cd da ta ( a [ i ]+0x30 ) ;i;

    }l c d d i s p l a y ( ) ;}

    void l c d i n i t ( ){lcd command (0 x38 ) ;lcd command (0 x01 ) ;lcd command (0 x0c ) ;}

    #inc lude s e r i a l . hvoid u sa r t t r an sm i t ( char a ){TXREG=a ;whi l e ( ! TXIF ) ;TXIF=0;}char u s a r t r e c e i v e ( ){char a ;whi l e ( ! RCIF ) ;a=RCREG;re turn ( a ) ;}void u s a r t t x s t r i n g ( const char s ){whi le ( s ){usa r t t r an sm i t ( s ) ;s++;}}void u s a r t i n i t ( ){

    17

  • TXSTA=0X24 ;RCSTA=0X90 ;SPBRG=0X19 ;}

    #inc lude p i c adc . hAdc8 Cha ( unsigned char ) ;Adc10 Cha ( unsigned char ) ;

    unsigned i n t adc hbit , a d c l b i t ;unsigned i n t adc temp , adc temp0 , adc va l1 ;unsigned char adc val , adc de l , adc j ;Adc10 Cha ( unsigned char va l ){

    ADFM=1;adc de l =25;

    i f ( va l==0){

    adc temp0 =0;f o r ( a dc j =0; adc j

  • whi le (ADCON0!=0X09 ) ;adc hb i t=ADRESH;a d c l b i t=ADRESL;

    adc temp = a d c l b i t + (256 adc hb i t ) ;adc temp0=adc temp0+adc temp ;

    }}e l s e i f ( va l==2){

    adc temp0 =0;f o r ( a dc j =0; adc j

  • {ADCON0=0x20 ;

    ADON=1;whi l e ( adc de l );ADCON0 =0x25 ;

    whi l e (ADCON0!=0x21 ) ;adc hb i t=ADRESH;a d c l b i t=ADRESL;

    adc temp = a d c l b i t + (256 adc hb i t ) ;adc temp0=adc temp0+adc temp ;

    }}e l s e i f ( va l==5){

    adc temp0 =0;f o r ( a dc j =0; adc j

  • }e l s e i f ( va l==7){

    adc temp0 =0;f o r ( a dc j =0; adc j

  • etc. It is a full-featured C compiler for 5 different microcontrollerarchitectures. It is the best solution for developing code for anymicrocontroller. It features intuitive IDE, powerful compiler withadvanced SSA optimizations, lots of hardware and software libraries,and additional tools that will be very helpful. Our project coding iscompletely done using MPLAB.

    4.2.3 DIPTRACE

    Electronic design automation (EDA or ECAD) is a category of soft-ware tools for designing electronic systems such as printed circuitboards and integrated circuits. The tools work together in a designflow that chip designers use to design and analyze entire semicon-ductor chips.

    DipTrace is an EDA software for creating schematic diagramsand printed circuit boards. In this project the PCB design softwareDipTrace was used to draw the schematic and obtain the board lay-out.This software offers user friendly, powerful and affordable solu-tions for PCB design, including Schematic, Capture, Board Layoutand Autorouter. The PCB layout editor allows back annotationto the schematic and auto-routing to automatically connect tracesbased on the connections defined in the schematic. It also shows a3D Preview of the PCB layout. We used DipTrace CAD to createour PCB design files and the layout for printing.

    22

    adminHighlight

  • 5PCB Design

    A printed circuit board, or PCB, is used to mechanically support andelectrically connect electronic components using conductive path-ways, tracks or signal traces etched from copper sheets laminatedonto a non-conductive substrate. The design of PCB is consideredas the last step in electronics circuit design as well as the first stepin production of PCBs. It forms a distant factor in the circuitsperformance and reliability. The designing of the PCB consists ofdesigning of the layout followed by generation of the artwork. Theboard is typically coated with a solder mask that is green in color.Other colors that are normally available are blue, black, white andred. Conducting layers are typically made of thin copper foil. In-sulating layers dielectric is typically laminated together with epoxyresin prepreg.Well known prepreg materials used in the PCB in-dustry are FR-2 (Phenolic cotton paper), FR-3 (Cotton paper andepoxy), FR-4 (Woven glass and epoxy), FR-5 (Woven glass andepoxy), FR-6 (Matte glass and polyester), G-10 (Woven glass andepoxy), CEM-1 (Cotton paper and epoxy), CEM-2 (Cotton paperand epoxy), CEM-3 (Non-woven glass and epoxy).

    5.1 PCB Technology

    Block level descriptions of the various terms associated with thetechnology of PCBs are as follows:

    COPPER CLAD LAMINATES The board with copper on it iscalled copper-clad laminate.

    PATTERNING (ETCHING) The vast majority of printed cir-cuit boards are made by bonding a layer of copper over theentire substrate, sometimes on both sides, (creating a blank

    23

    adminHighlight

  • PCB) then removing unwanted copper after applying a tem-porary mask (e.g., by etching), leaving only the desired coppertraces.

    LAMINATION Some PCBs have trace layers inside the PCBand are called multilayer PCBs. These are formed by bondingtogether separately etched thin boards.

    DRILLING Holes through a PCB are typically drilled withsmall-diameter drill bits made of solid coated tungsten carbide.Coated tungsten carbide is recommended since many boardmaterials are very abrasive and drilling must be high RPMand high feed to be cost effective. These holes are often filledwith annular rings (hollow rivets) to create vias. Vias allowthe electrical and thermal connection of conductors on oppositesides of the PCB.

    SCREEN PRINTING Line art and text may be printed ontothe outer surfaces of a PCB by screen printing. Screen print isalso known as the silk screen, or, in one sided PCBs, the redprint.

    PRINTED CIRCUIT ASSEMBLY After the printed circuitboard (PCB) is completed, electronic components must be at-tached to form a functional printed circuit assembly, or PCA(sometimes called a printed circuit board assembly PCBA).Inthrough-hole construction, component leads are inserted in holes.In surface-mount construction, the components are placed onpads or lands on the outer surfaces of the PCB. In both kindsof construction, component leads are electrically and mechani-cally fixed to the board with a molten metal solder. Solderingtechniques are used to attach components to a PCB.

    TESTING While the power is on, in-circuit tests, where phys-ical measurements (i.e voltage, frequency) can be done. More-over while the power is on, functional test, just checking if thePCB does what it had been designed to do can also be done.

    24

    adminHighlight

    adminHighlight

  • 5.2 PCB Layout

    5.2.1 Top Layer

    Figure 5.1: Top Layer

    25

  • 5.2.2 Bottom Layer

    Figure 5.2: Bottom Layer

    26

  • 6Implementation and CircuitTesting

    The PCB circuit was designed and implemented. The circuit wastested on two soils - one watered and the other soil dry. Undernormal condition the status of the pump and moisture content isdiplayed on the display. The humidity sensor is inserted into thesoil, when the moisture content is below 40 percent, the motor isrotated and the pump is turned on. After the moisture contentreaches a value above the reference level, the motor stops rotatingand the pump is turned off.

    Thus, the proposed project of irrigation control based on humid-ity was successfully implemented and the circuit was tested to beworking.

    27

  • 7Applications

    Applications The applications of irrigation control system basedon humidity are :

    It can be used to irrigate small scale farming. It can be used in greenhouses and water roof gardens.

    Problems faced and Future Scope Since we use only one motorin this system, it can be used only for a small scale farming. Byincreasing the number of motors, it can be facilitated in large farms.This project can be further developed as given below:

    Along with water, mineral content in the soil can be detectedand accordingly provided for the plants. This method can beefficient for large scale farming.

    Other parameters such as ambient temperature, light intensityand humidity can be measured.

    28

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

  • 8Conclusion

    The Irrigation Control Based on Humidity was successfully imple-mented and tested. In this current scenario where there is shortageof water, this system can play a vital role in water conservation.This system when practically implemented would help users to ir-rigate their farms efficiently and timely. It can reduce the over-useof water, and also excessive irrigation and damaging of plants. Thissystem have following advantages,

    It reduces human intervention and still ensures proper irriga-tion.

    It helps in water conservation. It avoids over irrigation of the soil which may damage the plant

    crops.

    It can be switched to manual mode whenever required.

    29

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

    adminHighlight

  • Bibliography

    [1] John B. Peatman, Design with PIC Microcontrollers, PrenticeHall, 1998

    [2] Barnett, Ocull, and Cox, Embedded C Programming and theMicrochip PIC, DELMAR CENGAGE Learning, 2004.

    [3] Hayes, GSM modem AT Command Set,http://www.engineersgarage.com/tutorials/at-commands,March 4, 2013

    30