given power generator 100 the amount of gap 112 defines the maximum spring extension thereby the maximum tensile force applied to the piezoelectric element 101 as a result the piezoelectric element is protected from being damaged by tensile loading the gap 112 also defines the maximum level of firing acceleration that is going to be utilized by the power generation unit 100 when the firing acceleration has ended i e after the projectile has exited the gun barrel the mechanical potential energy stored in the elongated spring is available for conversion into electrical energy this can be accomplished by harvesting the varying voltage generated by the piezoelectric element 101 as the mass spring element vibrates the spring rate and the maximum allowed deflection determine the amount of mechanical energy that is stored in the spring 105 the effective mass and spring rate of the mass spring unit determine the frequency natural frequency with which the mass spring element vibrates by increasing decreasing the mass or by decreasing increasing the spring rate of the mass spring unit the frequency of vibration is decreased increased in general by increasing the frequency of vibration the mechanical energy stored in the spring 105 can be harvested at a faster rate thus by selecting appropriate spring 105 mass 109 and gap 112 the amount of electrical energy that can be generated and the rate.