The system has 4 basic modules:
1) Solar Module
1) Solar Module
The code is pretty simple. First, the ADC converter is activated, the input and output ports are set (PORT B is used for interfacing the LCD, Pin no. 2 and 3 of PORT C are used for providing the output to the ULN 2003A IC, Pin no. 4, 5 & 6 for inputs from moisture sensors and Pin no. 7 for input from rain water level sensor) and the LCD is initialized.
Then the condition of the three moisture sensors is checked. If they are dry i.e. their output is logic '0'
if((PORTC.F4 == 0)&&(PORTC.F5 == 0)&&(PORTC.F6 == 0))
then the program checks whether there is water in the rain water tank. If the output of the rain water level sensor is logic '1'
if(PORTC.F7 == 1)
then it means that there is water in the tank and the irrigation will start.
As soon as the moisture sensors become wet they give output as logic '1'
if((PORTC.F4 == 1)&&(PORTC.F5 == 1)&&(PORTC.F6 == 1))
the irrigation is stopped and 'Irrigation done' is displayed on the LCD.
Lcd_Cmd(_LCD_CLEAR);
Lcd_Out(1,4, "IRRIGATION");
Lcd_Out(2,7, "DONE");
If the output of the rain water level sensor is logic '0'
if(PORTC.F7 == 0)
then ground water is used for irrigation.
This enables the water to get in the field only when it is required.Then the condition of the three moisture sensors is checked. If they are dry i.e. their output is logic '0'
if((PORTC.F4 == 0)&&(PORTC.F5 == 0)&&(PORTC.F6 == 0))
then the program checks whether there is water in the rain water tank. If the output of the rain water level sensor is logic '1'
if(PORTC.F7 == 1)
then it means that there is water in the tank and the irrigation will start.
As soon as the moisture sensors become wet they give output as logic '1'
if((PORTC.F4 == 1)&&(PORTC.F5 == 1)&&(PORTC.F6 == 1))
the irrigation is stopped and 'Irrigation done' is displayed on the LCD.
Lcd_Cmd(_LCD_CLEAR);
Lcd_Out(1,4, "IRRIGATION");
Lcd_Out(2,7, "DONE");
If the output of the rain water level sensor is logic '0'
if(PORTC.F7 == 0)
then ground water is used for irrigation.
This is such a good post. Thank you for sharing this information. Keep it up!
ReplyDeleteCost For Solar Panels For Home
Solar Arizona