# How solar panels produce energy

In solar panels, is heat energy converted into electrical energy or is light energy converted into electrical energy?

• light is: incoming photons from the Sun kick electrons into higher energy states and then semiconductor magic happens (I don't understand semiconductors well enough, clearly!). Photons of low energy (which would correspond to infrared, or heat, don't have enough energy to do the kicking. – tfb May 23 '17 at 14:26
• The heading of your question is very wrong. Energy cannot be created..! – Mitchell May 23 '17 at 14:33
• I'd suggest "produce" rather than "create". – NickD May 23 '17 at 15:13
• @BharathKumar Honestly, the purpose of this site is not to encourage beginners. If googling it brings up the exact and clear answers, there isn't much point having it here. It doesn't help that this question is fairly ambiguous. Photovoltaic (PV) energy converts the light to electricity; but you could also use methods like solar thermal energy to generate electricity, which would still be "solar panels". – JMac May 23 '17 at 15:49
• Well, I would say that, yes, we like to encourage beginners but, come on, try showing a little more effort. You could have easily answered your very, very basic question on solar panels yourself by just a quick google search on the words "How solar panels create energy". Did you do that? – Samuel Weir May 23 '17 at 17:14

A photovoltaic solar panel is effectively a giant diode i.e. it has a layer of $n$ doped silicon in contact with a layer of $p$ doped silicon with a PN junction between them.
When a photon hits the solar panel it can excite an electron from the valence band into the conduction band, and this produces a negatively charged electron in the conduction band and a positively charged hole in the valence band. At the PN junction the electron is attracted to the $n$ doped side and the hole is attracted to the $p$ doped site so the two charges separate, and that separation creates a potential difference. The end result is that absorption of light produces a voltage difference between the two sides of the cell.