Using a soil moisture sensor module (without an Arduino library)

Now, let us quickly see an example of a sensor module that does not require an Arduino library. The sketch can read values from the sensor directly by simply utilizing built-in functions.

The following parts will be required to follow this example:

  • Arduino Uno R3
  • USB connector
  • One breadboard
  • One soil moisture sensor unit
  • Some jumper wires

A typical soil moisture sensor unit has two separate parts, as shown in the following figure. One part is the moisture probe that will remain dipped in the soil. The probe is designed to measure soil moisture content using some advanced soil properties (such as a dielectric constant) of the soil.

Figure 9: Parts of a typical soil moisture sensor unit

The second part of the soil moisture sensor is the integrated circuit that processes the electrical property variations from the probe. The measured electrical properties can be in turn read via Arduino's pins. The integrated circuit then provides four pins to be connected to the Arduino board. The pins are usually labeled very clearly. The A0 pin should be connected to an Analog pin, whereas, the D0 pin should be read through a digital pin on the Arduino board.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.239.148