You are on page 1of 15

ADDIS ABABA UNIVERSITY

ADDIS ABABA INSTITUTE OF TECHNOLOGY

SCHOOL OF ELECTRICAL AND COMPUTER


ENGINEERING

DIGITAL LOGIC DESIGN

PROJECT

INTEGRATED FARM ASSISTANT

BY

YARED FEREJA........................................................................UGR/4012/13

NATNAEL MESSAY.................................................................UGR/9264/13

NATNAEL MILLION..................................................................UGR/7738/13

Submitted to:
Submission Date: JUNE 22, 2023
Table of Contents
ABSTRACT ............................................................................................................ 1

PARTITION 1: HUMIDITY LEVEL INDICATOR ..................................................... 2

PARTITION 2: NUTRIENT LEVEL INDICATOR ..................................................... 4

PARTITION 3: INTEGRATION ............................................................................... 6

SENSOR SPECIFICATION ................................................................................... 12

REFERENCES ...................................................................................................... 13

TABLES
TABLE 1:CONDITIONS FOR WATERING .............................................................. 2

TABLE 2: CONDITIONS FOR SENSOR SELECTION ............................................. 5

TABLE 3: INTERPRETATION FOR THE SENSOR OUTPUTS ............................... 5

TABLE 4: CONDITIONS FOR TEMPERATURE SENSOR SELECTION .................. 7

TABLE 5: CONDITIONS FOR SELECTION OF PH SCALES .................................. 8

TABLE 6 AND 7: OPTIMUM CONDITIONS AND DIGITALIZATOIN .................... 10

CIRCUITS
CIRCUIT 1: LOGIC CIRCUIT FOR WATERING ..................................................... 3

CIRCUIT 2: CIRCUIT FOR NUTRIENT SENSOR SELECTION .............................. 6

CIRCUIT 3: LOGIC CIRCUIT FOR TEMPERATURE READINGS ............................ 8

CIRCUIT 4: LOGIC CIRCUIT FOR SELECTION OF PH SCALE ............................. 9

CIRCUIT 5: REALIZATION OF CROP SELECTION ............................................. 11


IFA

ABSTRACT

This project is about the realization of the logic circuit of a digital farm assistant device. It
incorporates data from different sensors to suggest remedial activities and optimized choices for
the farmer. It has a miniscale integration and so it is named an Integrated Farm Assistant. It
doesnot contain any kind of microcontrollers or any other higher level microelectronic
components. It is simply built from sensors that give simple outputs and simple logic
components to analyze the data from the sensors and recommend activities. To avoid using
expensive components i.e. sensors, microcontrollers and ports, some data are directly inserted by
the farmer using buttons.The logic circuit of IFA has three partitions. The first partition analyzes
the humidity level in the surrounding of a plant and recommends whether the farmer needs to
water the plant and how deep the plant should be watered. The second partition analyzes the
nutrient levels in the soil. It consists of simple sensors that detect the presence of macronutrients
and a logic circuit to analyze the results from the sensors. The third partition is dedicated to
integrating the above two and other conditions to suggest a farmer which crop is better adapted
to the given conditions.

Page 1
IFA

PARTITION ONE

HUMIDITY LEVEL INDICATOR

This partition is all dedicated to measuring different criterion from the environment and
suggesting whether the plant needs to be watered and how deep. It consists of 4 simple sensors
that give a 0 and 1 output depending on the parameters they measure. The sensors include

1. a humidity sensor that gives a 1 output when the humidity level inside the soil is above
some set level and a 0 output when the humidity is below a certain level.
2. A sensor mounted on the leaf of a plant and gives an ouput of 1 when the leaf is wet and
a 0 when the leaf is dry.
3. A solar insolation sensor, gives an output depending on the presence of sunlight.
4. A wind sensor, gives an output of 1 when the air condition is windy and an output of 0
when the air condition is calm.

The results from these sensors are analyzed and integrated to indicate the humidity level in the
surrounding. The final output of this integration informs the farmer whether watering is needed
or not and how deep should the plant be watered. The result can then be sent to an actuator or to
a display to inform the farmer. The plant may need to be watered deep, moderately or just by
alittle bit depending the combination of the outputs from the sensors. The specific condition that
would trigger each is given in the table below.

HUMIDITY LEAF INSOLATION WIND WATER? DEEP MODERATE A LITTLE


(H) (L) (I) (W) (WA) (D) (M) (AL)
0 0 0 0 1 1 0 0
0 0 0 1 1 1 0 0
0 0 1 0 1 1 0 0
0 0 1 1 1 0 1 0
0 1 0 0 1 0 1 0
0 1 0 1 1 0 1 0
0 1 1 0 1 0 1 0
0 1 1 1 1 0 1 0
1 0 0 0 1 0 0 1
1 0 0 1 1 0 0 1
1 0 1 0 1 0 0 1
1 0 1 1 1 0 0 1
1 1 0 0 0 0 0 0
1 1 0 1 0 0 0 0
1 1 1 0 0 0 0 0
1 1 1 1 0 0 0 0
TABLE 1.CONDITIONS FOR WATERING

Page 2
IFA

I W 00 01 11 10 I W 00 01 11 10
H L H L
00 1 1 1 1 00 1 1 0 1
01 1 1 1 1 01 0 0 0 0
11 0 0 0 0 11 0 0 0 0
10 1 1 1 1 10 0 0 0 0
KMAP FOR WATERING KMAP FOR DEEP
MINIMIZATION RESULTS IN MINIMIZATION RESULTS IN
WA= H’+HL’ D= (H’L’)(I’+W’)

I W 00 01 11 10 I W 00 01 11 10
H L H L
00 0 0 1 0 00 0 0 0 0
01 1 1 1 1 01 0 0 0 0
11 0 0 0 0 11 0 0 0 0
10 0 0 0 0 10 1 1 1 1

KMAP FOR MODERATE KMAP FOR A LITTLE


MINIMIZATION RESULTS IN MINIMIZATION RESULTS IN
M=H’(L+IW) AL= HL’

CIRCIUT 1. LOGIC CIRCUIT FOR WATERING

Page 3
IFA

PARTITION 2

NUTRIENT LEVEL INDICATOR

This partition is responsible for the detection and analysis of the major soil macronutrients:
Nitrogen, Potassium and Phosphorus. For each macronutrient there is an optimum level that
should be found in any soil.

For nitrogen For Potassium For Phosphorus


0-20 ppm very low amount 0-80 ppm low(K0) 0-10 ppm low(P0)
present(N0) 80-160 ppm Insufficent(K1) 10-20 ppm Insufficent(P1)
20-40 ppm Insufficent amount 160-250 ppm Optimum(K2) 20-30 ppm Optimum(P2)
present(N1) Above 250 ppm Excess(K3) 30-40 ppm Excess(P3)
40-60 ppm Optimum amount
present(N2)
Above 60 ppm excess(N3)

The sensors used operate in the following manner

1. Nitrate sensors, detect the amount of nitrate ions in the soil. The sensor works by giving a
simple 0, 1 output. The output is 1 if the level of nitrate ions is above a preset value. It is
0 if the level is below the preset value. The farmer initially sets the sensor at max
value(60 ppm). If a 1 is recorded then the amount of nitrogen in the soil is excess. If ,
however, a 0 is recorded then the farmer adjusts the value to the next lower value
(40ppm). The process continues untill the sensor outputs a 1.
2. Potassium Sensors: detect the amount of potassium ions present in the soil.The sensors
work by giving a simple 0 and 1 output depending on the preset value and the amount of
nutrient presnt. The farmer takes the measurement by following the same procedures as
in the nitrate sensor.
3. Phosphorus sensors: detect the amount of phosphate ions present in the soil.The sensor
works in the same manner as the previous sensors.

The farmer should take multiple random samples from all across the farm to accuretlty indicate
the nutrient content of the land. The readings shall be taken turn by turn. The sensors can be
switched to be activated or not depending on whether the enabling button on the device is
clicked. So when the farmer clicks an N button on the device the measurement taken will be the
level of nitrate ions only. To take measurements of the phospahte ions the farmer clicks the P
button on the device. Then the corresponding amounts from the sensors are sent to the logic
circuit to be analyzed. The logic circuit is realized by using a 12 to 4 multiplexer with 2 switches.

Page 4
IFA

S0

NITROGEN S1

Y0

PHOSPHORUS Y1

Y2

POTASSIUM Y3

Diagram 1. A 12-4 Multiplexer for sensor selection

S0 S1 Yi FUNCTIONS
0 0 NITROGEN Y0=N0S0’S1’+K0S0’S1+P0S0S1’
0 1 POTASSIUM Y1= N1S0’S1’+K1S0’S1+P1S0S1’
1 0 PHOSPHORUS Y2= N2S0’S1’+K2S0’S1+P2S0S1’
1 1 X Y3= N3S0’S1’+K3S0’S1+P3S0S1’

TABLE 2. CONDITIONS FOR SENSOR SELECTION

The outputs from the multiplexer are going to be carried on for later integration and hence need
to be represented by other variables that give a meaning to the outputs of the sensors. Then this
variables are fed in to an RGB Led light to have a way of indicationg levels.

R0 R1 INTERPRETATION
0 0 LOW
0 1 INSUFFICENT
1 0 OPTIMUM
1 1 HIGH
TABLE 3 . INTERPRETATION FOR THE SENSOR OUTPUTS

Page 5
IFA

Circuit 2. LOGIC CIRCUIT FOR NUTRIENT SENSOR SELECTION

PARTITION THREE

INTEGRATION

This is the last step in the processing of the signals from the sensors. The ouputs of the sensors
will be integrated with some other environmental conditions that the farmer manually inserts in
to the device using buttons on the device. There are in total 24 inputs : 4 inputs for temperature,
3 inputs for humidity, 1 input for insolation, 4 inputs for nitrogen, 4 inputs for phosphorus, 4
inputs for potassium and 4 inputs for PH. The output of the circuit would be a recommendation
of the optimum crop suited for the given environmental condition From the total 24 inputs 16
inputs are taken from the previous parts. The remaining two( temperature and ph levels) will be
inserted in the following manner.

The farmer should use appropriate materials to record the measurements of temperature and PH.
Then these measurements are inserted to the device using buttons on the device. The buttons
shall be arranged in such a way that there would be 4 buttons used to represent 4 different
numberes up to 9 (1,2,4,8) and any number below 10 shall be represented by the combination of
these numbers. For numbers greater than 10 the device will have another additional 4 buttons to
represent 4 different numbers(10,20,40,80). Any number that is in between these numbers can
then be expressed interms of the combination of these numbers. For eg. If a farmer has a

Page 6
IFA

temperature reading of 29 degrees and wants to insert this value then he would first have to press
20 and then 8 and 1 consecuitvely. Then this data is sent across the device to be analyzed.

Lets have 4 letters to represent the 4 initial numbers. A0 for 1, A1 for 2,A2 for 4 and A3 for 8.
Lets again have another 4 letters to represent the 4 greater numbers. B 0 for 10, B1 for 20 ,B2 for
40,B3 for 80. To represent measurements for the temperature we shall have 4 variables: T 0 to
represent measurements from 10-19 T1 to represent measurements from 20-25, T2 for readings of
26-30 and T3 for readings above 30 degrees. Accordingly,the conditions for each of the
temperature readings is given by the following table.

A0 A1 A2 A3 B0 B1 B2 B3 T0 T1 T2 T3
(10- (20- (26- (30-
19) 25) 30) --)
1 0 0 1 1 0 0 0 1 0 0 0
0 0 0 1 1 0 0 0 1 0 0 0
X X X 0 1 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0 0 1 0 0
1 0 0 0 0 1 0 0 0 1 0 0
0 1 0 0 0 1 0 0 0 1 0 0
1 1 0 0 0 1 0 0 0 1 0 0
0 0 1 0 0 1 0 0 0 1 0 0
1 0 1 0 0 1 0 0 0 1 0 0
0 1 1 0 0 1 0 0 0 0 1 0
1 1 1 0 0 1 0 0 0 0 1 0
0 0 0 1 0 1 0 0 0 0 1 0
1 0 0 1 0 1 0 0 0 0 1 0
0 0 0 0 1 1 0 0 0 0 1 0
X X X X 1 1 X X 0 0 0 1
X X X X X X 1 X 0 0 0 1
X X X X X X X 1 0 0 0 1

TABLE 4. CONDITIONS FOR THE SELECTION OF TEMPERATURE SCALES

The minimization functions for each Temperature reading is then given as:

T0= B0B1‘B2‘B3’, T1=A1’A2 + (A2+A2’+A1),

T2= (B1B2‘B3‘)(A1A2 A3‘B0‘+A0 A1‘A2‘A3B0‘+(A3‘B0+A3B0‘)A0 ‘A1‘A2‘)and T3= B0B1‘+B2+B3

Page 7
IFA

CIRCUIT 3. LOGIC CIRCUIT FOR TEMPERATURE READINGS

PH readings are also inserted in the same manner. The readings are now confined to 14 and the
farmer can use a combination of numbers to represent the PH readings. It is appropriate to have 4
letters to represent PH readings: P0 for PH values below 6, P1 for PH values between 6 and 7 P2
for PH values between 7 and 8 and P3 for PH values above 8. The realization parameters of the
PH variables are given by the following table. All B variables are don’t care conditions in this
case.

A0 A1 A2 A3 PH0 PH1 PH2 PH3


(0-6) (6-7) (7-8) (8-14)
0 1 1 0 0 1 0 0
1 0 1 0 1 0 0 0
1 1 0 0 1 0 0 0
1 0 0 0 1 0 0 0
0 1 0 0 1 0 0 0
0 0 1 0 1 0 0 0
1 1 1 0 0 0 1 0
X X X 1 0 0 0 1

TABLE 5. CONDITIONS FOR SELECTION OF PH SCALE

Page 8
IFA

CIRCUIT 4, LOGIC CIRCUIT FOR SELECTION OF PH SCALE

The minimization functions of the PH parameters are PH 0=A2’A3’+A1 ’A2 A3’, PH1=A1 A2A3 ’,
PH2=A3 A0‘A1‘A2‘ and PH3=A3.

This marks the end of realization of all inputs.

The output at this stage is a recommendation of a crop that is best suited for the given
environmerntal condition. There are 8 common crops that are heavely cultivated in many places
of our country: Teff, Sorghum, Wheat, Corn, Barley, Millet, Pulses and Coffee. The optimum
condition for each crop is studied and digitalized in the following tables.

Page 9
IFA

Crop Optimum Optimum humidity Optimum Optimum Optimum level and Optimum
type temperatue level insolation Climate proportion of nutrients PH level
condition
Teff 20-30 Moderate rainfall Plenty of Warm Moderate requirments neutral
around 400-600mm sunlight of potassium and
phosphorus
Sorghum 24-29 500-750mm Requires full warm Should have a rich 5.5-7.5
sunlight to amount of all the
grow nutrients
Corn 20-30 Ideal about 500-700 Plenty of direct warm it is a heavy feeder so Slightly
mm sunlight Requires high levels of acidic to
nitrogen, phos and neutral
potass (6-7)
Wheat 15-20 Moderate rainfall Plenty of direct warm Require moderate Slightly
around 400-800mm sunlight levels of nitrogen, acidic to
phos and potass neutral(6-
7)
Barley 15-18 Require adequte Requires full cool moderte 6-7.5
level(500-650) sunlight to
grow
Millet 21-29 500-750 Requires full warm Should be rich in 6-7.5
sunlight to nutrients
grow
Pulses 15-27 500-750 Require full cool Require good amounts 6-7.5
sunlight to of nutrirents to grow
grow
Coffee 15-24 150-250 Moderate cool The soil should be rich 6-6.5
amount(4-5 in nutrients
hours)

NUMBER Crop type Optimum Optimum Optimum Optimum Optimum ph


temperature humidity insolation nutrient level
level level level
1. TEFF T1 or T2 M 1 N2 P2 K2 PH 1 OR PH 2
2. SORGHUM T2 AL 1 N2 P2 K2 PH 1
3. CORN T1 or T2 AL 1 N3 P3 K3 PH 1
4. WHEAT T0 AL 1 N2 P2 K2 PH 1
5. BARLEY T0 AL 1 N1 P2 K2 PH 1
6. MILLET T1 or T2 AL 1 N3 P3 K3 PH 1
7. PULSES T0 or T1 AL 1 N1 P1 K1 PH 1
8. COFFEE T0 or T1 D 1 N2 P2 K2 PH 1
TABLE 6 AND 7. OPTIMUM CONDITIONS AND THEIR DIGITALIZED FORMS

Page 10
IFA

The minimized functions of the crops are given by

Teff= (T1+T2) M 1 N2 P2 K2 (PH1+PH2)

Sorghum= T2 AL 1 N2 P2 K2 PH1

Corn= (T1+T2) AL 1 N3 P3 K3 PH1

Wheat=T0 AL 1 N2 P2 K2 PH1

Barley= T0 AL 1 N1 P2 K2 PH1

Millet= (T1+T2) AL 1 N3 P3 K3 PH1

Pulses= (T0 + T1) L 1 N1 P1 K1 PH1

Coffee= (T0 + T1) L 1 N2 P2 K2 PH1

CIRCUIT 5. REALIZATION OF CROP SELECTION

As it can be seen in the snapshot of the simulation file, IFA recommends the optimum crop that
is best suited to the given environmental conditions. If the environmental conditions are not
matched with the optimum conditions of the crops then, none of the ouputs yield 1.

Page 11
IFA

SENSOR SPECIFICATIONS

HUMIDITY SENSORS

 Honeywell HIH-4000 Series: These are basic humidity sensors that provide a digital output
that goes high when humidity exceeds a setpoint. They come in different setpoints, like 60%,
70%, 80% RH. They are simple digital switches for detecting high humidity.
 Humirel HS1100: This is an on/off humidity switch sensor. When humidity goes above
the trip point (usually around 80% RH), it outputs a high digital signal. Otherwise the output
is low.
SOLAR INSOLATION LEVEL SENSORS

 TEMT6000: An ambient light sensor that outputs a high signal when light intensity exceeds
a preset threshold. Commonly used as a simple on/off photosensor.
 VT9914: A brightness detecting sensor from Vishay that provides a simple logic output that
goes high when ambient light exceeds a trip point, typically around 100 lux. Used for
simple light detection.
NUTRIENT SENSORS
 Ion-selective electrode (ISE) nitrate, phosphate and potassium sensors: ISE nitrate sensors
can be configured to produce a binary output based on a pre-set threshold concentration of
nitrate. When the nitrate, phosphate or potassium concentration in the sample exceeds the
threshold, the sensor will produce a signal indicating the presence of the nutrients.
 Colorimetric nitrate sensors: Colorimetric nitrate, phosphate and potassium sensors can also
be configured to produce a binary output by using a color change that occurs only when the
nitrate, phosphate or potassium concentration in the sample exceeds a certain threshold. The
sensor will produce a signal indicating the presence or absence of nitrate, phosphate in the
sample.
LEAF WETNESS SENSORS
 Davis Instruments Leaf Wetness Sensor: This sensor uses a pair of electrodes to measure the
resistance of the leaf surface and produce a binary output indicating whether or not the leaf is
wet. It is designed for use in agricultural and horticultural applications.
 Onset HOBO Leaf Wetness Sensor: This sensor uses a capacitive measurement technique to
detect the presence of moisture on the leaf surface and provide a binary output. It is designed
for use in environmental monitoring applications.
WIND SENSORS

 Davis Instruments Anemometer: This anemometer uses a cup design to measure wind speed
and can be configured to provide a binary output when the wind speed exceeds a pre-set
value. It is commonly used in weather monitoring applications.
 Onset HOBO Wind Sensor: This sensor uses a small wind vane to measure wind direction
and can be configured to provide a binary output indicating whether the wind is blowing
from a particular direction. It is commonly used in environmental monitoring applications.

Page 12
IFA

REFERENCES

1. Cherlinka , V. (2023, June 15). Growing wheat: Optimal conditions, timing, &
techniques. EOS Data Analytics. https://eos.com/blog/growing-wheat/
2. Water requirement for different crops: Irrigation schedules for field crops. (n.d.).

http://eagri.org/eagri50/AGRO103/lec07.pdf.

3. Nutrient-Application-Guidelines-for-Field-Vegetable-Fruit-Crops-in-WI-A2809. (n.d.).

https://walworth.extension.wisc.edu/files/2018/11/Nutrient-Application-Guidelines-for-

Field-Vegetable-Fruit-Crops-in-WI-A2809.pdf.

4. Crop nutrition and fertilizer requirements. (n.d.).

https://www1.agric.gov.ab.ca/$Department/deptdocs.nsf/all/agdex3791/$File/540-1.

5. DIGITAL FUNDAMENTALS (9th ed.). (2006). [E-book]. Pearson Education.

https://www.pearson.com/en-gb/search.html?aq=Floyd%20Digital-Fundamentals-

International-Edition-9th-Edition

Page 13

You might also like