Energy harvester suitable for transforming energy to be harvested, chosen from the group composed of a variation in temperature and a variation in the amplitude of a magnetic field, into electrical energy, this harvester comprising: - a first converter (20; 228; 314; 352) equipped with first and second connection terminals (22, 24), this first converter being suitable for converting a variation of the energy to be harvested into a corresponding excess of electrical charges on the first connection terminal relative to the second terminal, - a circuit (30; 174; 222; 252; 272; 292; 324; 342; 354) for collecting the excess of electrical charges on the first connection terminal, this circuit being equipped: • with an output terminal via which the collected charges are delivered, and • a first controllable switch (48; 236) connected to the first connection terminal, this first switch being suitable for switching between an open position in which it prevents the discharging of the electrical charges through the first connection terminal and a closed position in which it allows the discharging of the electrical charges through the first connection terminal, and - a control device for the first switch designed to control the switching of this switch to its closed position only when the excess of electrical charges present on the first connection terminal exceeds a first predetermined threshold, characterized in that: - the first switch is a controllable mechanical switch (48; 236), the closed position of the mechanical switch being obtained by the bearing of an electrical contact directly on another electrical contact so as to establish an electrical continuity and the open position being obtained by the mechanical separation of these two electrical contacts and the interposition between these two electrical contacts of an electrically insulating medium, - the control device comprises a thermo-mechanical transducer (230; 316; 356; 374, 238) or a magnetostrictive material suitable for directly transforming, without consuming the excess of electrical charges present on the first connection terminal, the variation of the energy to be harvested into a mechanical deformation which displaces the first switch from its open position to its closed position. - a first converter (20; 228; 314; 352) equipped with first and second connection terminals (22, 24), this first converter being suitable for converting a variation of the energy to be harvested into a corresponding excess of electrical charges on the first connection terminal relative to the second terminal, - a circuit (30; 174; 222; 252; 272; 292; 324; 342; 354) for collecting the excess of electrical charges on the first connection terminal, this circuit being equipped: • with an output terminal via which the collected charges are delivered, and • a first controllable switch (48; 236) connected to the first connection terminal, this first switch being suitable for switching between an open position in which it prevents the discharging of the electrical charges through the first connection terminal and a closed position in which it allows the discharging of the electrical charges through the first connection terminal, and • with an output terminal via which the collected charges are delivered, and • a first controllable switch (48; 236) connected to the first connection terminal, this first switch being suitable for switching between an open position in which it prevents the discharging of the electrical charges through the first connection terminal and a closed position in which it allows the discharging of the electrical charges through the first connection terminal, and - a control device for the first switch designed to control the switching of this switch to its closed position only when the excess of electrical charges present on the first connection terminal exceeds a first predetermined threshold, - the first switch is a controllable mechanical switch (48; 236), the closed position of the mechanical switch being obtained by the bearing of an electrical contact directly on another electrical contact so as to establish an electrical continuity and the open position being obtained by the mechanical separation of these two electrical contacts and the interposition between these two electrical contacts of an electrically insulating medium, - the control device comprises a thermo-mechanical transducer (230; 316; 356; 374, 238) or a magnetostrictive material suitable for directly transforming, without consuming the excess of electrical charges present on the first connection terminal, the variation of the energy to be harvested into a mechanical deformation which displaces the first switch from its open position to its closed position.