A torsional resonator sensor apparatus comprising: a resonator structure comprising a switching element and a sensor surface configured to detect a mass of a particular agent that becomes in contact with the sensor surface, wherein the particular agent comprises a gas, vapor, or biological entity, the sensor surface is arranged on a first end of the resonator structure, the switching element is arranged on a second end of the resonator structure, the switching element comprises a lower electrode arranged on a substrate and an upper electrode, the upper and lower electrodes are separated, the upper electrode is part of a torsional beam supported at a center area of the torsional beam by supports so that the sensor surface is left hanging freely in air at a distance from the substrate; AC and DC voltage sources that are coupled to the resonator structure and are configured to drive the resonator structure to resonate in a stable state at an operating frequency, wherein the resonator structure is configured to cause a resonance frequency shift for the resonator structure to lower values after contact of the particular agent with the sensor surface; a load element electrically coupled to the upper and lower electrodes; and wherein the switching element is configured to be activated upon the contact of the sensor surface with the particular agent having a mass above a predefined level that causes the operating frequency to fall within a shifted pull-in frequency band for the resonator structure due to the contact of the particular agent with the sensor surface, wherein the switching element is configured to close a circuit that includes the load element and the upper and lower electrodes after being activated by having the upper electrode contact the lower electrode. a resonator structure comprising a switching element and a sensor surface configured to detect a mass of a particular agent that becomes in contact with the sensor surface, wherein the particular agent comprises a gas, vapor, or biological entity, the sensor surface is arranged on a first end of the resonator structure, the switching element is arranged on a second end of the resonator structure, the switching element comprises a lower electrode arranged on a substrate and an upper electrode, the upper and lower electrodes are separated, the upper electrode is part of a torsional beam supported at a center area of the torsional beam by supports so that the sensor surface is left hanging freely in air at a distance from the substrate; AC and DC voltage sources that are coupled to the resonator structure and are configured to drive the resonator structure to resonate in a stable state at an operating frequency, wherein the resonator structure is configured to cause a resonance frequency shift for the resonator structure to lower values after contact of the particular agent with the sensor surface; a load element electrically coupled to the upper and lower electrodes; and wherein the switching element is configured to be activated upon the contact of the sensor surface with the particular agent having a mass above a predefined level that causes the operating frequency to fall within a shifted pull-in frequency band for the resonator structure due to the contact of the particular agent with the sensor surface, wherein the switching element is configured to close a circuit that includes the load element and the upper and lower electrodes after being activated by having the upper electrode contact the lower electrode.