Controlling dc motor in arduino with and without a load

arduinoattinydc motorload

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?

Best Answer

As Brian mentioned, a simple solution would be to measure the motor current. Alternatively, assuming that you have a free pin to measure voltage (as this is what you mentioned), you could use a pressure transducer, which would give you exactly how much water is in the bucket.

Arduino have a nice explanation for such sensors: http://playground.arduino.cc/Main/Waterlevel

Edit: additional information added. A pressure transducer outputs a voltage that is proportional to the pressure. Higher the pressure, higher the output voltage and vice versa. But why measure pressure? The more water in the bucket (in height) the higher the pressure at the bottom of the tank, I suggest you look at "hydrostatics" on Wikipedia. Therefore, if you place the pressure transducer at the bottom of the bucket, the output voltage will be proportional to the height of the water inside the bucket.

Related Topic