Red water level sensor module with 10 exposed sensing traces and a 3-pin S + - header

Water Level Sensor Module for Arduino and ESP32

$1.79 NZD
Save 10% at 5+
Skip to product information
SKU: MOD-WATER-SENSOR

Water Level Sensor Module for Arduino and ESP32

$1.79 NZD
Availability:
Order before 12:00pm for same-day dispatch Dispatch 7 days a week, excluding public holidays

NZ Post: 1-2 days urban · 2-4 days rural

Shipping from $5.99 urban / $9.99 rural, or free pick-up in Te Awamutu.

Buy more, pay less Prices shown are per unit. Add enough of this item and the lower rate applies on its own at checkout. There is no code to enter and you do not need to buy a pack. Choosing a tier here just sets the quantity for you. Larger quantities go out in the same bag, so packing, handling and postage cost us less per unit. We pass that saving straight on to you, so you can buy more for less.

Only 1 available

Easy 30-day returns · 12-month warranty

Add $50.00 for Free Urban delivery ($88.00 for Rural)
Urban $50 Rural $88

A water sensor tells a microcontroller when water is touching it. This one has ten bare metal stripes along a strip about 40mm long. Water bridging the stripes raises the voltage on the S pin, so the reading climbs as more of the strip gets wet. It tells wet from dry and gives a rough idea of depth over that 40mm. It is not a measuring gauge, because the reading also changes with how clean the water is and with the supply voltage.

You can use it as a leak alarm under a sink, an overflow alarm near the top of a sump, or a rain detector. It runs on 3.3V or 5V, and its three pins connect with jumper wires to an analogue input on an Arduino, ESP32 or Raspberry Pi Pico. The stripes corrode if the board sits powered in water, so you power it from a spare output pin and switch it on only for each reading. The steps below show how. For a tank you want to monitor all year, an HC-SR04 ultrasonic sensor mounted above the water measures the level without touching it.

Specifications

SensesWater touching the stripes: wet or dry, and rough depth
Sensing lengthAbout 40mm, 10 stripes
OutputAnalogue voltage on S, rises as more is wet
Supply3.3V to 5V DC
CurrentUnder 20mA
PinsS, + and - on a 2.54mm header
Size59 x 20mm, about 66mm with pins
Mounting2 holes at the pin end, about 15mm apart
In the box1 sensor with header fitted, no jumper wires

Datasheets

Wiring & getting started

Wiring diagramArduino Nano and ESP32
Wiring drawing: water level sensor S to Arduino Nano A0 or ESP32 GPIO34, + to Nano D7 or ESP32 GPIO26, and - to GND on both
Tap the drawing to open it full size.
  1. Find the pins

    Hold the board with the parts facing you and the stripes pointing left. The three pins are marked S, + and - from top to bottom. S is the signal, + is power and - is ground.

  2. Wire it to an Arduino

    Connect S to A0, + to D7 and - to GND. Our female-to-male jumper wires push straight onto the pins. Powering + from pin D7 instead of the 5V pin lets the code switch the sensor off between readings.

  3. On an ESP32 or Pico

    Connect S to an analogue input pin, + to a spare output pin and - to GND, then change the two pin numbers at the top of the code. These boards run at 3.3V, and a sensor powered from a 3.3V pin keeps its S output within what the input pin can take. On a 38-pin ESP32, GPIO34 for S and GPIO26 for + both work with WiFi on.

  4. Load the test code

    Upload the code below and open the Serial Monitor at 9600 baud. A new reading appears every second.

    Example Arduino codeArduino C++
    // Water sensor test for an Arduino Uno or Nano.
    // Wiring: S to A0, + to D7, - to GND.
    // The sensor is only switched on while it takes a reading,
    // which slows the wear on the bare metal stripes in water.
    const int POWER_PIN = 7;
    const int SIGNAL_PIN = A0;
    
    void setup() {
      Serial.begin(9600);
      pinMode(POWER_PIN, OUTPUT);
      digitalWrite(POWER_PIN, LOW);    // sensor off
    }
    
    void loop() {
      digitalWrite(POWER_PIN, HIGH);   // sensor on
      delay(10);                       // let the reading settle
      int reading = analogRead(SIGNAL_PIN);
      digitalWrite(POWER_PIN, LOW);    // sensor off again
    
      Serial.print("Water reading: ");
      Serial.println(reading);
      delay(1000);                     // one reading a second
    }
  5. Check it works

    With the sensor dry, the reading sits at or near 0. Dip the stripes into a glass of tap water and the number jumps, then climbs as you lower the board. Write down the dry number and the number with the stripes fully under your water, and use those two as your empty and full marks. If the reading stays at 0, check that + goes to D7. The Power light on the board should flicker once a second, each time the code switches the sensor on.

  6. Keep the pin end dry

    Only the striped end goes in the water. Keep the end with the parts and the pins above the surface.

Note: The bare metal stripes corrode in water over time, so keep this sensor out of drinking water, food and fish tanks.

Frequently Asked Questions

Answers to the questions buyers ask most.

Can it tell me how many millimetres of water there are?
Only roughly. The reading rises as more of the 40mm strip goes under, but the same depth gives a different number in tap water, rainwater and salty water, and a different number again on 3.3V and 5V. Note your own readings at empty and at full, and treat the numbers in between as low, half and high.
Why is the reading low in rainwater or distilled water?
Clean water carries little current, and the sensor works by passing a tiny current through the water between its stripes. Distilled water may barely register, and fresh rainwater reads lower than tap water. Set your wet mark using the water the sensor will sit in.
How long does it last in water?
That depends on how long it is powered while wet. Left powered in water all the time, the stripes corrode and the readings drift. The less time it spends powered while wet, the longer it lasts, which is why our example code switches it on only for each reading. It still wears in the end, so treat it as a part you replace.
Can I leave it outside as a rain sensor?
Yes, as long as the pin end stays dry. Mount it with the stripes facing up on a slight tilt so drops run off, and keep the end with the parts and pins under cover. Rain landing across the stripes raises the reading, and it falls back as the board dries.
Can I get a simple wet or dry signal from it?
Yes, in your code. The board has one analogue output and no separate on/off pin, so you choose the switching point yourself. Pick a number halfway between your dry reading and your wet reading and treat anything over it as wet.
Does it work with a Raspberry Pi?
With a Raspberry Pi Pico, yes: connect S to GP26, GP27 or GP28. A full-size Raspberry Pi has no analogue inputs, so it needs an external ADC module between the S pin and the Pi.

Have a Question About This Product?

Send it through and we will get back to you by email.

Why Buy from NZN

Useful parts, fair prices and someone local to help.

I'm Lukas, an engineering student and maker based in Te Awamutu. NZN grew out of a CNC build that dragged on for months because every missing cable, bolt or electronic part meant another overseas order. I started the shop so Kiwi makers can spend more time building and less time waiting for the next parcel.

  • Stocked here in New Zealand

    Orders are picked and packed in Te Awamutu and dispatched within 24 hours every day, excluding public holidays. NZ Post target delivery is 1-2 days urban and 2-4 days rural. In Te Awamutu and Kihikihi you can choose local delivery at checkout: same day if you order before 8am, otherwise next day.

  • Fair prices, clearly shown

    Prices are kept competitive and quantity discounts are shown upfront. Free delivery starts at $50 for urban addresses and $88 for rural addresses.

  • 30-day returns and 12-month warranty

    Get in touch if something is not right and we will help sort it.

  • Practical product support

    Ask a product question and get help from a real person in New Zealand who knows the range.

You may also like