In this article, we propose a novel homogenization method for piezoelectric composites with periodic microstructures. In the proposed homogenization method, one can find the analytical expressions for the material properties of the composites in the representative volume element (RVE) via diffused material interface method. The availability of analytical expressions for the material properties in the entire domain of the RVE enables one to determine the effective homogenized material properties with the standard finite element method. As the proposed homogenization method regularizes the discontinuity in material properties across the interfaces, there is no need to explicitly track the material interfaces while implementing the finite element method for determining the effective material properties. Hence, one can implement the proposed homogenized method for any piezoelectric composites with complicated material interfaces and determine the effective material properties. In this study, we have considered the piezoelectric composites to be comprised of periodic microstructures where the RVE constitutes a matrix with an inclusion of a specific shape. We have carried out a study on the effect of the shape of inclusion viz. square-shaped, I-shaped, T-shaped, and plus-shaped, and the size of inclusion on the effective piezoelectric material properties. We have also studied the influence of shape and size of inclusion on the electro-mechanical response of a homogenized piezoelectric continuum. To implement the proposed homogenization method, we have used Gridap, an open-source finite element toolbox in Julia that provides very compact codes freely available to all the researchers and makes a third-party verification of the proposed method straightforward.