ADS1115 vs 0-25v Voltage Sensor on a water tank level setup

Hello all,

I am working on refining a water tank level sensor that I have made using an ESP-Wroom-32, QDY30A 0-10v and a 0-25v Voltage sensor with ESPHome.

I went down this path for reasons, (initially purchased a Shelly Plus Uni, but it was faulty) so I went with what I already had in my drawer.

I have not seen anyone else post a build of the QDY30A using the 0-25v sensor, instead people seem to use the ADS1115 and I cannot see why.

Would I see more reliability\accuracy if I changed to the ADS1115?

Currently I have fluctuations in readings that seem to match temperature changes. So I am keen to understand if I can rule out the basic voltage sensor I have used and move on to seeing if I need vent holes in the box or need to adjust according to ambient temp.

Thanks for reading and taking the time! I am keen to learn.

EDIT : I fixed my issue, was not relating to the voltage sensor, but needing to ventilate the electronics box so the tank probe can sense the outside air pressure, which seems like a silly mistake now that I know!

Components :
ESP32-Wroom-32 - [https://www.aliexpress.com/item/1005007195400858.html?spm=a2g0o.order_list.order_list_main.113.1c531802D3GE2j ]

QDY30A 0-10v - [https://www.aliexpress.com/item/1005004607235726.html?spm=a2g0o.order_list.order_list_main.118.1c531802D3GE2j]

0-25v Voltage Sensor - [https://www.aliexpress.com/item/1005006962265080.html?spm=a2g0o.productlist.main.1.668d5fb6IxE8km&algo_pvid=81101f10-1fb3-47c2-9f5c-8209421b87db&algo_exp_id=81101f10-1fb3-47c2-9f5c-8209421b87db-0&pdp_ext_f={"order"%3A"67"%2C"eval"%3A"1"}&pdp_npi=4%40dis!NZD!1.68!1.68!!!6.77!6.77!%402103244417373588686128086e2e01!12000038869193383!sea!NZ!713905200!X&curPageLogUid=YgcPVG5hJkjp&utparam-url=scene%3Asearch|query_from%3A]

The ads1115 allows analog inputs to be forwarded via I2C to a ESP32 (for example)

The QDY30A on the other hand is a sensor that puts out it readings via an anlog signal.

Your 0-25V “sensor” is nothing but a voltage divider: 25V in will result in 5V out (both analog signal.)

The ESP32 also has native adc input(s).

Because people generally don’t buy a module, they use two resistors.

Neither do I.

But first verify what you really have, what’s written on the sensor body (sometimes they send you whatever model they have on hands).

The onboard ADC’s are 12-bit while the ADS module is 16-bit. It’s clearly a better solution.

1 Like

Not just it has higher resolution, but it’s superior to ESP32 ADC in every sense, especially in case of low voltage readings (esp32 ADC can’t really go below 100mV).

1 Like

That totally depends. For example if a sensor only has a 8-bit resolution :person_shrugging:

The mentioned sensor is available in various ranges - including one with a range from 0.1-5V. In any way I would totally avoid analog out-/in-puts and rather choose (any) other available method like rs485 (offered in the linked product) :point_up:

Built-in adc in esp32 isn’t exaclty high-quality one, if i’ve read correctly. Supposedly it’s not very linear with noticeably “glitch” at 2.5V and just under max.
It has quite some noise - you can find (overexaggerated) info that it’s in fact 9 bit data and 3 bit of noise :stuck_out_tongue_winking_eye:
Then - depending where you read - some say it can’t go below 100mV, while you can find information about not going even as high as below 0.2V… So, choosing ads1115 is clearly a better.

But, at the end i totally agree with orange-assistant: I’d choose any digital solution. In this case RS485.

Thank you, that makes perfect sense.

Thank you! I think because I am still learning about these things the resolution specs didn’t sink in for me to understand that. But makes a lot of sense now.

While I think Esp32 ADC is … not the best possible, I think it’s capable to detect your 0-10V sensor without problems for your use case. I could immagine that 5% tank level resolution is enough for normal use.

So far so good I think, thanks for the reply. At least the readings are close enough to my multi-meter for me to be happy. A long way off where I started!!

I will have a play with the ADS1115 when my new batch of ESP32’s arrive as I have a second water tank to monitor so I am working on getting this first one as close to right before I look at building a second one. That and I will be looking to increase the sensitivity if possible.

I would like to get as much detail as possible, but smooth out the fluctuations as well. So a bit of research on the sensor\maths side in HA to get it better.

Hey Dave,
I have the same 0-10V probe, did you use the 0-25V board in the end or just a voltage divider? All the ADS1115s don’t support up to 10V, and neither do the pins on ESP32, so I assume the 0-25V board worked ok for you? I didn’t quite read what you ended up using for best results.
I can’t use a voltage divider as I’m running my project off battery, and a voltage divider is a quick way to chew up energy. I was looking at these - a bit more pricey but low power consumption and uses I2C so should theoretically work https://www.aliexpress.com/item/1005007539256740.html or possiby INA260 chip? https://www.aliexpress.com/item/1005007755785535.html (expensive)

I think INA219 look to be the best bang for buck

Cheers

You just use high value resistors and that shouldn’t be problem.
Speed is not problem here since water level doesn’t change quicly…

I had originally started this project with a Shelly Uni Plus, but it literally went up in smoke on me.

So, I went with the 0-25v board on the ESP32 as I already had them. Next time I will try to make the voltage divider myself instead of the board and see how that goes. I am running off mains power as the house water pump is right beside my tank, so power usage isn’t a concern for me.