The quick answer – it isn’t an efficient use of power.
Solar panels are fairly inefficient, so the size of panel that can be installed on the roof of an electric car won’t generate enough power to add an appreciable mileage to the battery, while adding extra weight to the vehicle (which will shorten its range).
Lighter weight panels are being used in a few vehicles to power the lighter duty systems though – while they can’t generate enough power to run the motors they can help power things like the low voltage systems powering the AC or entertainment systems, allowing more use of those without impacting overall mileage.
Latest Answers