This paper presents the way to harvest mechanical energy from asphalt pavement by piezoelectric generator. Results show that the potential energy in asphalt pavement can be up to 150 kW/h per lane per kilometre. Part of the mechanical energy can be harvested by piezoelectric transducers. The performance of seven typical transducers is examined through finite element analysis. Results show that PZT piles and multilayer, cymbal and bridge can work in asphalt pavement environment. PZT piles and multilayer have higher energy converting rate, However, the total harvested energy is small if these transducers are embedded directly in pavement. A prototype pavement generator is developed using PZT piles to increase the harvested energy. The generator can harvest more than 50 kW/h energy from the pavement under heavy traffic. 8-16 PZT piles are recommended for one generator. Round shape is suggested for the PZT piles to reduce the concentration of stress. And multilayer structure is recommended for PZT piles to decrease the electric potential of generator. The generator can be extended as sensor in the asphalt pavement, which can be used to monitor the traffic, pavement stress and temperature.