AVR based water pump controller