EQ-17 · Water level sensor
Compare dry and partly wet readings
Exposed traces produce an analog signal that changes as water covers the sensing area.

How to use it
You’ll need: ESP32-S3, contact water level sensor, jumpers, a shallow container of water, and a cloth.
Connections
This example uses one part at a time on the MoloWorks ESP32-S3. If a course uses different GPIO pins, follow that course’s wiring and code together. Disconnect USB and any external power before changing wires.
| On the part | Connect to |
|---|---|
| Module + | ESP32 3V3 |
| Module − | ESP32 GND |
| Module S | ESP32 GPIO4 (ADC1) |
- Set the board and connectors well away from the water. Position the sensor so only its exposed sensing area can touch water. Do not immerse the header or electronics.
- Run the ADC example once with dry traces. Run it again with the tip of the sensing area in the water, then with a larger part of that area covered. Record several readings at each position.
- Disconnect power and dry the sensor after the short experiment. Use your measured ranges to set a relative threshold; do not leave this contact sensor continuously powered in water.
MicroPython example
Run this on the board with your MicroPython editor. Set up the ESP32-S3 first if you don’t have a working connection.
from machine import ADC, Pin
from time import sleep_ms
sensor = ADC(Pin(4), atten=ADC.ATTN_11DB)
for _ in range(40):
print(sensor.read_u16())
sleep_ms(250)What to look for: The readings change as the wetted area changes. Water conductivity affects the result, so raw readings do not give a depth in millimeters.
AI prompt
Copy the prompt and replace any brackets with details from your kit. Check the suggested wiring against the labels on your parts before applying power.
Compare dry and partly wet readings
I have the MoloWorks contact water level sensor at 3.3 V, with S on ADC1 GPIO4 of my ESP32-S3 running MicroPython. Help me compare dry, partly wet, and more-wet raw readings while keeping all electronics and headers dry. Give me a simple threshold based on those ranges. Do not claim a depth in millimeters or suggest leaving it powered in water.