A general and precise method to evaluate the series resistance of photovoltaic cells from I-V characteristics