DIYables Water Sensor compatibility with ESP8266? [Solved]

The product information on the DIYables water level sensor says it can pull a maximum
of 20 milliamps of current.
The spec on an ESP8266 switched digital output is 12 ma. I wanted to switch the sensor
supply voltage off and only power it during a poll/read. This supposedly helps delay corrosion if in a high humidity environmet, which my sensor will be in. And reading it maybe once every 10 minutes would be sufficient.

Has anyone else used this sensor with an ESP8266?

Product link:
DIYables Water Level Sensor

The DIYables Water Sensor Detector for Arduino, ESP32, ESP8266, Raspberry Pi spec says ESP8266 explicitly:

SPECIFICATION

  • Used to detect the presence of water, water leakage

  • Used to measure the water level

  • Supply voltage: 3.3 - 5V DC. Current consumption: less than 20mA

  • Water sensor for Arduino, ESP32, ESP8266, Raspberry Pi, or any 5V or 3.3V microcontroller.

  • Tutorials for Arduino and ESP32 are provided

And it points to:

I realize that. Attaching it the 3v power pin to constantly power it is not an issue as that pin handles more than a switched digital pin that only handles up to 12 ma.

Since they are so inexpensive I may just power it constantly and not worry about any potential onset of corrosion to the sensor traces. Or look at adding another digital output that controls a small relay through a transistor.

I have this ESP8266 absolutely maxed out on pin use. Hopefully it will take it all in stride.

You can use a MOSFET or relay to power it. This will you to turn it on and off as needed. The MOSFET should be controlled with a digital pin. It translates a voltage and switches the current not the controller. Here is a simple low side and high side switches. Your digital pin will go to the gate. If you want it off during reset etc place a 10K resistor between the portpin that is connected to the mosfet and ground for the low side and Vcc for the high side switch. Hope this helps.
image

I had that idea as a last resort and it looks like that is the way to proceed.
I was hoping someone might have tried to power one with a digital pin turning off
and on.

I am closing this thread and using your post for a solution. :+1:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.