A method (100) for measuring
voltage using a microelectromechanical
system (MEMS) comprises a
sample mass (110) supported above a substrate by a mechanical spring element (120) so as to be movable relative to the substrate along a vibration direction (x), a trimming
electrode (130) adapted to generate an electrostatic force on the
sample mass (110) when a
voltage is applied thereto, the electrostatic force counteracting a mechanical
spring force generated by the spring element (120) when the
sample mass (110) is deflected along the vibration direction (x), a drive
electrode (140) adapted to move the sample
mass (110) along the vibration direction (x), and a readout
electrode (150) adapted to measure the frequency of vibration of the sample
mass (110) thus generated: applying a
voltage to be measured to the trimming electrode (130), determining the magnitude of the voltage to be measured from the measured vibration frequency of the sample
mass (110), and detecting a change in the voltage to be measured based on a change in the measured vibration frequency.