Water level sensor
Bare traces and a transistor: S jumps the moment the tip gets wet and creeps up after.
- 3 pins
- 1 setting
- In 2 projects
- In 2 lessons
The Water level sensor in brief
What it is, and every setting the properties panel gives it.
The red water level sensor from starter kits is a long board with ten bare traces and three pins marked S, plus and minus. Half the traces sit on the supply and the rest feed the base of an NPN transistor whose emitter is S, so water bridging them turns the transistor on as an emitter follower. There is no comparator: wire plus to 5 or 3.3 volts, minus to ground and S to an analog input, then read it with analogRead(). Mokxi models the shape a real one shows, a sharp jump the moment the tip gets wet and a slow creep after it, passing half its top reading by 5 millimeters and reaching the full value at 40. The full property sets that top as a fraction of the supply, 0.66 by default, about 670 on a 5 volt Uno. The usual mistake is treating the number as millimeters; calibrate it in your own water. A real one left powered in water corrodes, so power it from a pin only to read it. Corrosion, water conductivity and the wet film left after lifting it out are not modeled.
- Family
- Sensors
- Pins
- 3
- full
- 0.66
A circuit built around it, running and explained: the Water level sensor simulator.
3 pins
Named as the editor names them, so a wire lands where you expect it.
+.-.How to use a water level sensor with an Arduino
In the plant monitor example the sensor hangs below the breadboard with S on A2, VCC on the 5 volt rail and GND on ground, beside a soil sensor and a rain plate. analogRead(A2) gives 0 dry and rises with depth, so unlike the other two it reads higher when wetter, and most of its change happens in the first few millimeters.
To slow corrosion on a real board, feed VCC from a digital pin, write it HIGH, wait a few milliseconds, read S, and write the pin LOW again. An unpowered sensor drives nothing here either, so the same sketch works on the canvas. Then map the reading to marks you made in your own water rather than trusting a scale.
Powered from 3.3 volts the sensor tops out at 0.66 of that, about 2.2 volts, which any 3.3 volt board’s analog pin can read.
What is true about the Water level sensor, here
In its help article’s own words: what the simulation gets right, and where it stops.
Modeled
The shape of the reading. A real one jumps the moment the tip touches the water and then creeps up slowly, because the first millimeter of wet trace turns the transistor on and every millimeter after it only adds a little more base current. The model is that curve: a third of the way up at 3 mm, half at 5 mm, and the top at 40 mm.
Not modeled
The top reading and the curve are typical, not a measurement. A real one moves a lot
with how conductive the water is, which is why this is a level indicator and not a
gauge. Corrosion is not modeled: like the rain plate, a board powered all the time in
water plates itself away, and the advice is to power it from a pin only to take a
reading. Nor is the film of water left on the traces after it is lifted out, which
keeps a real one reading for a while. S comes out through 100 ohms.
From Water level sensor, in full.
See the Water level sensor in a project
2 built-in projects use it. Each opens in the editor, already wired.
Where it turns up in a lesson
2 lessons place it in their own circuits.
The boards it is shown on
This board has a built-in project with the Water level sensor in it.
The rest of the bench
Every one of these is drawn and simulated the same way.
Wire up the Water level sensor
Open the editor and push it into the breadboard. It is free, and it runs on your own machine.