Lightning protection measures for solar controller