A method for measuring a
voltage using a microelectromechanical
system, MEMS, (100) comprising a
sample mass (110) which is supported above a substrate by means of mechanical spring elements (120) in such a way that it can be moved relative to the substrate along a vibration direction (x), trimming electrodes (130) which are suitable for generating an electrostatic force on the
sample mass (110) when a
voltage is applied to them, the electrostatic force counteracting a mechanical
spring force generated by the spring elements (120) when the
sample mass (110) is deflected along the vibration direction (x), drive electrodes (140) which are suitable for setting the sample
mass (110) in motion along the vibration direction (x), and readout electrodes (150) which are suitable for measuring a vibration frequency of the vibration of the sample
mass (110) generated in such a way comprises: applying a
voltage to be measured to the trimming electrodes (130); measuring the magnitude of the voltage to be measured from the measured vibration frequency of the sample
mass (110); and detecting changes in the voltage to be measured on the basis of the change in the measured vibration frequency.