No announcement yet.

Help with Moisture Sensor Analog input readings

  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with Moisture Sensor Analog input readings

    Hi, I have an Arduino Mega and have added a Moisture Sensor from Sparkfun #SEN-13322ROH (see the attached schematic from Sparkfun). I have the signal wire connected to pin AO. I have the GRND connected to one of the GRND pins in the "Power" section adjacent to the the Analog input section containing pin AO. I have the VCC pin on the sensor wired to digital pin 22 on the Mega. I use 22G jumper cables to connect to the Mega soldered to 18G sprinkler wire. At the other end of the 6' cable run is the sensor which as a 3 pin screw pin terminal soldered to it.

    I use GPIO pin 22 to power it because their instructions say that if it is powered all the time the sensor will not last long due to galvanic corrosion. They suggest turning the pin on and off when you need to take a reading.

    I have the Arduino Beta Plug-in and I configured pin AO as analog input. And GPIO pin 22 as Digital Out. I have not "inverted" any values.

    Issue #1 - first even though GPIO pin 22 is off, every 10 seconds the Analog Input pin AO registers a value that is not zero.

    Issue #2 - Readings are what I believe to be in-stable. It has been rainy here lately so the ground seems to be fairly wet see below:
    1. GPIO Pin 22 Off - Probe in ground - AO pin readings are 0%, .1%, 11% up to and including 25%.
    2. GPIO Pin 22 On - Probe in ground - AO pin readings are 25% then fall to 23, then 21, then 19, etc. They are variable but never more than 30%
    3. GPIO Pin 22 Off - Probe in Air - Readings are over 30%
    4. GPIO Pin 22 On - Probe in Aiir - Readings are over 30%
    5. GPIO Pin 22 Off - Probe in clean water - Readings are over 80%
    6. GPIO Pin 22 On - Probe in clean water - Readings are over 80%

    Why does it read when GPIO Pin 22 is set to off?

    Why are the readings much more variable when in the dirt, but very stable when in either "Air" or "Water"?

    Why are my "soil" readings significantly lower than when my sensor is exposed to Houston atmosphere (air)?

    I also have 6 sprinkler solenoid valves hooked up to this Mega. I was hoping I could use the readings from the sensor to trigger an event to start my sprinkler schedule.

    Any and all help wold be appreciated.


    Current Date/Time: 12/10/2016 4:01:39 PM
    HomeSeer Version: HS3 Standard Edition
    Operating System: Microsoft Windows 10 Home - Work Station
    System Uptime: 19 Days 19 Hours 21 Minutes 32 Seconds
    Number of Devices: 213
    Number of Events: 51
    Available Threads: 200

    Enabled Plug-Ins Arduino Plugin BLBackup BLLock BLShutdown BLUPS HSTouch Server MediaController NetCAM RX-A3000
    3.0.6147.22046: UltraMon3 weatherXML Z-Wave
    Attached Files