Overcurrent and motor protection