NewEnvironmentParametersMonitoringAndControlSystemForGreenhouseBasedOnMaster-slaveDistributedAbstract--Accordingtotheactualneedofmonitoringandcontrolofgreenhouseenvironmentparametersinruralareas,amaster-slavedistributedmeasurementandcontrolsystemisdesigned,inwhichPCistakenasthehost.ThesystemconsistsofPC,soilmoisturemeasurementandcontrolmodule,temperatureandhumidity,andCO2monitoringandcontrolmodule.Inthesystem,PChaslargeamountofdatastoragewhichiseasytomakeuseoffuzzycontrolexpertsystem,configurationsoftware-KingViewisusedtodevelopsoftwareforPC,bywhichthedevelopmentcycleisshortenandafriendlyhuman-computerinteractionisprovided.EachmonitoringandcontrolmoduleconsistsofSTC12seriesofmicrocontrollers,sensors,relaysetc.Differentmodulesareselectbasedontheneedifsystemtoachievecontrolgreenhouseinpartitionandblock.I.INTRODUCTIONTomodernindooragriculture,theautomaticmeasurementandcontrolofenvironmentparametersisthekeytoachievecropyieldandqualityofgreenhouse.Inrecentyears,facilitiesagriculturedevelopsvigorouslyinourcountry,matchedwithit,themonitoringandcontrolinstrumentofgreenhousehavealsomadecertaindevelopment.Afternearly10yearsofunremittinghardwork,ourresearchteamofmeasurementandcontrolsystemofagricultureenvironmentparameters,designedanintelligentmeasurementandcontrolsystemofdistributioncombinedofgreenhousewhichcanbepopularizedinthevastruralareas.Thissystemismainlycontroloftemperature,humidity,CO2concentration,soilmoistureandilluminationofgreenhouse.OFSCM,asthedatastorageissmall,displayinterfaceissingle,amountofinformationislimited,butitscapabilitypriceratioishigh,soitisusedasafrontunitofdataacquisitionandcontrol;andofPC,ithasalargeamountofdatastorage,richsoftware,convenienthuman-computerinteraction,andsoon.Ifweuseoutdatedandlow-pricedPC,takingthePCastheuppermachine,takingthedifferentfunctioncontrolmodulescomposedofmultiplemicrocomputersasthelowermachines,thenamaster-slavedistributedandintelligentcontrolsystembasesonmicrocomputerismadeup,bywhichbothbettermonitoringandcontrol,displayanddatacollectionormanagementareachieved,butalsolowercostofsystemisgetaccordingtotheactualneed.IISYSTEMSTRUCTUREANDPRINCIPLEThemostmarkedfeatureofthedistributioncombinedandintelligentcontrolsystemgreenhouseisthatofincorporatingwithdataacquisition,controlandmanagementasawhole,modulecombination,simplestructure,convenienthuman-computerinteraction,andusingtechnologyofintelligentexpertfuzzycontrol,whichcanadapttoavarietyofcropmanagementcontrolingreenhouse.ThebasicstructureofthesystemisshowninFig.1.Thestructureofthedistributedsystemiscomposedoftwolayers:theupperandlower.Inthetop-pricePCistakenasthehosttomakesystemmanagementandexpertsfuzzyoperationinintelligent,andtoprovideafriendlyhuman-computerinterface,andtorealizetheunitedmonitoringandmanagementofgreenhouse;theloweriscomposedofaseriesofmodulesofdifferentfunction,andineachmodule,asinglechipofAT89Cisadoptedasthelowermachine,RS485isusedtocommunicatePCwithallAT89C,andthenthecollection,processingandcontrolofthegreenhouseparametersisachieved.Eachfunctionmoduleiscompletelyisolatedinelectrical,anyfailureonthenoduledoesnotproduceanyeffectonothermodules.Thesystemcollectsseparatelywaysofenvironmentinformationthrougheachmonitoringandcontrolmodule,andsendsittohostPCthroughtheRS485interface.AndinthePCconfigurationcontrolsystem,theacquiredparametersarecomparedwiththevaluesofsetting,thenaccordingtoavarietyofexpertintelligentfuzzycontrolsystemofcropsatdifferentgrowthstages,thefuzzycontrolinstructionsontheenvironmenttemperature,humidity,CO2concentration,soilwatercontentandthecorrespondingoperationinstructionsoralarmaregiven.ThesystemisappliedinruralgreenhousesinQinhuangdao.Usuallyat1/4nearEastandWestendinagreenhouse,andattheheightof1.5mfromthegroundinthemiddleinthenorthernhalf(nearthewetcurtain)andthesouthernhalf(nearthefan),amoduleofairtemperatureandhumidity,CO2concentrationandamoduleofsoilmoisturecontentareset;amoduleofsoilmoisturecontentwillbeaddedinthemiddleofthegreenhouseaccordingtotheactualcondition;attheheightof1.5minthemainentrance,awatertankisset,ofwhichthesolenoidofdriptubeshouldbesetbasedontheneedandcontrolledbymoduleofsoilmoisturecontent;andthePCisplacedinthemainentrancetothegreenhouse.III.HARDWAREDESIGNA.TheCPandcommunicationsystemInthedistributedsystemofdataacquisitionandcontrol,asthemicrocontrolunitislimitedindatastorageandslowincalculatingofcomplexfunctions,soPCisusedandthemaster-slavemoduleisadoptedinthesystem,thatisasystemof,takingPCasthehostandtakingtheSCMsystemslocatedinthesceneasslave.Inthisdistributedsystem,communicationisthekeytoit.Generally,theserialportofPCisstandardRS232,ofwhichtransmissiondistanceisshorter.Butinagriculturecontrolsystem.itscommunicationdistanceisoftensofmetersorseveralkilometers,soRS232/RS485converterisusedtoachievecommunicationbetweenthePCandSCM.Toreduceinvestment,bothconsideringtheuserconvenienceandfriendlyhuman-computerinteraction,low-pricePCofabove486andbelowPIVisadopted;andconsideringtheoperationofconfigurationsoftware,itisrequiredthatmemoryis64Moraboveandharddiskis1