Multiple switches at once / water level meter

Hi guys,

I want to build a gauge for the water level in a tank. I have a float with a magnet in it and a long tube that the float fits around and a bunch of hall effect sensors. The idea is to put one HE sensor at each 1 gallon increments up the long tube and as the flost goes up or down it will turn them on or off.

My question comes to how to best read them all. It seems a waste to bring them all in to individual pins and read them one by one. It seems like some sort of resistor ladder and I can do it with one analog pin. I know how that works when only one switch at a time will be closed, but how do I work that out here where all of the switches up to a point will be closed.

I hope that makes enough sense that someone can help.

Thanks in advance

It seems like some sort of resistor ladder and I can do it with one analog pin. I know how that works when only one switch at a time will be closed, but how do I work that out here where all of the switches up to a point will be closed.

then you should use resistors of the same size in the ladder ...

make a drawing and run some scenario's ...

resistors in parallel to the hall latch type switches…

no fluid, all resistors are in circuit, if they are all 10-hecto-ohm (that was for Runaway Pancake)

then the 10 (guessing you have 10 levels) would = the sum of all the resistors.

as the level rises, the switch closes, the parallel resistor is not in play, now there are 9.
rises more, next switch closes, then there are 8…

think 1k ohm. ADC input. not work out how to get the voltages in a range you want and the power draw you can live with.

draw it out, try it on your bench. don’t forget the second magnet to open the switch as the level falls.