[tutorial] How to use the Soil Hygrometer Module

Introduction

hygrometer

In this tutorial we will use one soil hygrometer module to measure soil moisture of a pot.

The module can give us a digital signal when the soil need watering and this output can be adjusted by the potentiometer. Or it can give us an analog signal of current soil moisture!

In this tutorial we will use the analog signal output of this module and we will change it in percentage value. Finally we will print in serial monitor the current percentage value of soil moisture.

So, let's get started!

What you will need

For this tutorial you will need:

  • Arduino uno
  • Breadboard
  • Soil hygrometer module
  • some breadboard cables

And some soil for testing

The circuit

fritzing

The connections are pretty easy, see the above image with the breadboard circuit schematic.

The Code

Here's the code, embedded using Codebender!

Try downloading the Codebender plugin and clicking on the "Run on Arduino" button to program your Arduino board. And that's it, you've programmed your Arduino with this sketch!

You can keep playing with that by clicking the "Edit" button and start making your own modifications to the code.

Serial monitor - Testing

hygrometer in soil

Put the sensor in dry soil for testing. Press the connect button below to start the serial communication.

Now throw some water on the soil and observe how the value changes

Well done!

You have successfully completed one more "How to" tutorial and you learned how to use the saoil hygrometer module with Arduino.