Extracting the maximum energy from solar panels