Agriculture is the backbone of the economy and is the fundamental method of occupation. The world’s large population depends on agriculture to live daily life. About 70% of The Indian population depends on the crop and furthermore, many of the crops are contributed from here. Most of the crop cannot be productive just by activities, therefore, must be driven by innovative technologies. Therefore, we use IoT innovation to address the critical part of agriculture.

The above method of incorporating a sharp water supply system with a smart idea. In this method, we use IoT ideas to address certain essential aspects dealing with parts of the crop. This enterprise is a continuation of a past method whose climax Features incorporate a sharp water system with excellent control and insightful base. leadership in terms of accurate continuous field information regulating temperature, Moisture and soil moisture of a particular crop. Controlling each of these activities will be monitored by Internet PC and tasks performed by
interface sensors and Arduino. With the results of the observation, a decision will be made.

Block Diagram

Required Hardware Components


  • ATMEGA328P Microcontroller.
  • lm35
  • (DTH11)
  • Soil moisture sensor
  • esp32


  • Arduino compiler
  • Proteus designing software
  • Embedded c programming
  • Flash magic.
  • Thingspeak


In this modern world, most farmers lack adequate knowledge of agriculture and agriculture making it more erratic. Most agriculture and agriculture-related activities. They are based on predictions and forecasts. When it fails, farmers have to bear heavy losses. and some end up committing suicide. Because we are aware of the benefit of soil quality and air, irrigation and in the growth of crops parameters such as temperature, humidity cannot be neglected.

Internet of Things was introduced in 2009 and aims to incorporate all devices and devices to the web. “Internet of Thing” changes every second. IoT improves our live-in business terms; medical-health and society modifying products that are Based on IoT that makes our lives easier. It is predicted that by 2020, 50 billion devices will be connected to the web and the market will have a value of $ 14 T ‘.

Internet of things is an emerging issue of technical, social and economic development. Products such as consumer items, large machinery, vehicles, mechanical and utility segment, sensors and others are connected to the availability of the Internet giving the necessary information that guarantees to change the way we work by making our lives easier.

Bill of Materials

1Arduino UnoArduino UNO atmega3281https://www.amazon.com/Arduino-A000066-ARDUINO-UNO-R3/dp/B008GRTSV6
2ESP32em-18 rfid reader module1https://roboticsdna.in/product/rfid-reader-em18-board-with-serial-ttl-interfacing-125-khz-through-a-rs232-converter-to-pc/?src=google&kwd=&adgroup={adgroup}&devicec&campaign={campaign}&adgroup={adgroup}&keyword=&matchtype=&gclid=CjwKCAjw49qKBhAoEiwAHQVTo-i85TwixHnJAFNHLfwUknLhBVYloMe3ECBLmMFtUFrk8qGBxO0vzhoCIAQQAvD_BwE
3Soil Moisture Sensor Module125khz RFID Card Thin 1https://roboticsdna.in/product/rf-card-125khz-thin/
4DHT11 – Temperature and Humidity Sensor Module Temperature and Humidity Sensor 1https://www.electronicscomp.com/dht11-temprature-humidity-sensor-module-india?gclid=Cj0KCQjwnoqLBhD4ARIsAL5JedKiGlpRDTd60qzdd1dmynoi_5dXgh9Op7D41gIm2Eh0OdfAtFVoCSsaAiEZEALw_wcB
3LM35LCD 16*21https://www.thingbits.in/products/standard-lcd-16×2-display
6Jumper WiresJumper Wires40https://www.flipkart.com/arduino-female-male-dupont-20cm-jumper-wire-40pcs-interconnect-electronic-hobby-kit/p/itmf8e5ezvkequ3h?pid=EHKF8DVBG9BXZHHH&lid=LSTEHKF8DVBG9BXZHHHUGSG9J&marketplace=FLIPKART&cmpid=content_electronic-hobby-kit_14498130132_u_8965229628_gmc_pla&tgi=sem,1,G,11214002,u,,,543116155366,,,,c,,,,,,,&ef_id=CjwKCAjwndCKBhAkEiwAgSDKQYwKr3euuMpKCLDJnf-2qgZAQR

Tools used in IoT technologies today

LM35 TO-92-3 Board Mount Temperature Sensors

LM35 is an integrated analog temperature sensor whose electrical output is proportional to degrees centigrade. The LM35 sensor does not require any external calibration or clipping to provide typical accuracies. The LM35’s low output impedance, linear output, and inherently accurate calibration make interfacing with control or reading circuitry especially easy.

As such, no additional components are required to connect LM35 to ADC as the LM35 output is linear with a scale of 10mv / degree. It can be directly connected to any 10 or 12 bit ADC. But if you are using an 8 bit ADC like ADC0808 or ADC0804, then an amplifier section will be needed if you need to measure 1 ° C change.

LM35 can also be connected directly to Arduino. The temperature output from the LM35 can also be sent to the comparator circuit and can be used for over-temperature indication or, through the use of a simple relay, can be used as a temperature controller.

The LM35 device is rated to operate in a temperature range of −55 ° C to 150 ° C, while the LM35C device is rated for a range of −40 ° C to 110 ° C (−10 ° more accurately). The LM35 series devices are available packaged in sealed TO transistor packages, while the LM35C, LM35CA and LM35D devices are available in plastic TO-92 transistor packages. The LM35D device is available on an 8-lead surface to mount a small contour package and a TO-220 plastic package.


Pin out

LM35 Temperature Sensor: Pinout, Diagrams, Desc...
Arduino Lm35 Interfacing With Arduino Uno | Arduino

Soil Moisture Sensor

This is an easy to use digital soil moisture sensor. Simply insert the sensor into the ground and you can measure the moisture content or water level in it. It gives a digital output of 5V when the humidity level is high and 0V when the humidity level is low in the soil.

The sensor includes a potentiometer to set the desired humidity threshold. When the sensor measures more humidity than the set threshold, the digital output increases and an LED indicates the output. When the humidity in the soil is less than the established threshold, the production remains low. The digital output can be connected to a microcontroller to detect the humidity level. The sensor also generates an analog output that can be connected to a microcontroller’s ADC to obtain the exact level of moisture in the soil.

This sensor is ideal for water gardening projects, water detection, etc.




  • The soil moisture module is more sensitive to the environment, it is generally used to detect the moisture content of the soil.
  • When the module cannot reach the threshold value, DO port output high, when soil moisture exceeds a set threshold value, the D0 module output goes low;
  • D0 small board digital output can be directly connected to the MCU, MCU to detect high and low, to detect soil moisture;
  • DO small board digital output can directly drive the buzzer module or relay module in our store, which can form soil moisture alarm equipment;
  • Small board analog output AO and AD module connected through AD converter, you can get more accurate values of soil moisture;

Light Dependent Resistor

A light-dependent resistor (LDR) is also called a photoresistor cadmium sulfide (CdS) cell. It is also called a photoconductor. Basically, it is a photocell that works according to the principle of photoconductivity. The passive component is basically a resistor whose resistance value decreases when the intensity of the light decreases. This optoelectronic device is mainly used in light drift sensor circuits and light and dark activated switching circuits. Some of its applications include camera photometers, street lights, clock radios, beam alarms, reflective smoke detectors, and outdoor clocks.

What are Photoresistors?

Photoresistors, also known as light-dependent resistors (LDRs), are light-sensitive devices most often used to indicate the presence or absence of light or to measure the intensity of light. In the dark, its resistance is very high, sometimes up to 1 MΩ, but when the LDR sensor is exposed to light, the resistance drops dramatically, even down to a few ohms, depending on the intensity of the light. LDRs have a sensitivity that varies with the wavelength of the applied light and is non-linear devices. They are used in many applications, but this light-sensing function is often performed by other devices, such as photodiodes and phototransistors. Some countries have banned LDRs made from lead or cadmium for environmental safety reasons.

Types of photoresistors and working mechanisms.

Depending on the materials used, photoresistors can be divided into two types: intrinsic and extrinsic. Intrinsic photoresistors use undoped materials such as silicon or germanium. The photons that fall on the device excite the electrons from the valence band to the conduction band. This creates more free electrons in the material that is available to carry current and therefore less resistance. Extrinsic photoresistors are made of materials doped with impurities, also called dopants. Dopants create a new energy band above the existing valence band, populated by electrons. These electrons need less energy to transition into the conduction band thanks to the smaller energy gap. The result is a device that is sensitive to different wavelengths of light. Regardless, both types will exhibit a decrease in resistance when illuminated. The greater the intensity of the light, the greater the drop in resistance. Therefore, the resistance of the LDRs is an inverse and non-linear function of the intensity of the light.

Wavelength dependency

The sensitivity of a photoresistor varies with the wavelength of the light. If the wavelength is out of a certain range, it will not affect the resistance of the device at all. It can be said that the LDR is not sensitive in that range of wavelengths of light. Different materials have different unique wavelength versus sensitivity spectral response curves. Light-dependent extrinsic resistors are generally designed for longer wavelengths of light, with a bias towards infrared (IR). When working in the infrared range, care must be taken to avoid heat build-up, which could affect measurements by changing the resistance of the device due to thermal effects. The figure shown here represents the spectral response of photoconductive detectors made of different materials, with the operating temperature expressed in K and written in parentheses.


Light-dependent resistors have lower sensitivity than photodiodes and phototransistors. Photodiodes and phototransistors are true semiconductor devices that use light to control the flow of electrons and holes through PN junctions, while light-dependent resistors are passive components that lack a PN junction. If the light intensity remains constant, the resistance can vary greatly due to changes in temperature, so it is also sensitive to changes in temperature. This property makes LDRs unsuitable for accurate measurements of light intensity.


Another interesting property of photoresistors is that there is a latency between changes in illumination and changes in resistance. This phenomenon is called the rate of strength recovery. It usually takes about 10 milliseconds for the resistor to completely lower when light is applied after complete darkness, while it may take up to 1 second for the resistor to return to the initial value after the light is completely removed. For this reason, an LDR cannot be used where rapid light fluctuations are recorded or used to operate control equipment. But this response time characteristic is exploited in some other devices, such as audio compressors, where the function of a light-dependent resistor is to facilitate response.

Construction of Photoresistors

Since the discovery of photoconductivity in selenium, many other light-dependent materials have been found. In the 1930s and 1940s, PbS, PbSe, and PbTe were studied after the development of photoconductors made of silicon and germanium. Modern light-based resistors are made of lead sulfide, lead selenide, indium antimonide, cadmium sulfide and cadmium selenide. Common types of cadmium sulfide are often referred to as CdS photoresists. To make cadmium sulfide LDR, high purity cadmium sulfide powder and inert binders are mixed. Then this mixture is pressed and sintered. The electrodes are vaporized under vacuum on the surface of one side to form interlocking combs and the connecting cables are attached. The disc is then either held in a glass envelope or encapsulated in clear plastic to prevent surface contamination. The spectral response curve of cadmium sulfide corresponds to that of the human eye. The wavelength of maximum sensitivity is about 560-600 nm, which is in the visible part of the spectrum. It should be noted that devices containing lead or cadmium are not RoHS compliant and their use is prohibited in countries that comply with RoHS laws.

Typical Applications of Photoresistors

Photoresistors are most often used as light sensors. They are often utilized when it is required to detect the presence and absence of light or measure the light intensity. Examples are night lights and photography light meters. An interesting hobbyist application for light-dependent resistors is the line following robot, which uses a light source and two or more LDRs to determine the needed change of course. Sometimes, they are used in other sensing applications, for example in audio compressors, because their reaction to light is not instantaneous, and so the function of the LDR is to introduce a delayed response.

Light sensor

If a primary light sensor is needed, an LDR circuit like the one in the figure above can be used. The LED indicator lights up when the light intensity reaching the LDR resistor is sufficient. A 10 KΩ variable resistor is used to set the limit at which the LED will be turned on. If the LDR light is below the intensity threshold, the LED will remain off. In real-world applications, the LED will be replaced by a relay or the output can be connected to a microcontroller or some other device. If a dark sensor is needed, where the LED lights up when there is no light, the LDR and the 10 KΩ resistors must be switched.

Audio compressors

Audio compressors are devices that reduce the amplifier’s gain when the signal amplitude is higher than the specified value. This is done to amplify soft sounds while preventing loud sounds from penetrating. Some compressors use an LDR and a small lamp (LED or light panel) connected to a signal source to cause changes in signal gain. Some believe this technology adds smoother properties to the signal because light and resistance response times dampen attack and release. The delay in response time in these applications is 0.1 seconds.

Light-dependent resistance symbol

System Architecture

system overview with Arduino

Display of temperature in Degree C and Fahrenheit

Graph Analysis



const int TEMPERATURE_PIN = A0;  // Analog input pin that the potentiometer is attached to
const int ldr_PIN = A2;
const int humidity_PIN = A1;
const int soil_PIN = A3;

int Temperature_value = 0,ldr_value=0,humidity_value=0,soil_value=0;

void setup() {
  pinMode(7, OUTPUT);
  pinMode(6, OUTPUT);
 // Serial.begin(9600);  // Set it according to your esp’s baudrate. Different esp’s have different baud rates.
 Serial.begin(115200); // set up the LCD's number of columns and rows
void loop() {
  Temperature_value = analogRead(TEMPERATURE_PIN);
   ldr_value = analogRead(ldr_PIN);
    humidity_value = analogRead(humidity_PIN);
    // humidity_value= (humidity_value+24)-1;
     Serial.println( soil_value);

void Send_Wifi()
      Serial.print("AT+CWJAP=\"sahithi shiny\",\"sahithishiny\"\r\n"); //ssid and password
      Serial.print("GET /update?key=MDDR922HP9YGKFK5&field1=");
      UARTWriteInt(humidity_value ,4); 
void UARTWriteInt(long val,unsigned int field_length)
  char str[10]={0,0,0,0,0,0,0,0,0,0};
  int i=9,j=0;
  if(val<0) Serial.write(' ');

By Devilal

Leave a Reply

Your email address will not be published. Required fields are marked *