A microsensor for sensing a substance comprises a substrate, a source of
light, an optical microresonator or semiconductor optical ring
microresonator fabricated in the substrate exposed to the substance to
allow an interaction between the microresonator and substance, a
waveguide coupling the source of light to the optical microresonator, and
a detector coupled to the microresonator to measure the resonant
frequency of the microresonator, the absorption loss of whispering
gallery modes in the microresonator or the quality factor of the
microresonator, which are sensitive to interaction of the substance with
the optical microresonator. A polymer coating disposed on the
microresonator is reactive with the substance. The microsensor may
comprise a plurality of microresonators corresponding to a plurality of
different resonant frequencies to generate an absorption spectrum of the
substance.