Dynamic Innovator
Published

Make your own soil moisture sensor with arduino!!

The soil moisture sensor that gives you percentage of moisture in soil!!!!!

IntermediateFull instructions provided3 hours323
Make your own soil moisture sensor with arduino!!

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
Gravity: Analog Soil Moisture Sensor For Arduino
DFRobot Gravity: Analog Soil Moisture Sensor For Arduino
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Multi-Turn Precision Potentiometer- 10k ohms (25 Turn)
Multi-Turn Precision Potentiometer- 10k ohms (25 Turn)
×1
Toggle Switch, Toggle
Toggle Switch, Toggle
×1
9V battery (generic)
9V battery (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Schematics

CIRCUIT DIAGRAM!!!

copy this circuit diagram for connecting the pins.

Code

CODE!!!

Arduino
u can copy this code!!
#include <LiquidCrystal.h>
const int rs = 7, en = 6, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
int j=0;
int prev=0;
int pres=0;
void setup() 
{
  lcd.begin(16, 2);
  lcd.setCursor(0,0);
  lcd.print(" Soil Moisture  ");
  Serial.begin(9600);
}

void loop() 
{
  j=analogRead(A0);
  j=map(j,0,982,148,0);
  pres=j;
  if(j>100)
  j=100;
  else if(j<0)
  j=0;
  lcd.setCursor(6,1);
  lcd.print(j);
  lcd.print("%  ");
  Serial.println(j);

  prev=j;
  delay(500);
  
}

Credits

Dynamic Innovator

Dynamic Innovator

2 projects • 5 followers
Hello!!! I like to innovate,think and fabricate... i have an youtube channel!! u can see my projects!!

Comments