A cantilever‐based piezoelectric energy harvesting generator driven by an automatically ‐switchable double‐gear is designed, to assemble the linear‐to‐rotary motion translation and achieve a continuous recovery efficiently by piecewise harvesting. On the basis of identifying the road tolerance grade, an investigation is conducted into the relationship between the gear pitch, vehicle speeds and the energy. A value‐taking method and switching principle are proposed for the gear pitch of the double‐gear under comprehensive driving conditions. According to the tests of two road sections, the results of the simulations show that the automatically ‐switchable double gear can maximize the piezoelectric vibration energy harvesting efficiency under comprehensive driving conditions and road surface with varying tolerances. Meanwhile, results concerning the device experiments indicate that the harvesting efficiency could be improved by 131.66% (76.70%) and 9.37% (22.38%) compared with the single gear with its pitch of 3 mm and 10 mm, respectively.