Estrutura de aquisição e notificação de detecção de dados usando sensor de umidade

Data Detection Acquisition and Notification Framework Using Humidity Sensor

India is an agricultural country and agriculture is a basic occupation in our country. Since today, farmers water their plants every day but this is the project that helps farmers and in the agricultural field to water without any problem because here there is an irrigation system . In this system, the thirsty plant tells the farmer that it needs water and then we can water the plants. Nowadays people have daycare at home and some people have gardening as a hobby. So also in these places this irrigation system is very useful for people. In the nursery there are many types of plants. Of these, many plants need more water and some plants need less water depending on the soil moisture level. People use this system in their daily life and this system is called botanical system .

Botanical system There is a problem with this system: if the plants need water and at that moment the farmer or owner is away from the site and is unable to water. The solution to this problem is to connect a water pump to each plant and when the plant needs water it will be watered automatically using the pump. Both processes, one is receiving the message from the owner and the second is that the watering of the plant takes place simultaneously in this system.

Hardware and description

Block Diagram :

Block diagram

Block Diagram Description :

The figure shows the block diagram of the data detection, acquisition and notification structure using humidity sensor. It contains 6 sections.

Power supply :-

The power supply section consists of step-down transformers from 230V primary voltage to 5V secondary voltage for the +5V power supply. This circuit provides 5V to the entire circuit.

GSM modem :-

QUECTEL M 10 interfaces with the ATmega16 microcontroller to decode the received message and perform the required action. The protocol used for communication between the two is the AT command.

ATmega16 Microcontroller :-

The microcontroller is the heart of the system. It constantly monitors the digitized parameters of the humidity sensor and checks them against the predefined limit values ​​and checks whether any corrective action should be taken for the condition at that instant.

Humidity sensor :-

We are using SY-HS 230 humidity sensor.

LCD screen

The 16×2 LCD display is used to display the RH value of humidity detection by the humidity sensor.

Retransmission

We are using KT-603 relay to control the water pump.

Schematic Diagram Schematic diagram for power supply and microcontroller shown in tab 1 of the circuit diagram.

GSM scheme and operation

GSM schematic diagram

Shown in tab 2 of the circuit diagram.

Working :

1. 5V power supply supplied to microcontroller and humidity sensor simultaneously.

2. Humidity detected by humidity sensor which is in analog format.

3. The analog value is supplied to the ADC pin of the microcontroller.

4. ADC works with counting form.

5. Analog humidity value is converted into count form.

6. This count value is automatically converted to the RH value.

{ 7. When programming, a limit value is defined in the form of relative humidity.

8. Both RH values ​​are compared with each other.

If the received RH value is less than the fixed RH value then the GSM message will be received and the microcontroller relay will be turned on and the pump will start watering the plant.

9. The process will continue until the received amount becomes equal to the threshold amount.

10.W When the received value exceeds the threshold value, the GSM message will be received and the microcontroller relay will be turned off and the pump will stop watering.

Component List

Component list

COMPONENT

MODEL VALUE/NAME

AMOUNT

Microcontroller

Atmega16

1

Soil Moisture Sensor

SY-HS-230

1

GSM Module

Quectel M10

1

Retransmission

KT-603

1

SIM card

1

Transistor

BC547

two

IC

7805

1

Resistor

220 ohms, 22 ohms

15

Capacitor

1000uF,100uF,10uF,1uF

6

Led

5

Antenna

1

Diode

7

Water pump

1

Technical specification of KT-603 Relay components

Characteristics

value

Contact material

silver alloy

Operating time

10ms

Release time

5ms

Temperature range

-40°C to 85°C

Moisture

40-85%

Coil power

0.36W

Maximum operating voltage

3.75V

Component List Cont. and Flowchart..

SY-HS-230 Humidity Sensor Specification

Characteristics

Value

Rated voltage

5V

Operating Temperature

0-60 ?

Operating humidity

10-90% RH

Storage humidity

Within 95% RH

Storage Temperature

-30 to 85 ?

Precision

+/- 5% RH(25 ? )

Humidity Sensor Specification

7805 IC Specification

Characteristics

Value

Output current

1.5A

Operating Temperature

-40-150 ?

Storage Temperature

-55-150 ?

Maximum junction temperature

150 ?

BC547 Specification

Characteristics

Value

Maximum voltage

65V

Maximum current

100mA

Junction Temperature

150 ?

Storage Temperature

-65-150 ?

Quectel M10 GSM Module Specification

Characteristics

Value

quad band

850/900/1800/1900MHz

Operating Temperature

-45 ? to +85 ?

Supply voltage range

3.4-4.5V

Dimensions

29mm*29mm*3.6mm

Yes external

3V

FLOW CHART

Flowchart

Result and Conclusion

Test results

Test Setup

T troubleshooting

The LCD display was not working properly. Then it is replaced.

GSM was not working properly. Then it is replaced.

Result

Humidity (%RH)

Message

47

Please give me water

62

Please give me water

80

Thanks

Output image

Completion and future expansion

Conclusion

We conclude from this project that if the humidity level is below the limit value, the plant will notify us by providing water by message through GSM and if the humidity level is above the limit value, it will also notify us by message through GSM. We got different results through testing.

Future expansion

· This concept can be used simultaneously for different plants.

· We can attach temperature sensor to measure temperature.

· All data can be received from different farms in the state or country and can be centralized in a database at the main central station.

· We can make programs for different R Value H for different plants.

Project source code

Project source code

###


$regfile = "M16def.dat"

$crystal = 8,000,000
$frame size = 24
$hwstack = 32
$swstack = 8
$baud = 19200 '****BAUD RATE IS AUTO DETECTED BY GSM, SO YOU CAN GET ANY
Dim A as string * 5, Rcvd as string * 5
Dim I as an integer
'Config Portac = Output

Configuration Lcdpin = Pin, E = Portac.4, Rs = Portac.5, Db4 = Portac.3, Db5 = Portac.2, Db6 = Portac.1, Db7 = Portac.0
LCD configuration = 16 * 2
Adc Setting = Single, Prescaler = Auto, Reference = Avcc

Start Adc

Dim S as integer

Dim W as a word
Dim H as integer
Configure Portad.6 = Output

Serial configuration = buffer, size = 254
Serialout Setting = Buffered, Size = 254
Enable interrupts
Configure Portad.6 = Output
'Set port.6'
'Wait 500'
'Reset Portc.6 'POWER KEY (LOW)PULSE
'Wait 2'
'Set port.6'
'Cls

LCD "gsm"
Wait 1
Cls

Wait 25' WAIT FOR FINE NET

To do
Cls

For S = 0 to 100 Step 1

W = Getadc

L = L/8
Locate 1, 1

LCD "HUMIDITY:"
Locate 1, 10
LCD W

Wait 100
Next

Cls

If W > 70 then
Reset port.6
H = 1
Other
Set port.6
H = 2
End if

Cls
Locate 1, 1
LCD "On"
Wait 2
Cls

To do
Cls
Locate 1, 1
LCD "Waiting"
Print "AT" 'SENDING "AT" TO VERIFY THAT THE GSM MODEM IS WORKING
A = Inkey
Loop until A = "O" 'RESPONSE OF "AT" IS "OK" THEN WAIT FOR THE FIRST LETTER "O"

Rcvd = A

To do
A = hold key
Loop until A = "K" 'RESPONSE FROM "AT" IS "OK" THEN WAIT FOR SECOND LETTER "K"

Rcvd = Rcvd + A 'COMBINE "O & K" FOR FINAL ANSWER "OK"

Cls
LCD Rcvd

Wait 2

Rcvd = "" 'MAKE RCVD EMPTY FOR ANOTHER RESUME

Cls
Print "AT+CMGF=1" 'TO ENTER TEXT MODE ANOTHER MODEM WISE WILL BE IN PDU(PACKET DATA UNIT) "AT+CMGF=0"
Locate 1, 1
LCD "AT+CMGF=1" 'FOR DISPLAY

To do
A = Inkey
Loop until A = "O" 'RESPONSE OF "AT+CMGF=1" IS "OK" THEN WAIT FOR THE FIRST LETTER "0"

Rcvd = A
To do
A = Inkey
Loop until A = "K" 'RESPONSE OF "AT+CMFG=1" IS "OK" THEN WAIT FOR THE SECOND LETTER "K"
Rcvd = Rcvd + A

Bottom line

LCD Rcvd
Wait 4
Cls

Print "AT+CMGD=1" 'TO RECEIVE THE NEW MESSAGE IN THE 1ST INDEX WE ARE DELETING THE FIRST ENTRY' ; I
LCD "AT+CMGD=1"
Recvd = ""
To do
A = Inkey
Loop until A = "O"

Rcvd = A
To do
A = Inkey
Loop until A = "K"
Rcvd = Rcvd + A 'RESPONSE IS "OK"

Bottom line

LCD Rcvd

Wait 4
Recvd = ""
Cls
Locate 1, 1

LCD "AT+CMGW=" + Chr(34) + "9974621247" + Chr(34)

'TO WRITE THE RECIPIENT'S MOBILE NUMBER IN MEMORY THE AT COMMAND IS "AT+CMGW=1"

Print "AT+CMGW=" + Chr(34) + "9409085769" + Chr(34)

'exemlpe -> At + Cmgw = "9904353830" , Chr(34) Replaces DOUBLE QUOTATION

To do
A = Inkey
Loop until A = ">" 'RESPONSE OF AT+CMGW="9904353830" IS ">" JUST WAITING ">"
Cls
LCD "OK"
Wait 1

Wait 2
Recvd = ""
Cls
Locate 1, 1

LCD "system is WORKING"

If H = 1 then

Print "THANK YOU"

Otherwise if H = 2 Then

Print "PLZ GIVE WATER"

End if
'WRITE MESSAGE IN MEMORY
Print Chr(26) 'IT IS NECESSARY TO GIVE CTRL+Z AFTER WRITING THE MESSAGE, CHR(26) = CTRL+Z

To do
A = Inkey
Loop until A = "O" 'RESPONSE AFTER CTRL+Z IS "OK", THEN WAIT FOR "O"

Rcvd = A
To do
A = Inkey
Loop until A = "K" 'WAITING FOR "K"
Rcvd = Rcvd + A

Cls
Locate 1, 1
LCD Rcvd
Wait 2
Cls '***** THE MESSAGE IS STORED IN THE FIRST INDEX BECAUSE WE ARE DELETING THE 1ST ENTRY
'WE CHECK THROUGH HYPER TERMINAL, SEE THE FILE "HYPER TERMINAL OUTPUT.DOC"

Print "AT+CMSS=1" 'TO SEND SMS STORED IN THE 1ST INDEX WE WRITE "AT+CMSS=1"
LCD screen "AT+CMSS=1"

Clear serial
Recvd = ""
'****** ANSWER OF "AT+CMSS=1" IS +CMSS: 1
For I = 1 to 10
A = hold key

Clear serial

Rcvd = Rcvd + THE 'RESPONSE IS COLLECTED IN THE Rcvd STRING VARIABLE JUST TO SEE

Next

Locate 2, 1

LCD Rcvd

To do
A = Inkey
Loop until A = "O" 'FINALLLLLLLLLLLLLLLLLLLYYYYYYYYYY MESSAGE FORM MICROCONTROLLER FOR MOBILE

Rcvd = A
To do
A = Inkey
Loop until A = "K"
Rcvd = Rcvd + A

Cls
Locate 1, 1
LCD Rcvd
Bottom line
"MONTH SHIPPED" LCD
Wait 2

Link
End

###

Circuit diagrams

Image2
GSM Image

Related Content

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.