A closer look at Radioisotope power
A radioisotope thermoelectric generator converts some heat from radioactive decay into electricity.
It provides power where sunlight is weak or intermittent and generates useful waste heat. The available electrical output declines gradually over time.
Voyager and Curiosity use radioisotope power in very different environments. Long lifetime and independence from local sunlight suit both missions. For the surrounding ideas, see Curiosity lands with a sky crane and Mars Pathfinder and Sojourner.
Want to learn more about Radioisotope power? Radioisotope thermoelectric generator on Wikipedia.

