Beruflich Dokumente
Kultur Dokumente
Green house intelligent control system is designed to protect the plants from more cool
and hot weather and additional control system is included to save power by making fans and
lights automatically turn on and off with the help of intelligent control system. In this project,
the intelligent control system is developed using microcontroller and sensors. Green house
system has a very important use now a days in the agriculture field.Some plants need the specific
amount of water for their proper growth and more productivity, therefore farmer should provide
them the proper quantity of water. But its difficult for the farmer to get a estimation for quantity
of moisture in soil. But in this project moisture sensor is used to to provide this facility with
a intelligent control system
Block diagram below shows the main functionality of green house intelligent control
system. Four sensors are used to measure different parameters of green house system which
includes temperature sensor, light sensor, humidity sensor, moisture sensor.
Light sensor :
Light dependent resistor is used as a light sensor. LDR is kind of variable resistor which
resistance changes with the change in light intensity. So LDR resistance is converted into
intensity of light by using LDR resistance and intensity of light formula. LPC2148
microcontroller is used to measure intensity of light. When intensity of light fall under a certain
limit, microcontroller provide signal to relay to turn on light and when intensity of light raise
upto a certain limit , microcontroller provide signal to relay to turn off fan. So light sensor is
used to add automatic light switching functionality in the green house system, if you dont have
much money to afford a gardener, then you can use green house intelligent control system to
make your green house self-operating.
Moisture sensor :
Block Diagram
Simulation
#include "config.h"
#include "stdlib.h"
#include <stdio.h>
#include <LPC214X.H>
OS_EVENT * Rmailbox;
OS_EVENT * ADCsem;
char buffer[25];
IODIR0 |= 0x000000F0; // Set the port direction (P0.4-P0.7 port pins output)
adc_init();
UART0_Init();
LED_init();
TargetInit();
OSInit ();
ADCsem=OSSemCreate(1);
OSStart();
return 0;
pdata = pdata;
while(1)
Svalue=OSMboxPend(Rmailbox,50,&err);
if(err==10)
{}
else
fno=*Svalue;
switch(fno)
case 1:
IOSET0=0x00000010; //LED_on(0);
OSTimeDly(10);
IOCLR0=0x00000010;
break;
case 2:
IOSET0=0x00000020;//LED_on(1);
OSTimeDly(8);
IOCLR0=0x00000020;
break;
case 3:
IOSET0=0x00000040; //LED_on(2);
OSTimeDly(4);
IOCLR0=0x00000040;
break;
case 4:
IOSET0=0x00000080; //LED_on(3);
OSTimeDly(2);
IOCLR0=0x00000080;
break;
int value,c,d;
c=1;
d=0;
pdata = pdata;
while(1)
OSSemPend(ADCsem,0,&err);
value=adc_get_val(1);
OSSemPost(ADCsem);
if(value*3/1023 < 2)
OSMboxPost(Rmailbox, &c);
OSMboxPost(Rmailbox, &d);
OSTimeDly(20);
int value,c,d;
c=2;
d=0;
pdata = pdata;
while(1)
OSSemPend(ADCsem,0,&err);
value=adc_get_val(2);
OSSemPost(ADCsem);
if(value*3/1023 <2)
OSMboxPost(Rmailbox, &c);
OSMboxPost(Rmailbox, &d);
OSTimeDly(15);
int value,c,d;
c=3;
d=0;
pdata = pdata;
while(1)
OSSemPend(ADCsem,0,&err);
value=adc_get_val(3);
OSSemPost(ADCsem);
if(value*3/1023 <2)
OSMboxPost(Rmailbox, &c);
OSMboxPost(Rmailbox, &d);
OSTimeDly(11);
int value,c,d;
c=4;
d=0;
pdata = pdata;
while(1)
OSSemPend(ADCsem,0,&err);
value=adc_get_val(4);
OSSemPost(ADCsem);
if(value*3/1023 <2)
OSMboxPost(Rmailbox, &c);
OSMboxPost(Rmailbox, &d);
OSTimeDly(4);
So this project can be easily used in any green house system to make to self-operated and
automatic control of devices. You can also add extra functionality in this project by adding
wireless communication to send values of sensors and status of devices to someone which is not
at remote location.