A circuit for autoregulating the oscillation frequency of an oscillating mechanical system, wherein the mechanical system includes a piezoelectric or electroactive polymer element capable of generating an alternating voltage following the oscillation of the mechanical system, the autoregulating circuit being intended to be connected to the piezoelectric or electroactive polymer element to adapt the oscillation frequency of the oscillating mechanical system, and the autoregulating circuit comprising:
- a rectifier for rectifying the alternating voltage generated by the piezoelectric or electroactive polymer element and for storing the rectified voltage in at least one capacitor in order to supply the autoregulating circuit with electricity,
- an oscillator stage, which includes an oscillating circuit connected to a MEMS resonator, to supply a reference signal,
- a means of comparison for comparing the frequency of the alternating voltage to the frequency of the reference signal,
- a frequency adaptation unit intended to be connected to the piezoelectric or electroactive polymer element to supply a frequency adaptation signal to the piezoelectric or electroactive polymer element on the basis of the result of the comparison in the comparison means in order to regulate the oscillation frequency of the oscillating mechanical system, and
- all the electronic components of the autoregulating circuit being grouped together to form a single electronic module,
- wherein the comparison means includes a first alternation counter for counting a first number of alternations of the alternating voltage of the piezoelectric or electroactive polymer element in a first determined time period and for supplying a first counting signal, a second alternation counter for counting a second number of alternations of the reference signal supplied by the oscillator stage in a second determined time period partly on the basis of the first determined time period and for supplying a second counting signal, and a processor unit for comparing the first counting signal to the second counting signal so as to control the frequency adaptation unit on the basis of the result of the comparison.