steam sensor/Reading it/07. Power it only to read
Reading it · 07 of 9

Power it only to read

While water bridges the loops, a direct current runs through it, and DC through water slowly eats the positive loop. The 1 MΩ keeps that current to microamps, and powering VCC from a pin only while reading keeps it to a fraction of the time. The catch is the 100 nF: after VCC comes on, wait 500 ms, five of its 0.1 s time constants, before reading.

Why switch it off

With 3V3 on VCC the whole time, a wet board passes a small direct current through the water from the VCC loops to the SENSE loops. Direct current through water is electrolysis: over time it dissolves metal from the positive side. That is why bare soil probes, which pass milliamps, are known for wearing out.

This board passes far less. Every path runs through the 1 MΩ, so the current is at most VCC / 1 MΩ: 3.3 µA from 3.3 V. And it only flows while water is on the loops. How long the gold-finished loops last under that has not been measured, so this book does not put a number on it. The page this replaces said "weeks"; nothing supports that for this board.

What can be said: the current only flows while VCC is on. Wire VCC to a pin instead of 3V3, switch it on to read and off again, and the loops carry current for half a second in every ten. That is a twentieth of the time.

A pin can power it

A GPIO driven HIGH sits at your board's logic voltage, which is what VCC needs. It has to supply what VCC draws: after the first moment, at most 3.3 µA. The first moment is the largest. With the loops shorted outright and the 100 nF empty, VCC charges the 100 nF through the 150 Ω alone: up to 22 mA from 3.3 V, 33 mA from 5 V, dying away in about 15 µs. That is the reason for the 150 Ω. The Uno's pins are rated for 40 mA absolute maximum, and real water, tens of kilohms and up, makes it microamps.

Then wait half a second

Here the 100 nF from why the capacitor matters. It starts empty each time VCC comes on, and fills through the water and the 1 MΩ.

Half a second
On the board
Time constant
93 ms
At 5 ms
...
At 500 ms
...
Press Play: at 0 ms the sketch switches VCC on, and SIGNAL starts from 0 V.

Pick what is on the board and press Play. SIGNAL climbs with a time constant of at most 0.1 s, the longest when the board is nearly dry. Read at 5 ms, as the old page advised with its "few milliseconds", and a fogged board shows about a fifth of its value. Five time constants, 500 ms, brings every case within 1 % of where it is going. That is the wait the next sketch uses.

When it does not work

Powered from a pin, it reads lower than on 3V3.

The sketch is reading before the 100 nF has filled. Wait 500 ms between switching VCC on and calling analogRead. At 5 ms, a fogged board reads about a fifth of its value.

Can a GPIO really power it?

Yes. Once the 100 nF is charged the block draws at most VCC / 1 MΩ, 3.3 µA from 3.3 V. The largest current is the first few microseconds with the loops shorted outright and the 100 nF empty: at most 22 mA from 3.3 V or 33 mA from 5 V, for about 15 µs, and much less through real water.

How long will the loops last left powered all the time?

Nobody has measured it for this board. The current is at most a few microamps and only flows while water bridges the loops, and gold resists far better than bare copper. For a board left wet for long periods, power it only to read; for an hour of tests on the bench it makes no difference.

Where this goes next

The sketch that does this, with two thresholds.

Wet or dry →

Edit this page — content/books/steam-sensor/power-it-only-to-read.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

Steam Sensor

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum →