Light-emitting diodes can function as spectrally selective detectors in a miniature, inexpensive sun photometer that measures atmospheric turbidity and precipitable water.