An active medical device of an autonomous implantable capsule type, comprising an elongated tubular envelope housing an energy harvesting module, wherein the energy harvesting module comprises an oscillating pendular unit subjected to external stresses applied to the tubular envelope, the oscillating pendular unit comprising an elastically deformable piezoelectric beam having a clamped end and an opposite, free end coupled to an inertial mass, the piezoelectric beam being adapted to convert into an oscillating electric signal a mechanical energy produced by oscillations of the pendular unit, and wherein the tubular envelope also houses a beam frame, the beam frame comprising two pressing elements (30, 30') between which the clamped end of the piezoelectric beam is taken in sandwich, and a means for tightening the pressing elements together, and each pressing element (30, 30') of the beam frame comprises i) an intermediate part (34, 34'), an internal face of which presses on a corresponding face (54, 54') of the piezoelectric beam, and ii) a pressure plate (32, 32'), an internal face of which presses on an external face of the intermediate part (34, 34'), characterized in that the intermediate parts (34, 34') and the pressure plates (32, 32') of the two pressing elements are passed through by at least one common bore (38a...38'd) extending in a transverse direction with respect to a longitudinal axis of the piezoelectric beam, said at least one common bore (38a...38'd) receiving a locking pin, and in that the beam frame further comprises a means (42, 42') for holding and fastening the pin in position into said at least one common bore (38a...38'd). wherein the energy harvesting module comprises an oscillating pendular unit subjected to external stresses applied to the tubular envelope, the oscillating pendular unit comprising an elastically deformable piezoelectric beam having a clamped end and an opposite, free end coupled to an inertial mass, the piezoelectric beam being adapted to convert into an oscillating electric signal a mechanical energy produced by oscillations of the pendular unit, and wherein the tubular envelope also houses a beam frame, the beam frame comprising two pressing elements (30, 30') between which the clamped end of the piezoelectric beam is taken in sandwich, and a means for tightening the pressing elements together, and each pressing element (30, 30') of the beam frame comprises i) an intermediate part (34, 34'), an internal face of which presses on a corresponding face (54, 54') of the piezoelectric beam, and ii) a pressure plate (32, 32'), an internal face of which presses on an external face of the intermediate part (34, 34'), characterized in that the intermediate parts (34, 34') and the pressure plates (32, 32') of the two pressing elements are passed through by at least one common bore (38a...38'd) extending in a transverse direction with respect to a longitudinal axis of the piezoelectric beam, said at least one common bore (38a...38'd) receiving a locking pin, and in that the beam frame further comprises a means (42, 42') for holding and fastening the pin in position into said at least one common bore (38a...38'd).