An energy harvester includes a pendular unit subjected with a piezoelectric beam coupled to an inertial mass. On the clamped side of the beam, a beam frame includes two pressing elements between which the beam is taken in sandwich, each including i) an intermediate part, an internal face of which presses on a corresponding face of the beam, and ii) a pressure plate, an internal face of which presses on an external face of the intermediate part, a printed circuit board being interposed between them. The intermediate parts and the pressure plates are passed through by at least one common transverse bore receiving a locking pin. The intermediate parts, the pressure plates and the pin are each massive metal parts ensuring a direct electrical and mechanical contact with the electrodes of the beam and with the printed circuit boards.