Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

6/13/24, 11:42 AM Simple Soil Moisture Sensor | Arduino Project Hub

PROFESSIONAL E D U C AT I O N STORE Search on Arduino.cc SIG

PROJECTS F E AT U R E D PRO FOR SCHOOL FAQ


+ NEW PROJECT

Simple Soil
Moisture Sensor
A simple soil moisture
sensor, so you always know
when to water your plants.
Will suit any level of skill,
and is incredibly cheap to
make.

Aug 17, 2020•60798 views•1 respects

environmental sensing plants

codequest

Components and
supplies
© 2024 Arduino Terms Of Service Privacy Policy Security Cookie Settings

https://projecthub.arduino.cc/nikolaiapalis/simple-soil-moisture-sensor-ec23c7 1/11
6/13/24, 11:42 AM Simple Soil Moisture Sensor | Arduino Project Hub

PROFESSIONAL E D U C AT I O N STORE Search on Arduino.cc SIG


SparkFun Soil
1
Moisture Sensor…
PROJECTS F E AT U R E D PRO FOR SCHOOL FAQ
+ NEW PROJECT

Male/Female
6
Jumper Wires

1 Buzzer

9V battery
1
(generic)

Jumper wires
4
(generic)

3 Resistor 220 ohm

1 Mini Breadboard

10 mm Heat
1
Shrink

1 9V Battery Clip

Tools and machines

© 2024 Arduino Terms Of Service Privacy Policy Security Cookie Settings

https://projecthub.arduino.cc/nikolaiapalis/simple-soil-moisture-sensor-ec23c7 2/11
6/13/24, 11:42 AM Simple Soil Moisture Sensor | Arduino Project Hub

PROFESSIONAL E D U C AT I O N STORE Search on Arduino.cc SIG


Laser cutter
1
(generic)
PROJECTS F E AT U R E D PRO FOR SCHOOL FAQ
+ NEW PROJECT

Hot glue gun


1
(generic)

Apps and platforms

1 PlatformIO IDE

Project description

This project is for a school code quest.


I have seen many projects with soil
moisture sensors, but all of them
included expensive and complicated
materials such as LCD screens or
automatic watering systems. I took it
as a challenge to create an incredibly
cheap and simple Soil Moisture Sensor.
The project is designed for people that
might not know when to water their
plants or water them too much or too
little. The Soil Moisture Sensor
distinguishes how wet the soil is, and
identifies when the soil should be
watered for you.

© 2024 Arduino Terms Of Service Privacy Policy Security Cookie Settings

https://projecthub.arduino.cc/nikolaiapalis/simple-soil-moisture-sensor-ec23c7 3/11
6/13/24, 11:42 AM Simple Soil Moisture Sensor | Arduino Project Hub

PROFESSIONAL E D U C AT I O N STORE Search on Arduino.cc SIG


Simple Soil Moisture Sens…
Sens…

PROJECTS F E AT U R E D PRO FOR SCHOOL FAQ


+ NEW PROJECT

This design only includes a soil


moisture sensor, a couple of LEDs and
a buzzer. The LEDs constantly show
the moisture level (Red - 0-30%, Yellow
- 30-60% and green 60%+ switch on at
those levels of moisture), and when
the moisture level falls below 10%, the
buzzer starts beeping. I designed this
for a Port Jackson Ficus Bonsai, and
have tested this extensively. The
percentages I'm using works perfectly
for me but might change depending on
your plant. If you feel like the red light
switches on way too late, when the soil
is already too dry, you can change the
Red percentage to 0-50% and Yellow to
50-80%, because that seems to also be
working well.

How it works:

It works, when electrical currents are


sent through the legs of the moisture
sensor. The sensor then calculates the
resistance it's getting. Since water
conducts electricity - the wetter the soil
is, the less resistance there should be.
It's then connected to an Analog Pin
and the Arduino can use that for the
program.

© 2024 Arduino Terms Of Service Privacy Policy Security Cookie Settings

https://projecthub.arduino.cc/nikolaiapalis/simple-soil-moisture-sensor-ec23c7 4/11
6/13/24, 11:42 AM Simple Soil Moisture Sensor | Arduino Project Hub

PROFESSIONAL
The Soil
E D U C AT I O N
Moisture Sensor
STORE
needs to
Search on Arduino.cc SIG

know the maximum moisture that the


PROJECTS soil can
F E AT U Rreach,
ED soP Rwe
O can calculate
F O R S C H Othe
OL FAQ
+ NEW PROJECT

percentages. This is called calibration.


The sensor calibrates right when the
circuit is switched on, in the Setup()
function. Therefore, it should already
be in freshly watered soil, when it is
switched on.

Here are some photos of the circuit


without the casing:

© 2024 Arduino Terms Of Service Privacy Policy Security Cookie Settings

https://projecthub.arduino.cc/nikolaiapalis/simple-soil-moisture-sensor-ec23c7 5/11
6/13/24, 11:42 AM Simple Soil Moisture Sensor | Arduino Project Hub

PROFESSIONAL
The soil
E D U C AT I O N
moisture sensor
STORE
I used has a
Search on Arduino.cc SIG

screwable pin terminal, so no soldering


PROJECTS is Frequired.
E AT U R E D The most
P R O popular
F O R Sone
CHOOL FAQ
+ NEW PROJECT

sensor is the SparkFun moisture


sensor and requires soldering. So I got
one, that doesn't need soldering and
can just have Male to Male wires
screwed in, here .

My Pseudocode .

My Flowchart .

Casing:

The casing is a simple box, with the


LEDs coming out of the top, and the
buzzer on the side. The Soil Moisture
Sensor comes out of the side with
wires and is stuck into the soil, so it's
relatively far from all the water-
sensitive components.

Code

© 2024 Arduino Terms Of Service Privacy Policy Security Cookie Settings

https://projecthub.arduino.cc/nikolaiapalis/simple-soil-moisture-sensor-ec23c7 6/11
6/13/24, 11:42 AM Simple Soil Moisture Sensor | Arduino Project Hub

PROFESSIONAL E D U C AT I O N STORE Search on Arduino.cc SIG


Soil
Moisture
PROJECTS F E AT U R E D PRO
csharp FOR SCHOOL FAQ
+ NEW PROJECT
Sensor
code
This was made
with Platform IO,
and therefore the
user-declared
functions are put
first.

1 int greenLight = 0;
//Defining pins
2 int yellowLight = 1;
3 int redLight = 2;
4 int piezoBuzzer = 3;
5 int maximumMoistureLevel;
//The max moisture level
and current moisture levels
will be needed for percentage
calculations
6 int
currentMoistureLevel;//Like
so: current/max*100 =
Moisture level as a
percentage
7
8 void moistureDetection(){

Soil
Moisture
csharp
Sensor
code
This was made
with Platform IO,
and therefore the
user-declared
functions are put
first.

1 int greenLight = 0;
//Defining pins
2 int yellowLight = 1;
© 2024 Arduino 3
Terms Of Serviceint redLight = 2;
Privacy Policy Security Cookie Settings

https://projecthub.arduino.cc/nikolaiapalis/simple-soil-moisture-sensor-ec23c7 7/11
6/13/24, 11:42 AM Simple Soil Moisture Sensor | Arduino Project Hub

4 int piezoBuzzer = 3;
PROFESSIONAL E D U C AT I O N
5
STORE Search on Arduino.cc
int maximumMoistureLevel;
SIG

//The max moisture level and


PROJECTS F E AT Ucurrent
RED moisture
PRO levels will
FOR SC HOOL FAQ
+ NEW PROJECT
be needed for percentage
calculations
6 int
currentMoistureLevel;//Like
so: current/max*100 =
Moisture level as a
percentage
7

Downloadable files

Wiring Diagram
This is the wiring diagram for the
circuitry, made with Fritzing, which
by the way now costs $12 AUD :(

Wiring Diagram

© 2024 Arduino Terms Of Service Privacy Policy Security Cookie Settings

https://projecthub.arduino.cc/nikolaiapalis/simple-soil-moisture-sensor-ec23c7 8/11
6/13/24, 11:42 AM Simple Soil Moisture Sensor | Arduino Project Hub

22
Wiring Diagram
PROFESSIONAL E D U C AT I O N STORE Search on Arduino.cc SIG
23 is the wiring diagram for the
This
circuitry, made with Fritzing, which
PROJECTS F E AT U R E D PRO FOR SCHOOL FAQ
+ NEW PROJECT
by
24the way now costs $12 AUD :(

25
Wiring Diagram

26
27

28

29

30
31
32
33
34

35
36
37
38

39

40

41
42
Documentation

tinkerCadmodel
43
44 is the casing model, made on
this
45
tinker cad. I don't suggest 3D printing
46
47

tinkerCadmodel

48
49
Step By Step Instruction on
how
50 to make the casing.
© 2024 Arduino Terms Of Service Privacy Policy Security Cookie Settings

https://projecthub.arduino.cc/nikolaiapalis/simple-soil-moisture-sensor-ec23c7 9/11
6/13/24, 11:42 AM Simple Soil Moisture Sensor | Arduino Project Hub

Illustrated instruction manual, for


PROFESSIONAL E D U C AT I O N STORE Search on Arduino.cc SIG
building the casing.
51
PROJECTS F E AT U R E D PRO FOR SCHOOL FAQ
+ NEW PROJECT
52
Step By Step Instructi
53
on on how to make t…

Laser-Cutting File - Adobe


Illustrator

Laser-Cutting File - Ad
obe Illustrator

Step By Step Instruction on


how to make the casing.
Illustrated instruction manual, for
building the casing.

Step By Step Instructi


on on how to make t…

tinkerCadmodel
this is the casing model, made on
tinker cad. I don't suggest 3D printing

tinkerCadmodel

Comments

Only logged in users can leave comments


© 2024 Arduino Terms Of Service Privacy Policy Security Cookie Settings

https://projecthub.arduino.cc/nikolaiapalis/simple-soil-moisture-sensor-ec23c7 10/11
6/13/24, 11:42 AM Simple Soil Moisture Sensor | Arduino Project Hub

PROFESSIONAL E D U C AT I O N STORE LOGIN


Search on Arduino.cc SIG

PROJECTS F E AT U R E D PRO FOR SCHOOL FAQ


+ NEW PROJECT

a028
a year ago

I am a high school student I don't have


a laser cutter. What can I substitute🥲?

2 Team members on this project

Table of contents

Intro

Components and supplies

Tools and machines

Apps and platforms

Project description

Code

Downloadable files

Documentation

1 1

© 2024 Arduino Terms Of Service Privacy Policy Security Cookie Settings

https://projecthub.arduino.cc/nikolaiapalis/simple-soil-moisture-sensor-ec23c7 11/11

You might also like