monitor and control ofgreenhouse environment-greenbee

Upload: tariq76

Post on 03-Jun-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    1/298

    Biju Patnaik University of Technology

    Rourkela

    PROJECT REPORT ON

    M o n i tor and C on t rol o f Gree n h ou se

    E nvir o nment

    The Project GreenBee

    A Project report submitted in partial fulfillment of the requirement for the award of

    Bachelor of Engineering

    In

    Applied Electronics and Instrumentation Engineering

    Submitted by:

    Chinmayananda Das !egd "o#$%$&''($)*+

    ,nder the guid a nce of

    -rof# Subhendu BeheraDept# of Applied Electronics . Instrumentation Engineering

    Dhanes/ar !ath Institute of Engineering . Management Studies0 Cuttac1

    DE-A!2ME"2 34 A--5IED E5EC2!3"ICS A"D I"S2!,ME"2A2I3" E"GI"EE!I"G

    D6A"ES7A! !A26 I"S2I2,2E 34 E"GI"EE!I"G . MA"AGME"2 S2,DIES

    C,22AC8

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    2/298

    D6A"ES7A! !A26 I"S2I2,2E 34 E"GI"EE!I"G . MA"AGME"2 S2,DIES

    C,22AC8

    !Affiliated To "iju Patnai# $ni%ersit& of Technolo'&(

    Dept# of Applied Electronics . Instrumentation

    Engineering

    CertificateCertified that the project wor# entitled 9Monitor and Control of Greenhouse

    Environment is a bonafide wor# carried outb&)

    Chinmayananda Das !egd "o#$%$&''($)*+

    in partial fulfillment for the award of the de'ree of "achelor of En'ineerin' in Applied

    Electronics and Instrumentation Engineering under "iju Pattnai# $ni%ersit& Of

    Technolo'&* Rour#ela* durin' the &ear +,,-.+,,/ It is certified that all corrections0 su''estions

    indicated for Internal Assessment ha%e been incorporated in the report and deposited in the

    departmental librar& The project report has been appro%ed as it satisfies the academic

    requirements in respect of the project wor# prescribed for the said de'ree

    Signature:

    Proj e ct 1 u id e) 2O 3 3 e pt of AE 4 I) Project Inchar'e)

    Name) Name) Name)

    3ate) 3ate) 3ate)

    Internal e5aminer) E5ternal

    e5aminer)Name) Name)

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    3/298

    AC8"375EDGEME"2

    The completion of an& project brin's with it a sense of satisfaction* but it is ne%er

    complete without than#in' those people who made it possible and whose constant support

    has crowned our efforts with success

    One cannot e%en ima'ine the power of the force that 'uides us all and neither can we

    succeed without ac#nowled'in' it Our deepest 'ratitude to Almi'ht& 1od for holdin' our

    hands and 'uidin' us throu'hout our li%es

    I would also li#e to e5press our 'ratitude to -rof# Subhendu Behera 2ead of the

    3epartment* Appl ied Electronics and Instrumentation 3RIE67* Cuttac# for encoura'in'

    and inspirin' us to carr& out the project in the department lab

    I would also li#e to than# our 'uide* Er# ;# " Mishra3ept of A p p l i e d Electronics

    andCommunication for his e5pert 'uidance* encoura'ement and %aluable su''estions at

    e%er& step

    8e also would li#e to than# all the staff members of AE4I dept for pro%idin' us with

    the required facilities and support towards the completion of the project

    8e are e5tremel& happ& to ac#nowled'e and e5press our sincere 'ratitude to our

    parents for their constant support and encoura'ement and last but not the least* friends and

    well wishers for their help and cooperation and solutions to problems durin' the course of

    the project

    Also our friends at )$%&pro

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    4/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    S="3-SIS

    Appropriate en%ironmental conditions are necessar& for optimum plant 'rowth* impro%ed

    crop &ields* and efficient use of water and other resources Automatin' the data acquisition

    process of the soil conditions and %arious climatic parameters that 'o%ern plant 'rowth allows

    information to be collected at hi'h frequenc& with less labor requirements The e5istin' s&stems

    emplo& PC or 767.based s&stems for #eepin' the user continuousl& informed of the conditions

    inside the 'reenhouse< but are unaffordable* bul#&* difficult to maintain and less accepted b& the

    technolo'icall& uns#illed wor#ers

    The objecti%e of this project is to desi'n a simple* eas& to install* microcontroller.based

    circuit to monitor and record the %alues of temperature* humidit&* soil moisture and sunli'ht of

    the natural en%ironment that are continuousl& modified and controlled in order optimi=e them to

    achie%e ma5imum plant 'rowth and &ield The controller used is a low power* cost efficient chip

    manufactured b& AT6E9 ha%in' >? b&tes of on.chip flash memor& It communicates with the

    %arious sensor modules in real.time in order to control the li'ht* aeration and draina'e process

    efficientl& inside a 'reenhouse b& actuatin' a cooler* fo''er* dripper and li'hts respecti%el&

    accordin' to the necessar& condition of the crops An inte'rated 9iquid cr&stal displa& !9C3( is

    also used for real time displa& of data acquired from the %arious sensors and the status of the

    %arious de%ices Also* the use of easil& a%ailable components reduces the manufacturin' and

    maintenance costs The desi'n is quite fle5ible as the software can be chan'ed an& time It can

    thus be tailor.made to the specific requirements of the user

    This ma#es the proposed s&stem to be an economical* portable and a low maintenance

    solution for 'reenhouse applications* especiall& in rural areas and for small scale a'riculturists

    3EPART6ENT O: AE 4 I i% +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    5/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    C3"2E"2S

    NA6E O: T2E C 2 APTER PA1E NO

    I"2!3D,C2I3"

    @@ C$RRENT 7CENARIO+@@@ 6AN$A9 7ET$P+

    @@+ PARTIA99B A$TO6ATE3 7ET$P+

    @@ :$99B A$TO6ATE3 7ET$P

    @+ PRO"9E6 3E:INITION

    @ PROPO7E3 6O3E9 :OR A$TO6ATION O: 1REEN2O$7ED

    '# S=S2EM M3DE5

    ++ "A7IC 6O3E9 O: T2E 7B7TE6

    + PART7 O: T2E 7B7TE6F

    +D 7TEP7 :O99O8E3 IN 3E7I1NIN1 T2E 7B7TE6>

    ># BASIC 26E3!=

    @ 9I:E PROCE77E7 IN7I3E A 1REEN2O$7E

    @@ P2OTO7BNT2ETIC PROCE77@+

    @+ TRAN7PIRATION@

    *# 6A!D7A!E DESC!I-2I3"

    D@ 2!A"SD,CE!S

    D@@ 7OI9 6OI7T$RE 7EN7OR@

    3EPART6ENT O: AE 4 I % +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    6/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    D@@@ :EAT$RE7 @

    D@@+ :$NCTIONA9 3E7CRIPTION @F

    D@+ 9I12T 7EN7OR

    D@+@ :EAT$RE7 @>

    D@++ :$NCTIONA9 3E7CRIPTION @/

    D@ 2$6I3ITB 7EN7OR

    D@@ +,

    D@+ :$NCTIONA9 3E7CRIPTION................................ +@

    D@D TE6PERAT$RE 7EN7OR

    D@D@ ++D@D+ :$NCTIONA9 +

    D+ A"A53G 23 DIGI2A5 C3"?E!2E! ADC $)$(+

    D+@ +D

    D++ +D

    D+ CON;ER7ION 6ET2O3 +-

    D+D PIN 3IA1RA6 O: A3C +

    D+- 7E9ECTIN1 AN ANA9O1 +F

    D C53C8 CI!C,I2!= 43! 26E ADC

    D@ :$NCTIONA9 +/

    DD MIC!3C3"2!355E!

    DD@ CRITERIA :OR C2OO7IN1 A @

    DD+ @

    DD+ +

    DDD PIN CON:I1$RATION...................................................

    DD- "9OC? 3IA1RA6........................................................ D

    DD PIN -

    DD@ PO8ER.ON RE7ET

    DD+ O7CI99ATOR C9OC? F

    DDF 7PECIA9 :$NCTION >

    DD> 6E6ORB /

    DD/ 8ATC23O1 TI6ER...................................................... D,

    %i

    3EPART6ENT O: AE 4 I +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    7/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    DD@, TI6ER7 AN3 CO$NTER7D@

    DD@@ INTERR$PT7D+

    DD@+ 6ICROCONTRO99ER CON:I1$RATION $7E3 IN T2E 7ET.$PD+

    D- 5I@,ID C!=S2A5 DIS-5A=DD

    D-@ 7I1NA97 TO T2E 9C3DD

    D-@@ 9O1IC 7TAT$7 ON T2E CONTRO9 9INE7D-

    D-@+ 8RITIN1 AN3 REA3IN1 3ATA :RO6 T2E 9C3D-

    D-+ PIN 3E7CRIPTIOND-

    D A5A!M CI!C,I2!=D

    DF !E5A=SDFD> -37E! S,--5= C3""EC2I3"-,

    %# S=S2EMS ,SED I" 73!8 M3DE

    -@ 3RIP IRRI1ATION 7B7TE6 :OR CONTRO99IN1 7OI9 6OI7T$RE-D

    -+ ARTI:ICIA9 1RO8IN1 9I12T7 :OR CONTRO99IN1 I99$6INATION--

    - 2EATER7 AN3 :AN7 :OR CONTRO99IN1 TE6PERAT$RE

    -@ COO9IN1 EH$IP6ENT--+ 2EATIN1 EH$IP6ENT-

    -D 2$6I3I:ICATION 7B7TE67-

    # S3427A!E

    @ I"2!3D,C2I3" 23 8EI5 S3427A!E

    @@ 82AT I7 ;ision-/

    @+ 7TEP7 :O99O8E3 IN CREATIN1 AN APP9ICATION IN ;ision-/@ 3E;ICE 3ATA"A7ED

    @D PERIP2ERA9 7I6$9ATIOND

    + -!3G!AMME!D

    -ro5oad -!3G!AMMI"G S3427A!E-

    3EPART6ENT O: AE 4 I %ii +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    8/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    # 4537C6A!2

    F@ :9O8C2ART REPRE7ENTIN1 T2E 8OR?IN1 O: T2E 7B7TE6>

    F+ :9O8C2ART :OR 9C3 INITIA9IGATION/

    F :9O8C2ART :OR A3C INITIA9IGATIONF@

    )# !ES,52 A"A5=SIS

    >@ 7EN7OR REA3IN17

    >@@ 7OI9 6OI7T$RE 7EN7ORFD

    >@+ 9I12T 7EN7ORF-

    >@ 2$6I3ITB 7EN7ORF

    >@D TE6PERAT$RE 7EN7ORFF

    (# AD?A"2AGES A"D DISAD?A"2AGES

    /@ A3;ANTA1E7>,

    /+ 3I7A3;ANTA1E7>,

    &$# 4,2,!E SC3-E >+

    & C3"C5,SI3">D

    I# !E4E!E"CES>-

    II# A""E,!EI >F

    III# A""E,!EII /@

    I?# A""E,!EIII/-

    ?# A""E,!EI?/F

    ?I# A""E,!E?@@-

    3EPART6ENT O: AE 4 I %iii +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    9/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    5IS2 34 4IG,!ESI :i'ure +@ "loc# dia'ram of the s&stem

    II :i'ure + "loc# dia'ram ofphotos&nthesis@+

    III :i'ure + Transpiration@D

    I; :i'ure D@ 7oil moisture sensor circuit@F

    ; :i'ure D+ 9i'ht 3ependent Resistor@>

    ;I :i'ure D+@ 7tructure of a 9i'ht 3ependent Resistor@>

    ;II :i'ure D 9i'ht sensor circuit@/

    ;III :i'ure DD 2I2.D,,,.,,@ 2umidit& sensor+,

    I :i'ure D- 2umidit& sensor circuit+@

    :i'ure D 96- temperature sensor++

    I :i'ure DF Temperature sensor circuit+

    II :i'ure D> 1ettin' data from the analo' world+D

    III :i'ure D/ "loc# dia'ram of A3C ,>,/+-

    I; :i'ure D@, :lowchart e5plainin' the 7uccessi%e Appro5imation method+

    ; :i'ure D@@ Pin dia'ram of A3C ,>,/+

    ;I :i'ure D@+ A3C ,>,/ pin details for the s&stem+>

    ;II :i'ure D@ Timin' dia'ram of A3C ,>,/+/

    ;III :i'ure D@D Cloc# circuitr& for the A3C,

    I :i'ure D@- The effect of usin' a 7chmitt tri''er instead of a comparator,

    :i'ure D@ Pin dia'ram of AT>/7-+

    I :i'ure D@F "loc# dia'ram of the microcontrollerD

    II :i'ure D@> Power.on reset circuit

    3EPART6ENT O: AE 4 I i5 +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    10/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    III :i'ure D@/ Oscillator cloc# circuit>

    I; :i'ure D+, Internal memor&bloc#D,

    ; :i'ure D+@ 6icrocontroller Pin 3etailsD

    ;I :i'ure D++ Address locations for a +5@ line 9C3DD

    ;II :i'ure D+ Pin dia'ram of +5@ line 9C3D

    ;III :i'ure D+D Electrical s&mbol of abu==erD

    I :i'ure D+- "u==er circuitr&DF

    :i'ure D+ 7u'ar Cube Rela&D>

    I :i'ure D+F Circuit s&mbols of rela&sD/

    II :i'ure D+> Rela& circuitr&-,

    III :i'ure D+/ K-; Power suppl& circuit-@

    I; :i'ure D, K@+; Power suppl& circuit-@

    ; :i'ure -@ 3rip irri'ation s&stem-D

    ;I :i'ure @ 8indow for choosin' the tar'et de%ice,

    ;II :i'ure + Project wor#spacepane@

    ;III :i'ure Project options dialo'@

    I :i'ure D L7a%e AllM and L"uild All Tar'et :ilesMbuttons@

    9 :i'ure - ;ision 3ebu''er window+

    9I :i'ure Reset* Run and 7tep into options

    9II :i'ure F Pro'rammin' window

    9III Anne5ure.I) 7napshots of the 7&stem>>./,

    3EPART6ENT O: AE 4 I 5 +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    11/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    5IS2 34 2AB5ES

    I Table +@ Importance of the %ariousparameters>

    II Table D@ 7election of the input channels+F

    III Table D+ Alternate functions of Port

    I; Table D Pin description of the 9C3D

    ; Table >@ 7oil moisture sensor readin'sFD

    ;I Table >+ 9i'ht sensor readin'sF-

    ;II Table > 2umidit& sensor readin'sF

    ;III Table >D Temperature sensor readin'sFF

    3EPART6ENT O: AE 4 I 5i +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    12/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    C2APTER @

    INTRO3$CTION

    3epartment of AE 4 I Pa'e @ +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    13/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    I"2!3D,C2I3"

    8e li%e in a world where e%er&thin' can be controlled and operated automaticall&*but there are still a few important sectors in our countr& where automation has not been

    adopted or not been put to a full.fled'ed use* perhaps because of se%eral reasons one such

    reason is cost One such field is that of a'riculture A'riculture has been one of the primar&

    occupations of man since earl& ci%ili=ations and e%en toda& manual inter%entions in farmin'

    are ine%itable 1reenhouses form an important part of the a'riculture and horticulture sectors

    in our countr& as the& can be used to 'row plants under controlled climatic conditions for

    optimum produce. Automatin' a 'reenhouse en%isa'es monitorin' and controllin' of the

    climatic parameters which directl& or indirectl& 'o%ern the plant 'rowth and hence their

    produce Automation is process control of industrial machiner& and processes* thereb&

    replacin' human operators

    & C ,! ! E " 2 S C E " A!I3

    1reenhouses in India are bein' deplo&ed in the hi'h.altitude re'ions where the sub.=ero temperature up to .D,Q C ma#es an& #ind of plantation almost impossible and in arid

    re'ions where conditions for plant 'rowth are hostile The e5istin' set.ups primaril& are)

    & MA", A5 SE2 , -:

    This set.up in%ol%es %isual inspection of the plant 'rowth* manual irri'ation ofplants*

    turnin' ON and O:: the temperature controllers* manual spra&in' of the fertili=ers and

    pesticides It is time consumin'* %ulnerable to human error and hence less accurate and

    unreliable

    ' - A! 2 I A5 5 = A, 2 3 M A 2E D SE2,-:

    This set.up is a combination of manual super%ision and partial automation and is

    similar to manual set.up in most respects but it reduces the labor in%ol%ed in terms of

    irri'atin' the set.up

    3epartment of AE 4 I Pa'e + +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    14/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    > 4 ,55= A ,2 3MA 2ED :

    This is a sophisticated set.up which is well equipped to react to most of the climatic

    chan'es occurrin' inside the 'reenhouse It wor#s on a feedbac# s&stem which helps it to

    respond to the e5ternal stimuli efficientl& Althou'h this set.up o%ercomes the problems

    caused due to human errors it is not completel& automated and e5pensi%e

    ' -!3B5EM D E4I"I2I 3 "

    A number of problems associated with the abo%e mentioned s&stems are enumerated

    asbelow)

    @ Comple5it& in%ol%ed in monitorin' climatic parameters li#e humidit&* soil moisture*

    illumination* soil p2* temperature* etc which directl& or indirectl& 'o%ern the plant

    'rowth

    + In%estment in the automation process are hi'h* as toda&s 'reenhouse control s&stems are

    desi'ned for onl& one parameter monitorin' !as per 1?;? research center(< to control

    more than one parameter simultaneousl& there will be a need to bu& more than one

    s&stem

    2i'h maintenance and need for s#illed technical labor# The modern proposed s&stems use

    the mobile technolo'& as the communication schemes and wireless data acquisition

    s&stems* pro%idin' 'lobal access to the information about ones farms "ut it suffers from

    %arious limitations li#e desi'n comple5it&* incon%enient repairin' and hi'h price Also

    the reliabilit& of the s&stem is relati%el& low* and when there are malfunctions in local

    de%ices* all local and tele data will be lost and hence the whole s&stem collapses 6ore

    o%er farmers in India do not wor# under such sophisticated en%ironment and find no

    necessit& of such an ad%anced s&stem* and cannot afford the same

    ?eepin' these issues in %iew* a microcontroller based monitorin' and control s&stem is

    desi'ned to find implementation in the near future that will help Indian farmers

    3epartment of AE 4 I Pa'e +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    15/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    > -!3-3SED M3 DE5 43 ! A,23MA2I3" 34 G!EE"63,SE

    The proposed s&stem is an embedded s&stem which will closel& monitor and control

    the microclimatic parameters of a 'reenhouse on a re'ular basis round the cloc# for

    culti%ation of crops or specific plant species which could ma5imi=e their production o%er the

    whole crop 'rowth season and to eliminate the difficulties in%ol%ed in the s&stem b& reducin'

    human inter%ention to the best possible e5tent The s&stem comprises of sensors* Analo' to

    3i'ital Con%erter* microcontroller and actuators

    8hen an& of the abo%e mentioned climatic parameters cross a safet& threshold which

    has to be maintained to protect the crops* the sensors sense the chan'e and the

    microcontroller reads this from the data at its input ports after bein' con%erted to a di'ital

    form b& the A3C The microcontroller then performs the needed actions b& emplo&in' rela&s

    until the stra&ed.out parameter has been brou'ht bac# to its optimum le%el 7ince a

    microcontroller is used as the heart of the s&stem* it ma#es the set.up low.cost and effecti%e

    ne%ertheless As the s&stem also emplo&s an 9C3 displa& for continuousl& alertin' the user

    about the condition inside the 'reenhouse* the entire set.up becomes user friendl&

    Thus* this s&stem eliminates the drawbac#s of the e5istin' set.ups mentioned in thepre%ious section and is desi'ned as an eas& to maintain* fle5ible and low cost solution

    3epartment of AE 4 I Pa'e D +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    16/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    C2APTER +

    7B7TE6 6O3E9

    3epartment of AE 4 I Pa'e - +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    17/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    BASIC M3DE5 34 26E S=S2EM

    4 ig # ' #& B lo c1 d iag ram of the s

    ystem

    3epartment of AE 4 I Pa'e +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    18/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    '#& -A !2S 34 26E S= S2EM:

    R 7ensors !3ata acquisition s&stem(

    Temperature sensor !96-(

    2umidit& sensor !2I2D,,,(

    9i'ht sensor !93R(

    6oisture sensor

    R Analo' to 3i'ital Con%erter ! A3C ,>,>0,>,/(

    R 6icrocontroller !AT>/7-+(

    R 9iquid Cr&stal 3ispla& !2itachiSs 23DDF>,(

    R Actuators Rela&s

    R 3e%ices controlled

    8ater Pump !simulated as abulb(

    7pra&er !simulated as abulb(

    Cooler !simulated as a fan(

    Artificial 9i'hts !simulated as +bulbs(

    R "u==er

    2 ! A" S D , CE!S D a t a acui s it ion s

    ystem+:

    This part of the s&stem consists of %arious sensors* namel& soil moisture* humidit&*

    temperature and li'ht These sensors sense %arious parameters. temperature* humidit&* soil

    moisture and li'ht intensit& and are then sent to the Analo' to 3i'ital Con%erter

    A "A 53G 23 DIG I2A5 C3" ?E !DE! AD C

    +:

    The analo' parameters measured b& the sensors are then con%erted to correspondin'

    di'ital %alues b& the A3C

    MIC! 3 C 3"2!355E!:

    The microcontroller is the heart of the proposed embedded s&stem It constantl&

    monitors the di'iti=ed parameters of the %arious sensors and %erifies them with the

    predefined threshold %alues and chec#s if an& correcti%e action is to be ta#en for the

    3epartment of AE 4 I Pa'e F +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    19/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    condition at that instant of time In case such a situation arises* it acti%ates the actuators to

    perform a controlled operation

    A C2,A2 3! S:

    An arra& of actuators can be used in the s&stem such as rela&s* contactors* and chan'e

    o%er switches etc The& are used to turn on AC de%ices such as motors* coolers* pumps*

    fo''in' machines* spra&ers :or the purpose of demonstration rela&s ha%e been used to dri%e

    AC bulbs to simulate actuators and AC de%ices A complete wor#in' s&stem can be reali=ed

    b& simpl& replacin' these simulation de%ices b& the actual de%ices

    DIS - 5A= ,"I2:

    A 9iquid cr&stal displa& is used to indicate the present status of parameters and the

    respecti%e AC de%ises !simulated usin' bulbs( The information is displa&ed in two modes

    which can be selected usin' a push button switch which to''les between the modes An&

    displa& can be interfaced to the s&stem with respecti%e chan'es in dri%er circuitr& and code

    '#' S2E-S 435537ED I" DESIG"I"G 26E S=S2EM:

    Three 'eneral steps can be followed to appropriatel& select the control s&stem)

    Step F &: I d enti f y mea s urable variabl e s im

    p o r t a n t to

    production#

    R It is %er& important to correctl& identif& the parameters that are 'oin' to be measured

    b& the controllers data acquisition interface* and how the& are to be measured The

    set of %ariables t&picall& used in 'reenhouse control is shown below)

    Sl# "o# ?ariable to be monitored Its Importance

    @ Temperature Affects all plant metabolic functions

    + 2umidit& Affects transpiration rate and the plantSs thermal

    control mechanisms

    7oil moisture Affects salinit&* and p2 of irri'ation water

    D 7olar Radiation Affects photos&nthetic rate* responsible for most

    thermal load durin' warmperiods

    2a ble ' #& Impo rta nce o f t he var io us para me ters

    3epartment of AE 4 I Pa'e > +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    20/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    An electronic sensor for measurin' a %ariable must readil& a%ailable* accurate* reliable

    and low in cost If a sensor is not a%ailable* the %ariable cannot be incorporated into the

    control s&stem* e%en if it is %er& important 6an& times %ariables that cannot be directl& or

    continuousl& measured can be controlled in a limited wa& b& the s&stem :or e5ample*

    fertilit& le%els in nutrient solutions for 'reenhouse production are difficult to measure

    continuousl&

    StepF ': Inve stig ate the co nt ro l strateg ies#

    R An important element in considerin' a control s&stem is the control strate'& that is to

    be followed The simplest strate'& is to use threshold sensors that directl& affect

    actuation of de%ices :or e5ample* the temperature inside a 'reenhouse can be

    affected b& controllin' heaters* fans* or window openin's once it e5ceeds the

    ma5imum allowable limit. The li'ht intensit& can be controlled usin' four threshold

    le%els As the li'ht intensit& decreases one li'ht ma& be turned on 8ith a further

    decrease in its intensit& a second li'ht would be powered* and so on< thus ensurin'

    that the plants are not depri%ed of adequate sunli'ht e%en durin' the winter season or

    a cloud& da&R 6ore comple5 control strate'ies are those based not onl& on the current %alues of the

    controlled %ariables* but also on the pre%ious histor& of the s&stem* includin' the rates

    at which the s&stem %ariables are chan'in'

    Step F>: Id e n t if y the soft/are and t he hard/a r e to be used#

    R It is %er& important that control s&stem functions are specified before decidin' what

    software and hardware s&stem to purchase The model chosen must ha%e the abilit&to)

    @ E5pand the number of measured %ariables !input subs&stem( and controlled

    de%ices !output subs&stem( so that 'rowth and chan'in' needs of the

    production operation can be satisfied in the future

    + Pro%ide a fle5ible and eas& to use interface

    It must ensure hi'h precision measurement and must ha%e the abilit& resist

    noise

    3epartment of AE 4 I Pa'e / +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    21/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    2ardware must alwa&s follow the selection of software* with the hardware required

    bein' supported b& the software selected In addition to functional capabilities* the selection

    of the control hardware should include factors such as reliabilit&* support* pre%ious

    e5periences with the equipment !successes and failures(* and cost

    3epartment of AE 4 I Pa'e @, +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    22/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    C2APTER "A7IC T2EORB

    3epartment of AE 4 I Pa'e @@ +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    23/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    BASIC 26E3!=

    >#& 5 I 4E -!3CESSES I "S I D E G!EE"63,SE:

    >#& - 6323 S= "2 6E2IC -! 3CESS

    The two major life.processes occurrin' in plants are photos&nthesis and transpiration

    Photos&nthesis is the con%ersion of li'ht ener'& into chemical ener'& b& li%in' or'anisms

    The raw materials are carbon dio5ide and water< the ener'& source is sunli'ht< and the end.

    products are o5&'en and !ener'& rich( carboh&drates* for e5ample sucrose* 'lucose and

    starch This process is ar'uabl& the most important biochemical pathwa&* since nearl& all

    life on Earth either directl& or indirectl& depends on it

    4i g > #& B loc1 diag ram o f p hot osynthe sis

    3epartment of AE 4 I Pa'e @+ +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    24/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    A commonl& used but sli'htl& simplified equation for photos&nthesis is)

    C3'g+ &' 6'3l+ photons H C6&'3a#+ 3'g+ 6'3l+ >#&+

    Carbon dio5ide K water K li'ht ener'& U 'lucose K o5&'en K water

    9i'ht ener'& obtained from the sun is %er& essential for photos&nthesis The photons

    present in li'ht are responsible for tri''erin' the li'ht.reaction in plants Plants need an

    optimum amount of e5posure to li'ht in a da& This optimum period is called its photo.

    period The plant sensiti%it& cur%e for photos&nthesis has its pea# at the red side of the

    spectrum This indicates that pro%idin' plants with the wa%elen'ths best suited to

    photos&nthesis is most efficient with the use of artificial li'ht Tests show a mean de%iation

    from the a%era'e sensiti%it& cur%e of less than -V for a wide %ariet& of plants The cur%e

    shows that the ma5imum sensiti%it& for photos&nthesis lies in the far red at appro5imatel&

    F- nm The plant sensiti%it& cur%e disputes two common misconceptions The first is that an

    WidealW plant 'rowin' lamp duplicates the spectral ener'& distribution of the sun 7unli'ht has

    a continual spectrum* radiatin' ener'& in wa%elen'ths that contribute less to photos&nthesis*

    and are therefore WwastedW on the plant :or this reason* man& lamps are more efficient than

    sunli'ht forplants

    Plants need dar# periods Periods of li'ht !called photo.periods( and dar# periods and

    their relati%e len'ths ha%e an effect on plant maturit& The dar# period of each da& affects

    flowerin' and seedin' of most plants Althou'h man& plants can 'row under continuous

    li'ht* nearl& all plants prefer a dar# period each da& for normal 'rowth All plants need some

    dar#ness to 'row well or to tri''er flowerin' The ideal photoperiods of plants %ar&* some

    preferrin' lon' da&s and short ni'hts< others the re%erse< and some do best when the len'th of

    the ni'ht and da& periods are equal

    >#' 2!A"S- I !A2 I 3"

    2ranspiration is the e%aporation of water from the aerial parts of plants* especiall&

    lea%es but also stems* flowers and roots Transpiration also cools plants and enables mass

    flow of mineral nutrients and water from roots to shoots 6ass flow is caused b& the decrease

    in h&drostatic !water( pressure in the upper parts of the plants due to the diffusion of water

    out of stomata into the atmosphere 8ater is absorbed at the roots b& osmosis* and an&

    dissol%ed mineral nutrients tra%el with it throu'h the 5&lem

    3epartment of AE 4 I Pa'e @ +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    25/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    The rate of transpiration is directl& related to the de'ree of stomatal openin'* and to

    the e%aporati%e demand of the atmosphere surroundin' the leaf The amount of water lost b&

    a plant depends on its si=e* alon' with the surroundin' li'ht intensit&* temperature* humidit&*

    and wind speed !all of which influence e%aporati%e demand( 7oil water suppl& and soil

    temperature can influence stomatal openin'* and thus the transpiration rate

    4 i g > #' 2rans

    pi ration

    The moisture content in the soil is a %er& crucial factor in the process of transpiration

    as the absorption of mineral salts from the soil throu'h the process of osmosis is directl&

    dependent on the moisture content in the soil#

    The 'reenhouse wor#s best when the temperature is not too hot and not too cold

    Thou'h it sounds simple in the sprin' and autumn we can easil& ha%e a wide ran'e of

    temperatures from the cold in the middle of the ni'ht to the e5cessi%e heat of the da& when

    the sun is shinin' 3urin' the da& the ra&s from the sun penetrate the 'reenhouse and warm

    up and li'ht up the surroundin's 9i'ht escapes throu'h the 'lass walls but the heat in form

    of infra.red radiations 'ets trapped inside the 'reen house leadin' to an incubatin' effect and

    the temperature inside 'raduall& increases This increased temperature leads to an increase in

    the rate of transpiration which is harmful to theplants

    3epartment of AE 4 I Pa'e @D +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    26/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    C2APTER D

    2AR38ARE 3E7CRIPTION

    3epartment of AE 4 I Pa'e @- +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    27/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    6 A!D7A!E DESC!I-2I3"

    *#& 2!A"S D , C E!S:

    A transducer is a de%ice which measures a ph&sical quantit& and con%erts it into a

    si'nal which can be read b& an obser%er or b& an instrument 6onitorin' and controllin' of a

    'reenhouse en%ironment in%ol%es sensin' the chan'es occurrin' inside it which can

    influence the rate of 'rowth in plants The parameters which are of importance are the

    temperature inside the 'reenhouse which affect the photos&nthetic and transpiration

    processes are humidit&* moisture content in the soil* the illumination etc 7ince all these

    parameters are interlin#ed* a closed loop !feedbac#( control s&stem is emplo&ed in

    monitorin' it The sensors used in this s&stem are)

    @ 7oil 6oisture 7ensor!Transistor amplifier(

    + 9i'ht 7ensor ! 93R !9i'ht 3ependent Resistor( (

    2umidit& 7ensor !2I2D,,,(

    D Temperature 7ensor !96-(

    *#& S3I5 M3IS2,!E SE"S3!

    *#& 4ea t ures of the So il m o ist u re sensor:

    @ The circuit desi'ned uses a -; suppl&* fi5ed resistance of @,,X* %ariable resistance

    of @,YX* two copper leads as the sensor probes* +N+++N transistor

    + It 'i%es a %olta'e output correspondin' to the conducti%it& of the soil

    The conducti%it& of soil depends upon the amount of moisture present in it It

    increases with increase in the water content of the soil

    D The %olta'e output is ta#en at the transmitter which is connected to a %ariable

    resistance This %ariable resistance is used to adjust the sensiti%it& of the sensor

    3epartment of AE 4 I Pa'e @ +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    28/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    VCC

    SENSOR LEADS

    @,, X

    2N222N

    ADC IN 5

    @, # X

    4 i g# * #& S o il moistu r e sensor

    *#' 4unct io n al d e s c ript io n of S o il m oistu r e sensor:

    The two copper leads act as the sensor probes The& are immersed into the specimen soil

    whose moisture content is under test The soil is e5amined under three conditions)

    CaseF&: D r

    y condit ion The probes are placed in the soil under dr& conditions and are

    inserted up to a fair depth of the soil As there is no conduction path between the two copper

    leads the sensor circuit remains open The %olta'e output of the emitter in this case ran'es

    from , to ,-;

    CaseF': 3ptimum c o ndition 8hen water is added to the soil* it percolates throu'h the

    successi%e la&ers of it and spreads across the la&ers of soil due to capillar& force This water

    increases the moisture content of the soil This leads to an increase in its conducti%it& which

    forms a conducti%e path between the two sensor probes leadin' to a close path for the current

    flowin' from the suppl& to the transistor throu'h the sensor probes The %olta'e output of thecircuit ta#en at the emitter of the transistor in the optimum case ran'es from @/ to D;

    appro5imatel&

    CaseF>: E J cess /ater cond it ion 8ith the increase in water content be&ond the optimum

    le%el* the conducti%it& of the soil increases drasticall& and a stead& conduction path is

    established between the two sensor leads and the %olta'e output from the sensor increases no

    further be&ond a certain limit The ma5imum possible %alue for it is not more than D+;

    3epartment of AE 4 I Pa'e @F +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    29/298

    CadmiumSulphide

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    *#' 5I G6 2 SE" S3!

    5ight Dependent !esistor !93R( also #nown as photoconductor or photocell* is a

    de%ice which has a resistance which %aries accordin' to the amount of li'ht fallin' on its

    surface 7ince 93R is e5tremel& sensiti%e in %isible li'ht ran'e* it is well suited for the

    proposed application

    4 ig # * #' 5ight Depen d ent !esi stor

    *#'#& 4eatures of the lig ht sensor:

    R The 9i'ht 3ependent Resistor !93R( is made usin' the semiconductor Cadmium

    7ulphide !Cd7(

    R The li'ht fallin' on the brown =i'=a' lines on the sensor causes the resistance of

    thede%ice to fall This is #nown as a ne'ati%e co.efficient There are some 93Rs that

    wor# in the opposite wa& ie their resistance increases with li'ht !called positi%e co.

    efficient(

    R he resistance of the 93R decreases as the intensit& of the li'ht fallin' on it increases

    Incident photons dri%e electrons from the %alence band into the conduction band

    conduction band

    CadmiumSulphide

    track

    Band gapvalence band

    4 i g# * #'#& Structure of a 5ight Dependent !esistor0 s h o/ing C a d m ium Su lphide trac1

    a nd a n atom to il l ust r a t e ele c tr o n s i n t he va l e nce and c o nd uction bands

    3epartment of AE 4 I Pa'e @> +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    30/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    *#'#' 4unct io nal de script io n

    R An 93R and a normal resistor are wired in series across a %olta'e* as shown in the

    circuit below 3ependin' on which is tied to the -; and which to ,;* the %olta'e at

    the point between them* call it the sensor node* will either rise or fall with increasin'

    li'ht If the 93R is the component tied directl& to the -;* the sensor node will

    increase in %olta'e with increasin' li'ht

    R The 93RSs resistance can reach @, # ohms in dar# conditions and about @,, ohms in

    fullbri'htness

    R The circuit used for sensin' li'ht in our s&stem uses a @, #X fi5ed resistor which is

    tied to K-; 2ence the %olta'e %alue in this case decreases with increase in li'ht

    intensit&

    VCC

    10K X

    ADC_IN4

    LDR

    GND

    4 i g# * #> 5ight sen s or circuit

    R The sensor node %olta'e is compared with the threshold %olta'es for different le%els

    of li'ht intensit& correspondin' to the four conditions. Optimum* dim* dar# and ni'ht

    R The relationship between the resistance !5 and li'ht intensit& 5uJ for a

    t&pical 93R is)

    !5 Z -,, 0 5uJ #X !D@(

    3epartment of AE 4 I Pa'e @/ +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    31/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    R 8ith the 93R connected to -; throu'h a @,? resistor* the output %olta'e of the 93R

    is )

    ;o Z -[R9 0 !R9K@,( !D+(

    R In order to increase the sensiti%it& of the sensor we must reduce the %alue of the fi5ed

    resistor in series with the sensor This ma& be done b& puttin' other resistors in

    parallel with it

    *#> 6,MIDI2= SE"S3!

    The humidit& sensor 2I2D,,,* manufactured b& 2one&well is used for sensin' the

    humidit& It deli%ers instrumentation qualit& R2 !Relati%e 2umidit&( sensin' performance in

    alow cost* solder able 7IP !7in'le In.line Pac#a'e( Relati%e humidit& is a measure* in

    percenta'e* of the %apour in the air compared to the total amount of %apour that could be held

    in the air at a 'i%en temperature

    4ig# * #* 6 I 6 * $$ $ $ $& 6umidi t

    y Sensor

    *#>#& 4 e a t u r es:

    R 9inear %olta'e output %s VR2

    R 9aser trimmed interchan'eabilit&

    R 9ow power desi'n

    R 2i'h accurac&

    R :ast response time

    3epartment of AE 4 I Pa'e +, +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    32/298

    12

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    R 7table* low driftperformance

    R Chemicall& resistant

    R The R2 sensor is a laser trimmed* thermoset pol&mer capaciti%e sensin' element with

    on.chip inte'rated si'nal conditionin' The sensin' elementSs multila&er construction

    pro%ides e5cellent resistance to most application ha=ards such as wettin'* dust* dirt*

    oils and common en%ironmental chemicals

    VCC

    &'#% 1 X

    Vin6I6*$$$ GND

    Vout3

    To ADC IN6

    4ig * #% 6 u midi t y s e n s or circuit

    *#>#' 4unct io nal de script io n

    R The sensor de%elops a linear %olta'e %s R2 output that is ratiometric to the suppl&

    %olta'e That is* when the suppl& %olta'e %aries* the sensor output %olta'e follows in

    the same proportion It can operate o%er a D.-> suppl& %olta'e ran'e At -; suppl&

    %olta'e* and room temperature* the output %olta'e ran'es from ,> to /; as the

    humidit& %aries from ,V to @,,V !noncondensin'(

    R The humidit& sensor functions with a resolution of up to ,-V of relati%e humidit&

    !R2(

    R 8ith a t&pical current draw of onl& +,, A* the 2I2.D,,, 7eries is ideall& suited for

    low drain* batter& operated s&stems

    R The chan'e in the R2 of the surroundin's causes an equi%alent chan'e in the %olta'e

    output The output is an analo' %olta'e proportional to the suppl& %olta'e

    3epartment of AE 4 I Pa'e +@ +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    33/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    Consequentl&* con%ertin' it to relati%e humidit& !R2( requires that both the suppl&

    and sensor output %olta'es be ta#en into account accordin' to the formula)

    R2 Z !!;out 0 ;suppl&( ,@( 0,,,+* t&pical at +-QC !D(

    R This %olta'e is con%erted to the di'ital form b& the A3C and then sent as input to the

    microcontroller which reads the data

    *#* 2E M-E !A2, !E SE"S 3!

    National 7emiconductors 96- IC has been used for sensin' the temperature It isan inte'rated circuit sensor that can be used to measure temperature with an electrical output

    proportional to the temperature !inoC( The temperature can be measured more accuratel&

    with it than usin' a thermistor The sensor circuitr& is sealed and not subject to o5idation* etc

    4 i g# * # 5 M >% temperature sensor

    *#*#& 4 e a t u r es:

    R Calibrated directl& in Q Celsius !Centi'rade(

    R 9inear K @,, m;0QC scale factor

    R ,-QC accurac& 'uaranteed !at K+-QC(

    R Rated for full \--Q to K@-,QC ran'e

    R 7uitable for remote applications

    R 9ow cost due to wafer.le%el trimmin'

    R Operates from D to , %olts

    R 9ess than , A current drain

    3epartment of AE 4 I Pa'e ++ +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    34/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    R 9ow self.heatin'* ,,>QC in still air

    R Nonlinearit& onl& ]@^DQC t&pical

    4ig# * # 2 empe ratu re s ensor ci rcuit

    *#*#' 4un c t io n al descri ption:

    R The sensor has a sensiti%it& of @,m; 0oC

    R The output of 96- is amplified usin' a 96+D sin'le power suppl& !K-;( op.amp

    R The op.amp is desi'ned to ha%e a 'ain of -

    R The circuitr& measures temperatures with a resolution of up to ,- de'ree Celsius

    RThe output %olta'e is con%erted to temperature b& a simple con%ersion factor The'eneral equation used to con%ert output %olta'e to temperature is)

    Temperature !oC( Z !;out [ @,, ( 0 -

    oC !DD(

    7o if ;out is -;* then* Temperature Z @,,oC

    R The output %olta'e %aries linearl& with temperature

    3epartment of AE 4 I Pa'e + +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    35/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    *#' A"A 5 3G 23 DIG I 2A5 C 3 " ? E ! 2E! A D C $ ) $ (+

    In ph&sical world parameters such as temperature* pressure* humidit&* and %elocit&

    are analo' si'nals A ph&sical quantit& is con%erted into electrical si'nals 8e need an analo'

    to di'ital con%erter !A3C(* which is an electronic circuit that con%erts continuous si'nals

    into discrete form so that the microcontroller can read the data Analo' to di'ital con%erters

    are the most widel& used de%ices for data acquisition

    Analo' world

    !temperature*

    pressure* etc(Transducer

    7i'nal

    Conditionin'

    Analo' to

    3i'ital Con%erter 6icrocontroller

    4 ig# * #) G e t ti n g d a t a f r om the a n a log /orl d

    *#'#& DESC!I-2I3"

    The A3C,>,/ data acquisition component is a monolithic C6O7 de%ice with an >.

    bit analo'.to.di'ital con%erter* >.channel multiple5er and microprocessor compatible control

    lo'ic The >.bit A03 con%erter uses successi%e appro5imation as the con%ersion technique

    The con%erter features a hi'h impedance chopper stabili=ed comparator* a +-R %olta'e

    di%ider with analo' switch tree and a successi%e appro5imation re'ister The >.channel

    multiple5er can directl& access an& of >.sin'le.ended analo' si'nals

    The desi'n of the A3C,>,/ has been optimi=ed b& incorporatin' the most desirable

    aspects of se%eral A03 con%ersion techniques The de%ice offers hi'h speed* hi'h accurac&*

    minimal temperature dependence* e5cellent lon'.term accurac& and repeatabilit&* and

    consumes minimal power These features ma#e it ideall& suited for applications from process

    and machine control to consumer and automoti%e applications

    *#'#' 4 EA 2 , ! ES

    @ Eas& interface to all microcontrollers

    + Operates ratiometricall& or with - ;3C or analo' span adjusted %olta'e reference

    No =ero or full.scale adjust required

    D >.channel multiple5er with address lo'ic

    - ,; to -; in

    put ran'e with sin'le -; power suppl&

    3epartment of AE 4 I Pa'e +D +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    36/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    Outputs meet TT9 %olta'e le%el specifications

    F +>.pin molded chip carrierpac#a'e#

    4ig # * #( B loc1 diag ram o f ADC $)$ (

    *#'#> C 3 " ?E!S I 3" ME 2 6 3D ,SED

    :ollowin' are the most used con%ersion methods)

    3i'ital.Ramp A3C

    7uccessi%e Appro5imation A3C

    :lash A3C

    Successive approJimation ADC is suitable for the proposed application It is much

    faster than the di'ital ramp A3C because it uses di'ital lo'ic to con%er'e on the %alue closest

    to the input %olta'e A comparator and a 3AC !3i'ital to Analo' Con%erter( are used in the

    process A flowchart e5plainin' the wor#in' is shownbelow

    3epartment of AE 4 I Pa'e +- +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    37/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    4ig # *#&$ 4lo/ chart eJplaining the Successive approJimation method

    *#'#* - I " DI AG! A M 34 A D C $)$)K$)$(

    4ig # * #& & -in diag ram o f ADC $)$(

    3epartment of AE 4 I Pa'e + +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    38/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    8e use A* "* C addresses to select IN,.INF and acti%ate Address latch enable !A9E(

    to latch in the address 7C is for 7tart Con%ersion EOC is for End of Con%ersion and OE is

    for Output Enable The output pins 3,.3F pro%ides the di'ital output from the chip ; ref !.(

    and ;ref !K( are the reference %olta'es

    *#'#% S E 5EC 2 I"G A" A " A5 3 G C6A""E5

    2ow to select the channel usin' three address pins A* "* C is shown in Table below)

    7elect Analo' Channel C " A

    IN, , , ,

    IN@ , , @

    IN+ , @ ,

    IN , @ @

    IND @ , ,

    IN- @ , @

    IN @ @ ,

    INF @ @ @

    2a bl e *#& Sel ection o f the input cha nnel s

    The A3C ,>,D is most widel& used chip* but since it has onl& one analo' input* A3C

    ,>,/ is chosen as this chip allows the monitorin' of up to > different transducers usin' onl& a

    sin'le chip The > analo' input channels are multiple5ed and selected accordin' to the

    requirement "ut for the proposed application onl& the last D channels ie* IND* IN-* IN and

    INF are used to monitor the four parameters. temperature* humidit&* soil moisture and li'ht

    intensit& 2ence the address line A33_C is 'i%en to ;cc !K -;( as it is alwa&s hi'h in this

    case ;ref !K( and ;ref !.( set the reference %olta'es If ;ref !.( Z1nd and ;ref !K( Z-;* the step

    si=e is -;0+-Z@/-

    7ince there is no self cloc#in' in this chip* the cloc# must be pro%ided from an

    e5ternal source to the Cloc# !C9?( pin The >.bit output from the A3C is 'i%en to Port , of

    3epartment of AE 4 I Pa'e +F +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    39/298

    3,

    3@

    3+

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    the microcontroller and the control si'nals A33_A* A33_"* A33_C* A9E* 7TART* OE*

    EOC are 'i%en to Port @ as shown in the fi'ure below

    !V

    +

    +F

    +>

    @

    +

    TE6PERAT$RE 7EN7OR

    6OI7T$RE 7EN7OR

    D

    2$6I3ITB 7EN7OR

    -

    9I12T 7EN7OR

    IN,

    IN@

    IN+

    IN

    IND

    IN-

    IN

    INF

    @@

    ;CC

    A3C,>,/

    @F

    @D

    @-

    >

    3

    @>3D

    @/

    3-

    +,

    3

    +@3F

    PIN @, O: 6C

    PIN @@ O: 6C

    PIN @+ O: 6C

    PIN @ O: 6C

    PIN @D O: 6C

    PIN @- O: 6C

    PIN @ O: 6C

    PIN @F O: 6C

    @+

    K-%

    @

    ;refK A33_A+-

    PIN D O: 6C

    +D

    @,

    /

    PIN , O: 6C

    F

    PIN O: 6C

    ;ref.

    C9OC?

    OE

    EOC

    1N3

    A33_"

    +

    A33_C

    7TART

    ++

    A9E

    PIN - O: 6C

    ;CC

    PIN @ O: 6C

    PIN F O: 6C

    @

    4i g# *#&' ADC $)$( pin details as used for this application

    At a certain point of time* e%en thou'h there is no con%ersion in pro'ress the

    A3C,>,/ is still internall& c&clin' throu'h > cloc# periods A start pulse can occur an& time

    durin' this c&cle but the con%ersion will not actuall& be'in until the con%erter internall&

    c&cles to the be'innin' of the ne5t > cloc# period sequence As lon' as the start pin is held

    hi'h no con%ersion be'ins* but when the start pin is ta#en low the con%ersion will start within

    3epartment of AE 4 I Pa'e +> +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    40/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    > cloc# periods The EOC output is tri''ered on the risin' ed'e of the start pulse It* too* is

    controlled b& the > cloc# period c&cle* so it will 'o low within > cloc# periods of the risin'

    ed'e of the start pulse One can see that it is entirel& possible for EOC to 'o low before the

    con%ersion starts internall&* but this is not important* since the positi%e transition of EOC*

    which occurs at the end of a con%ersion* is what the control lo'ic is loo#in' for Once EOC

    does 'o hi'h this si'nals the interface lo'ic that the data resultin' from the con%ersion is

    read& to be read The output enable !OE( is then raised hi'h

    4 i g * #&> 2i m ing dia g r a m of ADC $)$(

    * #> C 53 C8 C I! C,I2 != 4 3! A DC:

    *#>#& 4un c t io n a l Description:

    The cloc# for the A3C is 'enerated usin' the IC C3D,/* which is a +.input 7chmitt

    tri''ered NAN3 'ate A 7chmitt tri''er is a comparator circuit that incorporates positi%e

    feedbac#

    The Control pin is pulled hi'h and the capacitor char'es and dischar'es producin'

    alternate patterns of ,s and @* 'eneratin' a square wa%eform 8hen the input is hi'her than a

    certain chosen threshold* the output is hi'h< when the input is below another !lower( chosen

    threshold* the output is low< when the input is between the two* the output retains its %alue

    The tri''er is so named because the output retains its %alue until the input chan'es

    3epartment of AE 4 I Pa'e +/ +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    41/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    sufficientl& to tri''er a chan'e This dual threshold action is called h&steresis* and implies

    that the 7chmitt tri''er has some memor&

    4ig# * #&* C lo c1 ci rcu it ry for AD C

    The benefit of a 7chmitt tri''er o%er a circuit with onl& a sin'le input threshold is

    'reater stabilit& !noise immunit&( 8ith onl& one input threshold* a nois& input si'nal near

    that threshold could cause the output to switch rapidl& bac# and forth from noise alone A

    nois& 7chmitt Tri''er input si'nal near one threshold can cause onl& one switch in output

    %alue* after which it would ha%e to mo%e to the other threshold in order to cause another

    switch

    4ig # *#&% 2he effect of using a Schmitt t rigger B+ i nstea d of a co mpa rato r A+

    3epartment of AE 4 I Pa'e , +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    42/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    *#* MIC!3C3 "2!355E! A2)(S%'+

    *#*#& C! I 2E! I A 4 3! C633SI " G A MIC!3C3"2!355E!

    The basic criteria for choosin' a microcontroller suitable for the application are)

    @( The first and foremost criterion is that it must meet the tas# at hand efficientl& and cost

    effecti%el& In anal&=in' the needs of a microcontroller.based project* it is seen whether an >.

    bit* @.bit or +.bit microcontroller can best handle the computin' needs of the tas# most

    effecti%el& Amon' the other considerations in this cate'or& are)

    !a( Speed: The hi'hest speed that the microcontroller supports

    !b( - a c 1a g in g : It ma& be a D,.pin 3IP !dual inline pac#a'e( or a H:P !quad flatpac#a'e(* or some other pac#a'in' format This is important in terms of space*

    assemblin'* and protot&pin' the endproduct

    !c( -o/er c o nsumptio n : This is especiall& critical for batter&.powered products

    !d( The number of I0O pins and the timer on the chip

    !f( 2ow eas& it is to up'rade to hi'her performance or lower consumption %ersions

    !'( C o s t

    per uni t) This is important in terms of the final cost of the product in which

    a microcontroller is used

    +( The second criterion in choosin' a microcontroller is how eas& it is to de%elop products

    around it ?e& considerations include the a%ailabilit& of an assembler* debu''er* compiler*

    technical support

    ( The third criterion in choosin' a microcontroller is its read& a%ailabilit& in needed

    quantities both now and in the future Currentl& of the leadin' >.bit microcontrollers* the

    >,-@ famil& has the lar'est number of di%ersified suppliers "& supplier is meant aproducer

    besides the ori'inator of the microcontroller In the case of the >,-@* this has ori'inated b&

    Intel se%eral companies also currentl& producin' the >,-@

    Thus the microcontroller AT>/7-+* satisf&in' the criterion necessar& for the proposed

    application is chosen for the tas#

    *#*#' DE SC !I - 2 I 3 " :

    The >,-@ famil& of microcontrollers is based on an architecture which is hi'hl&

    optimi=ed for embedded control s&stems It is used in a wide %ariet& of applications from

    3epartment of AE 4 I Pa'e @ +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    43/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    militar& equipment to automobiles to the #e&board 7econd onl& to the 6otorola >2C@@ in

    ei'ht bit processors sales* the >,-@ famil& of microcontrollers is a%ailable in a wide arra& of

    %ariations from manufacturers such as Intel* Philips* and 7iemens These manufacturers ha%e

    added numerous features and peripherals to the >,-@ such as I+C interfaces* analo' to di'ital

    con%erters* watchdo' timers* and pulse width modulated outputs ;ariations of the >,-@ with

    cloc# speeds up to D,62= and %olta'e requirements down to @- %olts are a%ailable This

    wide ran'e of parts based on one core ma#es the >,-@ famil& an e5cellent choice as the base

    architecture for a compan&Ss entire line of products since it can perform man& functions and

    de%elopers will onl& ha%e to learn this oneplatform

    The AT>/7-+ is a low.power* hi'h.performance C6O7 >.bit microcontroller with

    >? b&tes of in.s&stem pro'rammable :lash memor& The de%ice is manufactured usin'

    Atmels hi'h.densit& non%olatile memor& technolo'& and is compatible with the industr&.

    standard >,C-@ instruction set and pinout The on.chip :lash allows the pro'ram memor& to

    be repro'rammed in.s&stem or b& a con%entional non%olatile memor& pro'rammer "&

    combinin' a %ersatile >.bit CP$ with in.s&stem pro'rammable :lash on a monolithic chip*

    the Atmel AT>/7-+ is a powerful microcontroller which pro%ides a hi'hl&.fle5ible and cost.

    effecti%e solution to man& embedded control applications In addition* the AT>/7-+ is

    desi'ned with static lo'ic for operation down to =ero frequenc& and supports two software

    selectable power sa%in' modes The Idle 6ode stops the CP$ while allowin' the RA6*

    timer0counters* serial port* and interrupt s&stem to continue functionin' The Power.down

    mode sa%es the RA6 con.tents but free=es the oscillator* disablin' all other chip functions

    until the ne5t interrupt or hardware reset

    *#*#> 4 EA 2 , ! ES:

    The basic architecture of AT>/C-@ consists of the followin' features)R Compatible with 6C7.-@ Products

    R >? "&tes of In.7&stem Pro'rammable !I7P( :lash 6emor&

    R D,; to --; Operatin' Ran'e

    R :ull& 7tatic Operation) , 2= to 62=

    R +- 5 >.bit Internal RA6

    R + Pro'rammable I0O 9ines

    3epartment of AE 4 I Pa'e + +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    44/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    R Three @.bit Timer0Counters

    R Ei'ht Interrupt 7ources

    R :ull 3uple5 $ART 7erial Channel

    R 9ow.power Idle and Power.down 6odes

    R Interrupt Reco%er& from Power.down 6ode

    R 8atchdo' Timer

    R :ast Pro'rammin' Time

    R :le5ible I7P Pro'rammin' !"&te and Pa'e 6ode(

    *#*#* - I" C3"4I G,!A2 I3"

    4ig# * #& -in di ag ram of A2)(S%'

    3epartment of AE 4 I Pa'e +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    45/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    *#*#% B53 C8 D IA G! AM

    4ig# * #& B lo c1 di ag ram of the mic ro co ntro ller

    3epartment of AE 4 I Pa'e D +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    46/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    *#*# - I " DESC!I-2I3"

    R ?CC: 7uppl& %olta'e

    R G"D: 1round

    R -ort $: Port , is an >.bit open drain bidirectional I0O port As an output port* each pin

    can sin# ei'ht TT9 inputs 8hen @s are written to port , pins* the pins can be used as

    hi'h.impedance inputs Port , can also be confi'ured to be the multiple5ed low.order

    address0data bus durin' accesses to e5ternal pro'ram and data memor& In this mode*

    P, has internalpull.ups

    R -ort &: Port @ is an >.bit bidirectional I0O port with internal pull.ups The Port @

    output buffers can sin#0source four TT9 inputs 8hen @s are written to Port @ pins*

    the& are pulled hi'h b& the internal pull.ups and can be used as inputs As inputs* Port

    @ pins that are e5ternall& bein' pulled low will source current !II9( because of the

    internal pull.ups In addition* P@, and P@@ can be confi'ured to be the timer0counter

    + e5ternal count input !P@,0T+( and the timer0counter + tri''er input !P@@0T+EJ(*

    respecti%el&* as shown in the followin' table

    R -ort ': Port + is an >.bit bidirectional I0O port with internal pull.ups The Port +output buffers can sin#0source four TT9 inputs 8hen @s are written to Port + pins*

    the& are pulled hi'h b& the internal pull.ups and can be used as inputs As inputs* Port

    + pins that are e5ternall& bein' pulled low will source current !II9( because of the

    internal pull.ups Port + emits the hi'h.order address b&te durin' fetches from

    e5ternal pro'ram memor& and durin' accesses to e5ternal data memor& that use @.

    bit addresses !6O; ` 3PTR( In this application* Port + uses stron' internal pull.

    ups when emittin' @s 3urin' accesses to e5ternal data memor& that uses >.bit

    addresses !6O; ` RI(* Port + emits the contents of the P+ 7pecial :unction

    re'ister

    R -ort >: Port is an >.bit bidirectional I0O port with internal pull.ups The Port

    output buffers can sin#0source four TT9 inputs 8hen @s are written to Port pins*

    the& are pulled hi'h b& the internal pull.ups and can be used as inputs As inputs* Port

    pins that are e5ternall& bein' pulled low will source current !II9( because of the

    pull.ups Port recei%es some control si'nals for :lash pro'rammin' an %erification

    3epartment of AE 4 I Pa'e - +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    47/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    Port also ser%es the functions of %arious special features of the AT>/7-+* as shown in

    the followin' table

    Alt er nate funct io ns of -ort >:

    2 a ble * #' Alt e rn a t e fun c ti o ns of -ort >

    R !S2: Reset input A hi'h on this pin for two machine c&cles while the oscillator

    is runnin' resets the de%ice This pin dri%es hi'h for /> oscillator periods after the

    watchdo' times out

    *#*##& -o /e r 3n ! eset ci rcuit

    4ig# * #&) -o /er on re set ci rcu it

    3epartment of AE 4 I Pa'e +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    48/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    In order for the RE7ET input to be effecti%e* it must ha%e a minimum duration of two

    machine c&cles

    R A5EK-!3G: Address 9atch Enable !A9E( is an output pulse for latchin' the

    low b&te of the address durin' accesses to e5ternal memor& This pin is also the

    pro'ram pulse input !PRO1( durin' :lash pro'rammin' In normal operation*

    A9E is emitted at a constant rate of @0 the oscillator frequenc& and ma& be used

    for e5ternal timin' or cloc#in' purposes Note* howe%er* that one A9E pulse is

    s#ipped durin' each access to e5ternal data memor& If desired* A9E operation

    can be disabled b& settin' bit , of 7:R location >E2 8ith the bit set* A9E is

    acti%e onl& durin' a 6O; or 6O;C instruction Otherwise* the pin is wea#l&

    pulled hi'h 7ettin' the A9E.disable bit has no effect if the microcontroller is in

    e5ternal e5ecution mode

    R -SE": Pro'ram 7tore Enable !P7EN( is the read strobe to e5ternal pro'ram

    memor& 8hen the AT>/7-+ is e5ecutin' code from e5ternal pro'ram memor&*

    P7EN is acti%ated twice each machine c&cle* e5cept that two P7EN acti%ations

    are s#ipped durin' each access to e5ternal data memor&

    R EA: E5ternal Access Enable EA must be strapped to 1N3 in order to enable the

    de%ice to fetch code from e5ternal pro'ram memor& locations startin' at ,,,,2

    up to ::::2 Note* howe%er* that if loc# bit @ is pro'rammed* EA will be

    internall& latched on reset EA should be strapped to ;CC for internal pro'ram

    e5ecutions This pin also recei%es the @+.%olt pro'rammin' enable %olta'e !;PP(

    durin' :lashpro'rammin'

    R 2A5&: Input to the in%ertin' oscillator amplifier and input to the internal cloc#

    operatin' circuit

    R 2A5': Output from the in%ertin' oscillator amplifier

    *#*##' 2he A 2)( S%' osci lla tor clo c1 cir cuit

    " It uses a quart= cr&stal oscillator

    " 8e can obser%e the frequenc& on the TA9+pin

    3epartment of AE 4 I Pa'e F +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    49/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    C2

    >$p4

    C1

    >$p4

    #$%&2

    #$%&1

    GN D

    4ig * #&( 2 he A2)( S%' oscillator cloc1 circuit

    " The cr&stal frequenc& is the basic internal frequenc& of the microcontroller

    " The internal counters must di%ide the basic cloc# rate to &ield standard

    communication bit per second !baud( rates

    " An @@,-/+ me'ahert= cr&stal* althou'h seemin'l& an odd %alue* &ields a cr&stal

    frequenc& of /+@ #ilohert=* which can be di%ided e%enl& b& the standard

    communication baud rates of @/+,,* /,,* D>,,* +D,,* @+,,* and ,, hert=

    *#*# S- EC IA5 4 , "C 2 I 3" !EGIS2E!S

    The 7pecial :unction Re'isters !7:Rs( contain memor& locations that are used for

    special tas#s Each 7:R occupies internal RA6 from ,5>, to ,5::The& are >.bits wide

    R The A !accumulator( re'ister or accumulator is used for most A9$ operations and

    "oolean "it manipulations

    R Re'ister " is used for multiplication 4 di%ision and can also be used for 'eneral

    purpose stora'e

    R P78 !Pro'ram 7tatus 8ord( is a bit addressable re'ister

    R PC or pro'ram counter is a special @.bit re'ister It is not part of 7:R Pro'ram

    instruction b&tes are fetched from locations in memor& that are addressed b& the

    PC

    3epartment of AE 4 I Pa'e > +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    50/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    R 7tac# Pointer !7P( re'ister is ei'ht bits wide It is incremented before data is

    stored durin' P$72 and CA99 e5ecutions 8hile the stac# ma& reside an&where

    in on.chip RA6* the 7tac# Pointer is initiali=ed to ,F2 after a reset This causes

    the stac# to be'in at location ,>2

    R 3PTR or data pointer is a special @.bit re'ister that is accessible as two >. bit

    re'isters) 3P9 and 3P2* which are used to used to furnish memor& addresses for

    internal and e5ternal code access and e5ternal data access

    R Control Re'isters) 7pecial :unction Re'isters IP* IE* T6O3* TCON* 7CON* and

    PCON contain control and status bits for the interrupt s&stem* the

    Timer0Counters* and the serialport

    R Timer Re'isters) Re'ister pairs !T2,* T9,( and !T2@* T9@( are the @.bit

    Counter re'isters for Timer0Counters , and @* respecti%el&

    *#*#) ME M3 != 3! GA"I LA2I 3"

    6C7.-@ de%ices ha%e a separate address space for Pro'ram and 3ata 6emor& $p to

    D? b&tes each of e5ternal Pro'ram and 3ata 6emor& can be addressed

    R - r og r am M e m o r y : If the EA pin is connected to 1N3* all pro'ram fetches are

    directed to e5ternal memor& On the AT>/7-+* if EA is connected to ;CC*

    pro'ram fetches to addresses ,,,,2 throu'h @:::2 are directed to internal

    memor& and fetches to addresses +,,,2 throu'h ::::2 are to e5ternal memor&

    R D a ta M e mo r y: The AT>/7-+ implements +- b&tes of on.chip RA6 The upper

    @+> b&tes occup& a parallel address space to the 7pecial :unction Re'isters This

    means that the upper @+> b&tes ha%e the same addresses as the 7:R space but are

    ph&sicall& separate from 7:R space 8hen an instruction accesses an internal

    location abo%e address F:2* the address mode used in the instruction specifies

    whether the CP$ accesses the upper @+> b&tes of RA6 or the 7:R space

    Instructions which use direct addressin' access the 7:R space The lower @+>

    b&tes of RA6 can be di%ided into three se'ments)

    3epartment of AE 4 I Pa'e / +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    51/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    ! e g i st e r B a n 1 s $ >: locations ,,2 throu'h @:2 !+ b&tes( The de%ice after reset

    defaults to re'ister ban# , To use the other re'ister ban#s* the user must select them

    in software Each re'ister ban# contains ei'ht @.b&te re'isters R,.RF Reset initiali=es

    the stac# point to location ,F2* and is incremented once to start from ,>2* which is

    the first re'ister of the second re'isterban#

    '# B i t Address a b l e Ar e a : @ b&tes ha%e been assi'ned for this se'ment +,2.+:2

    Each one of the @+> bits of this se'ment can be directl& addressed !,.F:2( Each of

    the @ b&tes in this se'ment can also be addressed as ab&te

    ># Sc r a tch - a d Area: ,2.F:2 are a%ailable to the user as data RA6 2owe%er* if

    the data pointer has been initiali=ed to this area* enou'h b&tes should be left aside to

    pre%ent 7P data destruction

    4ig# * #'$ I n ter n a l m e m o ry bloc1

    *#*#( 7A2C6D3G 2IME! 3netime Enabled /ith !esetout+

    The 83T is intended as a reco%er& method in situations where the CP$ ma& be

    subjected to software upsets The 83T consists of a @D.bit counter and the 8atchdo' Timer

    3epartment of AE 4 I Pa'e D, +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    52/298

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    53/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    2IME! M3D E > : In mode.* timer.@ simpl& hold its count* where as timer , re'isters T9,

    and T2, are used as two separate >.bit counters T9, uses the Timer., control bits T2,

    counts machine c&cles and ta#es o%er the use of TR@ and T:@ from Timer.@

    *#*#&& I " 2 E ! !, - 2S

    A computer has onl& two wa&s to determine the conditions that e5ist in internal and

    e5ternal circuits One method uses software instructions that jump to subroutines on the

    states of fla's and port pins The second method responds to hardware si'nals* called

    interrupts that force the pro'ram to call a subroutine

    The AT>/7-+ has a total of si5 interrupt %ectors) two e5ternal interrupts !INT, and

    INT@(* three timer interrupts !Timers ,* @* and +(* and the serial port interrupt Each of these

    interrupt sources can be indi%iduall& enabled or disabled b& settin' or clearin' a bit in

    7pecial :unction Re'ister IE IE also contains a 'lobal disable bit* EA* which disables all

    interrupts at once

    Each interrupt forces the processor to jump at the interrupt location in the memor&

    The interrupted pro'ram must resume operation at the instruction where the interrupt too#

    place Pro'ram resumption is done b& storin' the interrupted PC address on to stac#

    RETI instruction at the end of I7R will restore the PC address

    *#*#&' MIC!3C3" 2!3 55 E! C3"4IG,!A2 I3" , SED I" 26E SE2,-

    The microcontroller is interfaced with the A3C in pollin' mode INT, is used for the

    9C3 mode selection switch in order to switch between two modes of displa&)

    @( 7ensor output displa&

    +( Actuator status displa&

    Port details)

    R Port ,) Interfaced with the 9C3 data lines

    R Port @) Interfaced with the A3C data lines

    R Port +) Interfaced with the 9C3 Control lines and AC Interface control

    R Port ) Interfaced with the A3C control lines

    3epartment of AE 4 I Pa'e D+ +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    54/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    A3C_3,

    A3C_3@

    A3C_3+

    A3C_3

    A3C_3D

    A3C_3-

    A3C_3

    A3C_3F

    -$

    -&

    -'

    ->

    -*

    -%

    -

    -

    VCC

    -$#$

    -$#&

    -$#'

    -$#>

    -$#*

    -$#%

    -$#

    9E3K

    3",

    3"@

    3"+

    3"

    3"D

    3"-

    3"

    A3C_A

    A3C_"

    A3C_7TART

    A3C_A9E

    A3C_EOC

    A3C_OE

    "$GGER

    6O3E 7E9ECTION 78ITC2

    ->#*

    ->#%

    ->#&

    ->#

    ->#>

    ->#$

    ->#

    ->#'

    AT>/7-+

    -$#

    EA

    A5E

    -SE"

    -'#

    -'#

    -'#%

    -'#*

    3"F

    ENA"9E

    R08 !Read08rite(

    R7 !Re'ister select(

    COO9ER

    >$ p4

    >$ p4

    @,u:

    >+ #

    R7T

    1N3

    2A5'

    2A5&

    !S2

    G"D

    -'#>

    -'#'

    -'#&

    -'#$

    P$6P

    7PRABER

    9I12T @

    9I12T +

    4i g# *#'& Microco ntro ller pi n details

    3epartment of AE 4 I Pa'e D +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    55/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    *#% 5I@, I D C!= S 2A5 DIS-5A=

    A liquid cr&stal displa& !9C3( is a thin* flat displa& de%ice made up of an& number of

    color or monochrome pi5els arra&ed in front of a li'ht source or reflector Each pi5el consists

    of a column of liquid cr&stal molecules suspended between two transparent electrodes* and

    two polari=in' filters* the a5es of polarit& of which are perpendicular to each other 8ithout

    the liquid cr&stals between them* li'ht passin' throu'h one would be bloc#ed b& the other

    The liquid cr&stal twists the polari=ation of li'ht enterin' one filter to allow it to pass throu'h

    the other

    6an& microcontroller de%ices use Ssmart 9C3S displa&s to output %isual information

    9C3 displa&s desi'ned around 2itachiSs 9C3 23DDF>, module* are ine5pensi%e* eas& to

    use* and it is e%en possible to produce a readout usin' the >5>, pi5els of the displa& The&

    ha%e a standard A7CII set of characters and mathematical s&mbols

    :or an >.bit data bus* the displa& requires a K-; suppl& plus @@ I0O lines :or a D.bit

    data bus it onl& requires the suppl& lines plus se%en e5tra lines 8hen the 9C3 displa& is not

    enabled* data lines are tri.state and the& do not interfere with the operation of the

    microcontroller

    3ata can be placed at an& location on the 9C3 :or @+ 9C3* the address locations

    are)

    4irst line )$ )& )' )> )* )% ) through )4

    Second line C$ C& C' C> C* C% C through C4

    4ig * #'' Addr ess lo cations for a ' J& li ne 5CD

    *#%#& SIG"A5S 23 26E 5CD

    The 9C3 also requires control lines from the microcontroller)

    &+ E n a b le E+

    This line allows access to the displa& throu'h R08 and R7 lines 8hen this line

    is low* the 9C3 is disabled and i'nores si'nals from R08 and R7 8hen !E( line is

    hi'h* the 9C3 chec#s the state of the two control lines and responds accordin'l&

    '+ !eadK7rite !K7+

    This line determines the direction of data between the 9C3 and microcontroller

    3epartment of AE 4 I Pa'e DD +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    56/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    8hen it is low* data is written to the 9C3 8hen it is hi'h* data is read from the

    9C3

    >+ ! e gi ster s e le ct !S+

    8ith the help of this line* the 9C3 interprets the t&pe of data on data lines 8hen it is

    low* an instruction is bein' written to the 9C3 8hen it is hi'h* a character is bein' written

    to the 9C3

    *#%#& 5ogic s t atus on c o n t r o l lines:

    " E . , Access to 9C3 disabled

    . @ Access to 9C3 enabled

    " R08 . , 8ritin' data to 9C3

    . @ Readin' data from 9C3

    " R7 . , Instruction

    . @ Character

    *#%#' 7 r i t in g a n d r e ad ing the d a t a f r om the 5CD:

    8ritin' data to the 9C3 is done in se%eral steps)

    @( 7et R08 bit to low

    +( 7et R7 bit to lo'ic , or @ !instruction or character(

    ( 7et data to data lines !if it is writin'(

    D( 7et E line to hi'h

    -( 7et E line to low

    Read data from data lines !if it is readin'()

    @( 7et R08 bit to hi'h

    +( 7et R7 bit to lo'ic , or @ !instruction or character(

    ( 7et data to data lines !if it is writin'(

    D( 7et E line to hi'h-( 7et E line to low

    *#%#' - I " DESC!I-2I3"

    6ost 9C3s with @ controller has @D Pins and 9C3s with + controller has @ Pins

    !two pins are e5tra in both for bac#.li'ht 9E3 connections(

    3epartment of AE 4 I Pa'e D- +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    57/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    4ig * #'> -in d ia g ram o f ' J & li ne 5CD

    2able * #'> - i n descri p tion o f t he 5CD

    *# A 5A !M C I!C, I2!=

    B,L L E!:

    A buer or beeper is a si'nalin' de%ice* usuall& electronic* t&picall& used in

    automobiles* household appliances such as a microwa%e o%en

    4ig # *#'* Elec trical symbol of a bu er

    3epartment of AE 4 I Pa'e D +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    58/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    It is connected to the control unit throu'h the transistor that acts as an electronic

    switch for it 8hen the switch forms a closed path to the bu==er* it sounds a warnin' in the

    form of a continuous or intermittent bu==in' or beepin' sound

    The transistor acts as a normal controlled b& the base connection It switches ON

    when a positi%e %olta'e from the control unit is applied to the base If the positi%e %olta'e is

    less than ,;* the transistor switches O:: No current flows throu'h the bu==er in this case

    and it will not bu== As can be seen in the bu==er circuitr& 'i%en below* a protection resistor

    of @,# ohm is used in order to protect the transistor from bein' dama'ed in case of e5cessi%e

    current flow In our s&stem* the bu==er is desi'ned to 'i%e a small beep whene%er one of the

    de%ices such as a cooler or a bulb turns on in order to alert the user

    4i g# * #'% Buer circuitry

    *# ! E 5 A =S

    A rela& is an electrical switch that opens and closes under the control of another

    electrical circuit In the ori'inal form* the switch is operated b& an electroma'net to open or

    close one or man& sets of contacts It was in%ented b& Joseph 2enr& in @>- "ecause a rela&

    is able to control an output circuit of hi'her power than the input circuit* it can be considered

    to be* in a broad sense* a form of an electrical amplifier

    3epartment of AE 4 I Pa'e DF +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    59/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    4ig # * #' Suga r cube relay

    3espite the speed of technolo'ical de%elopments* some products pro%e so popular

    that their #e& parameters and desi'n features remain %irtuall& unchan'ed for &ears One suchproduct is the su'ar cube rela&* shown in the fi'ure abo%e* which has pro%ed useful to

    man& desi'ners who needed to switch up to @,A* whilst usin' relati%el& little PC" area

    7ince rela&s are switches* the terminolo'& applied to switches is also applied to

    rela&s A rela& will switch one or more poles* each of whose contacts can be thrown b&

    ener'i=in' the coil in one of three wa&s)

    @" o rmally open " 3 + contacts connect the circuit when the rela& is acti%ate d< the circuit

    is disconnected when the rela& is inacti%e It is also called a :OR6 A contact or Lma#eM

    contact

    +" o rmally c lo s ed " C+ contacts disconnect the circuit when the rela& is acti%ated < the

    circuit is connected when rela& is inacti%e It is also called :OR6 " contact orM

    brea#M contact

    Cha n g e o ver or dou b l e th r o/ contacts control two circuits < one normall& open contact

    and one normall& closed contact with a common terminal It is also called a :orm C

    LtransferLcontact

    The followin' t&pes of rela&s are commonl& encountered)

    3epartment of AE 4 I Pa'e D> +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    60/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    WCW denotes the common terminal in 7P3T and 3P3T t&pes

    4i g # * #' Di f ferent t

    y

    p e s of !elays

    R S-S2 . Sin ' le -ole Sin ' le 2hr o w ) These ha%e two terminals which can be connected

    or disconnected Includin' two for the coil* such a rela& has four terminals in total It

    is ambi'uous whether the pole is normall& open or normall& closed The terminolo'&

    W7PNOW and W7PNCW is sometimes used to resol%e the ambi'uit&

    R S-D2 . Sin ' le -ole Dou b le 2hr o w ) A common terminal connects to either of twoothers Includin' two for the coil* such a rela& has fi%e terminals in total

    R D-S2 . Dou b le -ole Sin ' le 2hr o w ) These ha%e two pairs of terminals Equi%alent to

    two 7P7T switches or rela&s actuated b& a sin'le coil Includin' two for the coil* such

    a rela& has si5 terminals in total It is ambi'uous whether the poles are normall& open*

    normall& closed* or one of each

    R D-D2 . Dou b le -ole Dou b le 2hrow) These ha%e two rows of chan'e.o%er terminals

    Equi%alent to two 7P3T switches or rela&s actuated b& a sin'le coil 7uch a rela& has

    ei'ht terminals* includin' the coil

    R @-D2 . @uadr up le -o l e Do uble 2h r ow ) Often referred to as Huad Pole 3ouble

    Throw* or DP3T These ha%e four rows of chan'e.o%er terminals Equi%alent to four

    7P3T switches or rela&s actuated b& a sin'le coil* or two 3P3T rela&s In total*

    fourteen terminals includin' the coil

    The Rela& interfacin' circuitr& used in the application is)

    3epartment of AE 4 I Pa'e D/ +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    61/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    1N4148

    4ig# *#') ! el ay ci rcuit r

    y

    *#) -3 7 E! S ,- - 5= C3""EC2I3"

    The power suppl& section consists of step down transformers of +,; primar& to /;

    and @+; secondar& %olta'es for the K-; and K@+; power supplies respecti%el& The stepped

    down %olta'e is then rectified b& D @ND,,F diodes The hi'h %alue of capacitor @,,, :

    char'es at a slow rate as the time constant is low* and once the capacitor char'es there is no

    resistor for capacitor to dischar'e This 'i%es a constant %alue of 3C IC F>,- is used for

    re'ulated suppl& of K- %olts and IC F>@+ is used to pro%ide a re'ulated suppl& of K@+ %olts in

    order to pre%ent the circuit ahead from an& fluctuations The filter capacitors connected after

    this IC filters the hi'h frequenc& spi#es These capacitors are connected in parallel with

    suppl& and common so that spi#es filter to the common These 'i%e stabilit& to the power

    suppl& circuit

    As can be seen from the abo%e circuit dia'rams* the rectified %olta'e from the D

    diodes is 'i%en to pin @ of the respecti%e re'ulators Pin + of the re'ulators is connected to

    'round and pin to ;cc 8ith adequate heat sin#in' the re'ulator can deli%er @A output

    current If internal power dissipation becomes too hi'h for the heat sin#in' pro%ided* the

    thermal shutdown circuit ta#es o%er pre%entin' the IC from o%erheatin'

    3epartment of AE 4 I Pa'e -, +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    62/298

    3

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    1Vin '()! Vout

    GND

    2

    23)V* !)+,

    1)))u-

    1)u- 1u-

    4i g # *#'( %? -o/er supply circuit

    4ig # * #>$ &'? -o/er suppl

    y Circui t

    3epartment of AE 4 I Pa'e -@ +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    63/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    CI!C,I2 SC6EMA2IC 34 26E S=S2EM

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    64/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    C2APTER -

    7B7TE67 $7E3 IN 8OR? 6O3E

    3epartment of AE 4 I Pa'e - +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    65/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    %#& D!I- I! !IGA2I3" S= S2EM 43 ! C3"2!355I" G S3I5 M3IS2,!E

    3rip* or micro.irri'ation* technolo'& uses a networ# of plastic pipes to carr& a low

    flow of water under low pressure toplants

    -olyethylene tubing is run from the source of water to the plant* where the emitter is

    attached for drippin' water Emitter line !pol& tubin' with pre.installed emitters( is used

    where a continuous band of water is needed 4ittings are a%ailable to ma#e sharp turns

    !elbows(* branch lines !tees(* and to ma#e the transition between different si=es of tubin'

    8hen plants are remo%ed or die* drip lines should beplu''ed

    4ig# % #& D r ip irrigation s

    ystem

    3rip irri'ation !sometimes called tric#le irri'ation( wor#s b& appl&in' water slowl&*

    directl& to the soil The hi'h efficienc& of drip irri'ation results from two primar& factors

    The first is that the water soa#s into the soil before it can e%aporate or run off The second is

    that the water is onl& applied where it is needed* !at the plantSs roots( rather than spra&ed

    e%er&where

    A drip irri'ation s&stem slowl& pro%ides water to the plantSs root s&stem Re'ular

    waterin' pre%ents plant deh&dration* but roots donSt 'et o%erl& soa#ed and in turn* plant

    'rowth can increase up to -,V 3rip s&stems irri'ate all t&pes of landscape) shrubs* trees*

    perennial beds* 'round co%ers* annuals and lawns 3rip is the best choice to water roof 'ar.

    3epartment of AE 4 I Pa'e -D +,,/.+,@,

  • 8/12/2019 Monitor and Control OfGreenhouse Environment-GreenBee

    66/298

    6ONITOR AN3 CONTRO9 O: 1REEN2O$7E EN;IRON6ENT

    dens* containers on dec#s and patios* row crops and #itchen 'ardens* orchards* and

    %ine&ards

    %#' A !2I 4ICIA5 G!37 I" G 5IG62S 4 3! C3" 2!3 55I"G I55,M I"A2I3"

    1rowin' li'hts enable culti%ators to e5tend da&li'ht hours . useful for winter and

    sprin' 'rowin' when le%els of natural li'hts can be low* and one can therefore impro%e plant

    'rowth Three basic