Condensation can happen unexpectedly, covering the objective of your lens or telescope with dew or frost, even on clear nights and in low-humidity environments. Here is an example of what condensation can do to your images.


These are two 120-second exposures taken 40 minutes apart using a 50mm lens. Initially, the lens had no condensation, but it got pretty thick soon after I started shooting. So what causes condensation to appear on lenses like this?
Cause
Warm air can hold more water in it than colder air can. When warm, humid air comes in contact with a colder surface, the air cools down. If it cools down to the point where the air can no longer hold water as water vapor, it condenses onto the cooler surface as dew or frost. When we point our camera lenses and telescopes to the sky, they radiate heat out into space and cool down. As the night wears on, warmer masses of air can blow across our lenses. If the lenses are colder than the air, and the air is just humid enough, condensation forms on the lenses.
Prevention
The simplest way to prevent condensation is to use a lens hood or dew shield. For long focal length telescopes and lenses, a hood or dew shield is usually enough to prevent dew and frost from forming. They work by holding a layer of air close to the lens, which tends to isolate the lens from masses of humid air moving around during the night.
Left: 70-200mm zoom lens with lens hood attached (bottom). Right: Refractor telescope with dew shield extended (over right side of tripod).
However, short focal length lenses have extremely wide views, and their corresponding lens hoods are mostly open to the air around them, reducing their effectiveness. If you don’t plan to shoot for more than 20-30 minutes (about the length of my average nightscape shoot), just put the lens in your pocket for a few minutes beforehand to warm it up.
This might not be long enough for you if you’re planning to shoot a multi-hour stack of exposures. And of course, you can’t just shove a telescope into your pocket, either! In these cases, a small lens heating element may be wrapped around the perimeter of the lens to warm it just slightly above ambient.
An example of a dew heater strap, available at agenaastro.com – not shown is the controller and battery pack, which delivers electricity to the heating element via RCA port.
A lens heater is a surefire way to prevent condensation, but requires and additional power source. It can also cause heat waves to muddy up your image if the heating element warms the air close to the lens too much. Adjustable heaters can be had, but they are typically far more expensive than they could be if you build your own.