Water level sensor with TinkerPie
How deep is the water on the strip? Tank and flood monitors.
| Type | Analog sensors |
|---|---|
| Connect to | P10-P13 |
| Gives | 0-100 % |
| Simulator | Yes: a control appears under the simulated board |
How it works
The water level strip has metal lines along its length. The more of the strip that is under water, the more the lines are connected and the higher the reading.
How to wire it
Plug the module's A0 / OUT into P10 (or P11-P13 when Wi-Fi is off), VCC to 3.3 V, GND to GND.
Code
In blocks: Accessories category in TinkerPie Studio. As code:
// JavaScript
sensors.waterLevel(Pin.P10)
// Arduino C++
sensors::waterLevel(Pin::P10) Good to know
- Measures only the few centimetres covered by the strip.
- Keep the top part with the pins out of the water.
- Power it only when you read it to slow down corrosion.
Projects with the Water level sensor
Similar modules
- Potentiometer (knob)
- Soil moisture sensor
- Light sensor module (LDR)
- Sound sensor module
- Gas / smoke sensor MQ-2
- Air quality sensor MQ-135
- Rain drop sensor
- Force sensor (FSR)
More projects to try
Questions
Can I try the Water level sensor without buying one?
Yes. In TinkerPie Studio the simulator shows a control for it under the board, so you can test your program before you build it.
How can I measure a whole tank?
Use the strip near the top as a "full" alarm, or measure the water surface from above with an HC-SR04 ultrasonic sensor.