Water level sensor

I am trying to create a water level sensor for my rain water tanks using a SEN0257 through an MCP3008 using a raspberry pi zero w then read to some form of widget showing a tank level. Is this possible?
Thanks for the help

Hi @Jack250655 - welcome to the forums :smiley: Water height in a tank is a classic project and if you look around the forum / projects page you might find something that you can reproduce.

Totally! Though there are some things to consider:

The sensor is rated 0 → 1MPa. 1MPa is pretty high pressure, nearly 100m of head (source). If you only want to measure eg. 0 → 3m of head then you’ll only get to about 30kPa which is only about 3% of the sensor range.
This might give you a resolution / noise problem.

The sensor is a 5V device, so your ADC will need to be running at 5V. include logic level translation when connecting to the Pi.

The resolution might be a killer, perhaps consider a different sensor for this task. Reasoning:

  • Assuming 4.5V sensor output correlates with 1MPa or about 100m of head
  • the MPC3008 is 10-bit (1024 steps)
  • 100m / 1024 steps ≈ 9.7cm per step.

Maybe that’s not a big deal, but with noise in the signal that could result in a signal with around 1m of noise in the height measurement.

I personally love the idea of using water pressure to measure tank height because it seems so stable and robust compared to other methods. If you can find a different pressure sensor you might be in business! There are plenty of different types of sensors available too.

1 Like

Thanks for that @Michael
Yeah I really wanted to go with pressure if I could didn’t think about the range when I bought that sensor may need to have a look around.
I will now need to learn how to write the code I require as I am a complete novice and this is my first project. May have bitten off more than I can chew but should be a fun learning experience non the less

1 Like