Page 1 of 2

Water level sensor

Posted: Wed Jan 20, 2021 12:18 am
by jeffcourtneydba
I need a water level sensor for my DWC reservoir set up. I was thinking this fuel gauge sending unit with a pole and float that goes up and down would be pretty cool, see link please. It talks about the sending output signal is Ohms..."Output signal: 0-190ohm; Resolution range: 21mm". What does this mean? and would this work with hooking up to a ESP32 to feed me the data?




Also Im open to Ideas of any other float sensors if you have them.

Thanks,
Jeff

Re: Water level sensor

Posted: Wed Jan 20, 2021 6:27 am
by Shimbob
That's neat. It should be possible to read the value using an analog input like on a esp8266.

Re: Water level sensor

Posted: Wed Jan 20, 2021 8:07 am
by jeffcourtneydba
Shimbob wrote:
Wed Jan 20, 2021 6:27 am
That's neat. It should be possible to read the value using an analog input like on a esp8266.
Thanks for the encouragement! I pulled the trigger to see if this will fit my application

Re: Water level sensor

Posted: Wed Jan 20, 2021 5:22 pm
by jaysal
You may want to look into this sensor
https://esphome.io/components/sensor/ultrasonic.html

They are pretty cheap on amazon I cant even remember how much I paid for a 5 pack.

I had about 5 minutes last night to get one connected and tested to a spare ESP32, it does need 5V.

It had fairly accurate measurements however it was giving me the measurement in meters and I am in the US so only used to the Imperial system. I will have to figure out how to convert the measurement and also add the code that will give me the measurement of water in the from of %. I have seen there is formulas for calculating this.

I just need to get alerts with my res falls below a certain percentage to avoid ruining my submerged pump and plus top off the rest when needed.

Re: Water level sensor

Posted: Wed Jan 20, 2021 9:15 pm
by jeffcourtneydba
jaysal wrote:
Wed Jan 20, 2021 5:22 pm
You may want to look into this sensor
https://esphome.io/components/sensor/ultrasonic.html

They are pretty cheap on amazon I cant even remember how much I paid for a 5 pack.

I had about 5 minutes last night to get one connected and tested to a spare ESP32, it does need 5V.

It had fairly accurate measurements however it was giving me the measurement in meters and I am in the US so only used to the Imperial system. I will have to figure out how to convert the measurement and also add the code that will give me the measurement of water in the from of %. I have seen there is formulas for calculating this.

I just need to get alerts with my res falls below a certain percentage to avoid ruining my submerged pump and plus top off the rest when needed.

I ended up buying that float I posted. I don't see any templete code for it in esphome.com so it will be interesting if I can figure out how to code it. Thank you for suggesting this alternative if the other gives me trouble

Re: Water level sensor

Posted: Wed Jan 20, 2021 9:26 pm
by Shimbob
I believe what you'll need to do is set it up as a voltage divider, as in here:
https://randomnerdtutorials.com/esp8266 ... h-nodemcu/

Here's another using an arduino:
https://create.arduino.cc/projecthub/ia ... ter-90fda8

You'll need a 180Ohm resistor with that particular float.

Re: Water level sensor

Posted: Thu Jan 21, 2021 6:19 pm
by jeffcourtneydba
Shimbob wrote:
Wed Jan 20, 2021 9:26 pm
I believe what you'll need to do is set it up as a voltage divider, as in here:
https://randomnerdtutorials.com/esp8266 ... h-nodemcu/

Here's another using an arduino:
https://create.arduino.cc/projecthub/ia ... ter-90fda8

You'll need a 180Ohm resistor with that particular float.

Divider would be to get the voltage down to 1V right?

Re: Water level sensor

Posted: Thu Jan 21, 2021 7:33 pm
by Shimbob
Oh, the esp8266 only does 0-1V on the analog input.
So then yes, I guess you would need additional resistance to drop 2.3V, then it feeds into the divider. I think, I'm not an EE.

Looking at the analog input voltage range some more, it seems if you're using a bare esp8266 chip (which I doubt is the case) then you need to drop that extra 2.3V; but if you use a NodeMCU board, it comes with a built-in voltage divider and the input range is actually 0-3.3V.

I just ordered one of these floats, I'll play with it on a NodeMCU.

Re: Water level sensor

Posted: Sat Jan 23, 2021 1:20 am
by jeffcourtneydba
Shimbob wrote:
Thu Jan 21, 2021 7:33 pm
Oh, the esp8266 only does 0-1V on the analog input.
So then yes, I guess you would need additional resistance to drop 2.3V, then it feeds into the divider. I think, I'm not an EE.

Looking at the analog input voltage range some more, it seems if you're using a bare esp8266 chip (which I doubt is the case) then you need to drop that extra 2.3V; but if you use a NodeMCU board, it comes with a built-in voltage divider and the input range is actually 0-3.3V.

I just ordered one of these floats, I'll play with it on a NodeMCU.

My sensor just arrived. Apparently it only has 2 wires. So I guess one to ground and one to A0 on my esp8266...wish me luck

Re: Water level sensor

Posted: Sat Jan 23, 2021 1:24 am
by jeffcourtneydba
Shimbob wrote:
Thu Jan 21, 2021 7:33 pm
Oh, the esp8266 only does 0-1V on the analog input.
So then yes, I guess you would need additional resistance to drop 2.3V, then it feeds into the divider. I think, I'm not an EE.

Looking at the analog input voltage range some more, it seems if you're using a bare esp8266 chip (which I doubt is the case) then you need to drop that extra 2.3V; but if you use a NodeMCU board, it comes with a built-in voltage divider and the input range is actually 0-3.3V.

I just ordered one of these floats, I'll play with it on a NodeMCU.

My sensor just arrived. Apparently it only has 2 wires. So I guess one to ground and one to A0 on my esp8266...wish me luck