Soil Moisture Sensor (Raspberry Pi)

About: the Raspberry Pi is Awesome!

Basic tutorial of how to setup a soil moisture sensor with the Raspberry Pi.

Step 1: Parts

RPI 3 - https://amzn.to/2VA9pQY

4 Amp Power Adapter - https://amzn.to/2CTptWu

16GB micro SD - https://amzn.to/2SFMwd3

120 pcs jumper cable: https://ebay.to/2VAb9cY

Soil Moisture Sensors: https://amzn.to/2DfX5hs

Step 2: Setup

VCC -> 5V

GND -> GND

SIG -> GPIO 21

Step 3: Code

1. Copy script to raspberry pi

2. Run script by typing "python soil.py" and hit enter to run

Step 4: Additional Info

Share

    Recommendations

    • Faux-Real Contest

      Faux-Real Contest
    • Cardboard Challenge

      Cardboard Challenge
    • Toys Contest

      Toys Contest

    5 Discussions

    0
    None
    MagdalenaJ3

    8 days ago

    Hi, Thanks for sharing this - it is really helpful.

    I am trying to set up a system that is rather monitoring how low is the water level in the soil. So how can I modify the code to actually print the output of the GPIO output? I realize this would need to be standardized, but having the actual numbers would be more helpful for me.

    Also - the code that can be downloaded from here has an error - in both cases the output reads "Water detected".

    0
    None
    Willrocks07

    8 weeks ago

    Hi are used to see instructor ball on a school project slightly modifying it so would play music and LED would change colour depending on the state of the plant this really helped me with my project thank you I will post a instructable on what I did

    0
    None
    HugoS94

    Question 8 months ago

    Hi, Excellent tutorial. Is it possible to connect multiple sensors to the same Raspberry? If yes, how can I do it? Thanks.

    1 answer
    0
    None
    Willrocks07HugoS94

    Answer 8 weeks ago

    Yes you can you just have to duplicate the script and change the GPIO numbers

    0
    None
    Ghostrider513

    Question 6 months ago

    Can a flexible probe be made to detect dehydration? This could be a great wearable.