I wonder if there is an alternative solution to this problem:
I have a 3v water pump being controlled by an arduino, which pumps water out of a bucket. I would like the pump to turn off once the bucket is empty. My idea for this was to measure the voltage at the pump (which in theory should change depending on the load; that is, very small if bucket is empty and the pump is not pumping/ has no load). The pump will remain on as far as the voltage drop is large and will turn off if the voltage does not drop.
The alternative is to add a water level sensor, but my arduino run out of pins.
Is there another way to control the pump from the arduino, depending on the dc motor load?