A sensor includes traps that are adjacent to a waveguide and capable of
holding a contaminant for an interaction with an evanescent field
surrounding the waveguide. When held in a trap, a particle of the
contaminant, which may be an atom, a molecule, a virus, or a microbe,
scatters light from the waveguide, and the scattered light can be
measured to detect the presence or concentration of the contaminant.
Holding of the particles permits sensing of the contaminant in a gas
where movement of the particles might otherwise be too fast to permit
measurement of the interaction with the evanescent field. The waveguide,
a lighting system for the waveguide, a photosensor, and a communications
interface can all be fabricated on a semiconductor die to permit
fabrication of an autonomous nanosensor capable of suspension in the air
or a gas being sensed.