# Water Level sensor + MQTT

**URL:** <https://forum.arduino.cc/t/water-level-sensor-mqtt/1332102>\
**Category:** Science and Measurement\
**Created:** [December 14, 2024, 10:15am UTC](https://forum.arduino.cc/t/water-level-sensor-mqtt/1332102 "2024-12-14T10:15:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgelza](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/georgelza/32/813194_2.png) [@georgelza](https://forum.arduino.cc/u/georgelza)\
**Post date:** [December 14, 2024, 10:15am UTC](https://forum.arduino.cc/t/water-level-sensor-mqtt/1332102/1 "2024-12-14T10:15:14Z")

</div>

Hi all

Got some pressure sensors on the way from Aliexpress.

1 x 10Bar - Water pressure after booster pump  
2 x .5 Bar - Water pressure at the bottom of tank n pipe to booster pump  
1 drop in 5M - Will be configured for a friend, he has a cement tank that has a drop in pump, so will add a drop in sensor lying at the bottom.

All are 5v based.

I'm looking for a sketch's that can measure the voltage, convert to water level after having been zero'd, but then send the data to MQTT broker.

I have some Nodemcu's and D1 Mini's available.

G

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [December 14, 2024, 2:59pm UTC](https://forum.arduino.cc/t/water-level-sensor-mqtt/1332102/2 "2024-12-14T14:59:39Z")

</div>

Good luck. Your description seems like a quite unique project.

---

<div class="post-metadata">

**Author:** ![Ron\_Blain](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ron_blain/32/1126393_2.png) [@Ron\_Blain](https://forum.arduino.cc/u/Ron_Blain)\
**Post date:** [December 14, 2024, 4:25pm UTC](https://forum.arduino.cc/t/water-level-sensor-mqtt/1332102/3 "2024-12-14T16:25:19Z")

</div>

> [@georgelza](#):
>
> I'm looking for a sketch's that can measure the voltage, convert to water level after having been zero'd, but then send the data to MQTT broker.

No mention of tank height or output voltage of your sensors?  
Normally one considers when measuring pressure of the water column. Looking at the relationship 1.0 psi of pressure is 27.707 inches of water column. For those across the pond this would be 0.5 Bar is 5.0987214446105 meters of WC. That's an awful tall tank.

> [@georgelza](#):
>
> I'm looking for a sketch's that can measure the voltage, convert to water level after having been zero'd, but then send the data to MQTT broker.

You apply the math functions in your code. The forums do have a section for paid code where you can pay a member to write your code. Now if you write (roll your own) code members will help but you need to do the work and provide details like links to your sensors and a wiring diagram of your setup.

Ron

---

<div class="post-metadata">

**Author:** ![dccontrarian](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dccontrarian/32/1013044_2.png) [@dccontrarian](https://forum.arduino.cc/u/dccontrarian)\
**Post date:** [December 14, 2024, 5:19pm UTC](https://forum.arduino.cc/t/water-level-sensor-mqtt/1332102/4 "2024-12-14T17:19:55Z")

</div>

This is two or three separate projects. Read the sensor. Convert to pressure. Send results to MQTT. Each of those exists independently of the others.

---

<div class="post-metadata">

**Author:** ![georgelza](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/georgelza/32/813194_2.png) [@georgelza](https://forum.arduino.cc/u/georgelza)\
**Post date:** [December 14, 2024, 6:12pm UTC](https://forum.arduino.cc/t/water-level-sensor-mqtt/1332102/5 "2024-12-14T18:12:59Z")

</div>

various tanks. 2 x 2.5 m (using 0.5bar sensors)  
1 post booster pump that can boost 0-6bar.  
and 1 x 4m tank. that is where the drop in sensor will go capable of 5m sensing.

output voltage for all sensors are all 0-5v

G

---

<div class="post-metadata">

**Author:** ![georgelza](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/georgelza/32/813194_2.png) [@georgelza](https://forum.arduino.cc/u/georgelza)\
**Post date:** [December 14, 2024, 6:16pm UTC](https://forum.arduino.cc/t/water-level-sensor-mqtt/1332102/6 "2024-12-14T18:16:17Z")

</div>

ye, realise that... allot of projects that only does measure... why i'm asking for something that includes mqtt. otherwise i'll do using python on a pi zero.. which is my sandbox.

G

---

<div class="post-metadata">

**Author:** ![Ron\_Blain](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ron_blain/32/1126393_2.png) [@Ron\_Blain](https://forum.arduino.cc/u/Ron_Blain)\
**Post date:** [December 14, 2024, 7:19pm UTC](https://forum.arduino.cc/t/water-level-sensor-mqtt/1332102/7 "2024-12-14T19:19:25Z")

</div>

OK, so your sensors output 0 to 5 Volts. So on your two 0.5 bar sensors it becomes 0.0 to 0.5 Bar becomes 0.0 to 5.0 volts. Your 0.0 to 1.0 Bar sensor becomes 0.0 to 1.0 Bar becomes 0.0 to 5.0 Volts. You know the math to plot it. You can use just about any protocol including but not limited to MQTT. If a wireless network is available you can send the data wireless. Personally for what you want to do a simple Arduino Uno or similar uC will do fine with the code in C+.

Ron

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [June 12, 2025, 7:20pm UTC](https://forum.arduino.cc/t/water-level-sensor-mqtt/1332102/8 "2025-06-12T19:20:18Z")

</div>

Closed on June 12, 2025, 7:20pm UTC

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