Papatom said:
Is it possible to have the emitted light with the shorter wave light make electricity with a solar panel? If so then is the useless infrared light converted into useful electricity. This is in contrast with the second law. Where is my mistake?
From the context of your post, I am assuming that you do not have good idea of absorption/emission of light and/or conversion of light into some other form of energy.
If you are talking about crystalline Si solar panel, photons of UV region does not yield high conversion efficiency although it is not zero. Look at the figure below. You can see that the solar spectrum ranges from UV to near-IR region. The crystalline Si solar cells do not efficiently convert all of the region into electricity (green region). Around 1000 nm is the wavelength in which crystalline Si solar cells convert photons into electricity the most efficiently.
1) So what do you mean by "shorter wave light make electricity"? Which region in the spectrum are you specifically talking about?
2) Your second question also does not make sense. What do you mean by "if so"? What you said in the second question does not reflect anything about the first question.
3) Your third question once again does not make any sense. What does your first and second question have to do with second law of thermodynamics?
4) The answer to your fourth question "where is my mistake", is probably scattered everywhere. We need to tackle them one by one.
Papatom said:
In a closed system with all temperatures in equilibrium at 300 K is it possible to upconvert IR photons to photons that at the end can charge a battery? This is in contradiction with the second law. Where is my mistake?
It does not matter if it is 300 K or 0 K. For example, if you have a material that can convert two or more IR photons to shorter wavelength photon, then it can be done regardless of temperature. For example, if you have Er(III) and Yb(III) and you excite Yb(III) ion with 980 nm laser, then you can produce 650 nm and/or 540 nm (or even higher depending on the material and the laser). This also does not violate any law.