Hey all, I posted this a week or so ago, but never really got closure on this issue: Photovoltaic cells utilize the photoelectric effect to produce a voltage whenever an incident photon's energy is higher than the band gap of the silicon used for the cell. Consider an isolated system, say a container of gas. If the temperature of the gas is above 0 K, the gas particles produce thermal radiation in the form of photons. The energy of these photons are distributed according to Planck's law. Regardless of the temperature of this gas, there will always be some high-energy photons radiated by the gas. Since we're assuming the system is isolated, none of these photons leave the system. Let's say we throw in a photovoltaic cell into this container, which is connected to an ideal capacitor with infinite capacitance. Let's say the capacitor is outside of the system. Photons radiated by the gas with energy above that of the band gap generate a tiny voltage in the cell by the photoelectric effect, which charges the capacitor. Over time, the hot gas cools, since some of it's higher-energy radiation is being converted to electric potential (similar to evaporation of water). Assuming all of this is OK so far, the problem is: How is this possible? Isn't this reducing the entropy of the system, by directly converting thermal energy of the system into electric potential? Something seems wrong. I appreciate your help!