Pages: [1]   Go Down
Author Topic: Making lot of moisture sensors  (Read 489 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to add moisture sensors around my basement, especially where there are pipes.  I imagine these would be fairly easy to make as I just need two contacts very close to each other and a pull down resistor.  Just wondering if anyone has tips on a way to make one that will last.  I'm thinking just a small block of wood with two screws very close together, the tips sticking out and touching the ground.  I'd put several of these in parallel leading to one that has a pull down resistor.  (that way I don't need to find as many resistors, or use as many inputs).  Idealy I'll probably set these up in zones, so like "crawlspace, server room, laundry room, basement" or something like that.

Any better ideas?   I have everything else covered such as the monitoring system that will alert me. Already have some mouse traps on there, and Hydro Fail sensor.  smiley-mr-green

Global Moderator
Offline Offline
Shannon Member
Karma: 227
Posts: 14024
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I read a long time ago that someone just uses nails in a moisture detector as part of a resistor dividor.
The trick he applied was not to use 5V + GND but two digital pins [A, B] as 5V and GND . The measurements alternated the current so the oxydation process was partly compensated. The voltage was switched off [A&B both LOW] when there was no measurement in progress.

something like this

PIN A -------NAIL1      NAIL2 ------AnalogIn ------[Resistor] ---- PIN B

code would look like
int getMoisture()
  static int n = 0;
  int rv = 0;
  n = 1 - n;
  if (n == 0)
    digitalWrite(PINA, HIGH);
    rv = analogRead(A0);
    digitalWrite(PINA, LOW);
    digitalWrite(PINB, HIGH);
    rv = 1023 - analogRead(A0);  // reversed read => reversed value;
    digitalWrite(PINB, LOW);
  return rv;

hopes this helpes

Rob Tillaart

Nederlandse sectie -,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Faraday Member
Karma: 68
Posts: 2854
The last thing you did is where you should start looking.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

-Take a length of 2 conductor cable and strip off 2-3 inches of insulation from each wire.
-Cut a piece of cardboard 4" X 1.5" (no wax on the surface)
-Insert the bared wires into two of holes in the cardboard about 1/2" apart
-Place on floor with a weight or tape around a pipe.

The way you have it in your schematic isn't the same as how you have it wired up! That goes for me too.

Pages: [1]   Go Up
Jump to: